List of replica set hosts in config.shards entries not updated for shards added prior to 8.0

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Blocker - P1
    • 8.2.0-rc0, 8.1.2, 8.0.11
    • Affects Version/s: 8.0.0, 8.1.0
    • Component/s: Sharding
    • None
    • Cluster Scalability
    • ALL
    • v8.1, v8.0
    • None
    • 0
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The config.shards entries for replica set shards added in MongoDB versions prior to 8.0 won't contain the "replSetConfigVersion" field. The update filter in ShardRegistry::scheduleReplicaSetUpdateOnConfigServerIfNeeded() therefore won't match the entry on the config server. This can leave the mongos router completely unable to connect to a replica set shard if all of the cluster members of a replica set are individually replaced while using the replSetReconfig command.

      auto replSetConfigVersion = rsConfig.getConfigVersion();
      // Specify the config version in the filter and the update to prevent overwriting a
      // newer connection string when there are concurrent updates.
      auto filter =
          BSON(ShardType::name() << shard->getId().toString() << ShardType::replSetConfigVersion()
                                  << BSON("$lt" << replSetConfigVersion));
      

            Assignee:
            Max Hirschhorn
            Reporter:
            Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: