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));
- backported by
-
SERVER-106677 [v8.0.11] List of replica set hosts in config.shards entries not updated for shards added prior to 8.0
-
- Closed
-
- is caused by
-
SERVER-21185 Make shard primary responsible for updating config server's knowledge of shard replica set members
-
- Closed
-
- related to
-
SERVER-106616 Investigate whether replicaSetConfig supplied by restore procedure resets replica set shard's config version
-
- Backlog
-