[SERVER-23769] Add new cluster ID sanity checks for cluster with all node shard aware Created: 15/Apr/16  Updated: 06/Dec/22  Resolved: 12/Nov/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Won't Do Votes: 0
Labels: PM-108, max-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-20371 Use clusterId for the config server c... Closed
Related
is related to SERVER-23096 Config server should initialize the c... Closed
Assigned Teams:
Sharding
Participants:

 Description   
  • Whenever a mongos connects to a shard, the cluster id should match that of the mongos. This is achieved by checking the clusterId response from the isMaster response. The only exception to this rule is during the process of adding the shard.
  • Whenever a mongos or mongod connects to a config server, the cluster id should match with the current one it is a member of.
  • When a mongos starts up, it will initially have the no knowledge of the clusterId and it will get this information from the first config server it contacts. Since a mongos will need to talk to a config server before it can learn about the shards, it should use the clusterId to double check with the shards.


 Comments   
Comment by Dianna Hohensee (Inactive) [ 14/Feb/17 ]

Currently we assure that a server A is receiving a command from another server X in the same cluster by checking the 'configdb' command parameter of setShardVersion against server A's knowledge of what the config connection string is: done here.

Once the cluster ID check is in place, we should remove the 'configdb' config connection string check in setShardVersion. For backwards compatibility, we should accept clusterId not being present and skipping the check.

Generated at Thu Feb 08 04:04:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.