-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Medium
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
99
We will be adding a new, unique identifier for shards. We will be replacing the shard id in many internal collections with this new identifier, and we will be updating some commands to return additionally the new identifier.
Description of Linked Ticket
Summary
Introducing a shard UUID ensures every shard is globally unique and traceable throughout the cluster's entire lifecycle.
Motivation
Currently, shards are identified by a user-defined id attribute. While this value must be unique within a cluster, it can be recycled: once a shard is removed, its ID can be reassigned to a new shard during an addShard invocation.
This reuse of IDs creates "multiple incarnations" of a single ID, which leads to ambiguity for systems managing resources tied to a specific shard instance, such as change stream events. To resolve this, the introduction of a permanent, system-generated shard UUID would allow these systems to distinguish between different incarnations and ensure that metadata is associated with the correct, unique instance of a shard.