[SERVER-78051] Reevaluate use of ClusterIdentityLoader for shards Created: 13/Jun/23 Updated: 12/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Backlog - Cluster Scalability |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | cs-subteam1, sharding-nyc-subteam1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Cluster Scalability
|
| Participants: |
| Description |
|
The ClusterIdentityLoader caches the clusterId document from the config.version collection on the config server. During startup, a shard with a shard identity document will load the clusterId from the config server. If no document can be found, startup will retry indefinitely (via this logic). To work around an issue where the config server can transiently have a shard identity but not a clusterId because of a failed initial sync which blocks startup, the config server skips loading the clusterId at startup as of Currently shards don't use the clusterId after loading it, not even to validate it matches the clusterId in the shard identity document. Only the config server uses it when creating the shard identity document for a newly added shard. This ticket is to track reevaluating how we use the ClusterIdentityLoader so it's more useful on shards. |
| Comments |
| Comment by Max Hirschhorn [ 02/Oct/23 ] |
|
felipe.gasper@mongodb.com from a Slack discussion with the Replication team, I don't believe there are any plans to expose new fields in the hello response for either the replicaSetId or clusterId. The clusterId value is documented as being part of the config.version collection and my comment here means we won't accidentally remove/change it without realizing the connection to how mongosync is using the value for telemetry. https://www.mongodb.com/docs/manual/reference/config-database/#mongodb-data-config.version |
| Comment by Felipe Gasper [ 02/Oct/23 ] |
|
max.hirschhorn@mongodb.com Would a nicer way of achieving the intended result be just to add theclusterId to `hello`’s response? |
| Comment by Max Hirschhorn [ 15/Sep/23 ] |
|
I wanted to call out the mongosync team has plans to rely on the clusterId for telemetry purposes and so no matter what we choose to do about the ClusterIdentityLoader class, we should preserve the document in the config.version collection. CC craven.huynh@mongodb.com |