Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3683

Possible for setShardVersion to never be set on mongod after multiple StaleConfigExceptions due to stale/missing mongod metadata

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.4, 2.0.0-rc2
    • Affects Version/s: 1.8.3
    • Component/s: Sharding
    • None
    • ALL

      ...possibly also affects 1.9/2.0.

      Core issue is that on a StaleConfigException from a query (handled in the mongos at s/request.cpp), the steps to update the cached shard information from the config server in 1.8.3 no longer always reload the ChunkManager for collections that have not changed. It seems like the assumption is that the mongod is more up-to-date than the shard, and so we should not need to to call setShardVersion on the mongod unless the mongos config information (ChunkManager) changes (it always changes on reload in 1.8.2). If somehow the mongod sharding metadata is less up-to-date than the mongos, the query will be retried repeatedly until it fails.

      Fix may be to reload the chunk manager after the second retry, in order to handle this case.

      Not sure at the moment how this state could come about.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            greg_10gen Greg Studer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: