Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-13411

CompositeIdRouter calculates wrong route hash if atomic update is used for route.field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 7.5
    • 8.5
    • SolrCloud
    • None

    Description

      If collection is created with router.field -parameter to define some other field than uniqueField as route field and document update comes containing route field updated using atomic update syntax (for example set=123), hash for document routing is calculated from "set=123" and not from 123 which is the real value which may lead into routing document to wrong shard.

       

      This happens in CompositeIdRouter#sliceHash, where field value is used as is for hash calculation.

       

      I think there are two possible solutions to fix this:

      a) Allow use of atomic update also for route.field, but use real value instead of atomic update syntax to route document into right shard.

      b) Deny atomic update for route.field and throw exception.

      Attachments

        1. SOLR-13411.patch
          4 kB
          Dr Oleg Savrasov
        2. SOLR-13411.patch
          3 kB
          Dr Oleg Savrasov

        Activity

          People

            mkhl Mikhail Khludnev
            Japsteri Niko Himanen
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: