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

config.shards can be outdated if auto bootstrap is not complete before replSetReconfig

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0, 7.3.0-rc3
    • Affects Version/s: 7.3.0-rc0, 7.2.0-rc3
    • Component/s: None
    • Fully Compatible
    • ALL
    • v7.3
    • Cluster Scalability 2024-1-22, Cluster Scalability 2024-2-5, Cluster Scalability 2024-2-19
    • 156

      This bug surfaced from the fix made in SERVER-82363 due to changes from SERVER-21185.

      As part of auto-bootstrap procedure, a shard entry is added in config.shards inside _transitionToConfigShard via scheduleTransitionToConfigShard. The _isReady promise of ShardingReady is fulfilled once the config entry is committed. In the case of calling it when stepping up a primary mongod as part of _shardingOnTransitionToPrimaryHook, a concurrent replSetReconfig command can cause ShardRegistry::scheduleReplicaSetUpdateOnConfigServerIfNeeded silently fail to update without retrying later due to no shard entry present yet. The previous function is called via ReplicationCoordinatorImpl post updating its replica set config document from _finishReplSetReconfig.

            Assignee:
            wenqin.ye@mongodb.com Wenqin Ye
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: