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

Aliases and eventual consistency (should use sync())

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.3.1
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      ZkStateReader.AliasesManager.update() reads alias info from ZK into the ZkStateReader.  This method is called in ~5 places (+2 for tests).  In at least some of these places, the caller assumes that the alias info is subsequently up to date when in fact this might not be so since ZK is allowed to return a stale value.  ZooKeeper.sync() can be called to force an up to date value.  As with sync(), AliasManager.update() ought not to be called aggressively/commonly, only in certain circumstances (e.g. after failing to resolve stuff that would otherwise return an error).

      And related to this eventual consistency issue, SetAliasPropCmd will throw an exception if the alias doesn't exist.  Fair enough, but sometimes (as seen in some tests), the node receiving the command to update Alias properties is simply "behind"; it does not yet know about an alias that other nodes know about.  I believe this is the cause of some failures in AliasIntegrationTest; perhaps others.

        Attachments

        1. SOLR-12256.patch
          18 kB
          David Smiley

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                dsmiley David Smiley
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: