-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 8.1.0-rc0, 8.0.0
-
Component/s: None
-
None
-
Catalog and Routing
The config.system.sessions collection has special logic to send the shardCollection command to the first shard rather than the dbPrimary since we do not want the collection to live on the config server (as we have an assumption that the config server does not contain chunks or data when it is not embedded).
However, there is a race condition with transitionToDedicated where the shardCollection command is sent to the config server (because the config server is also the first shard) but before the coordinator is instantiated the config server transitions to dedicated. In this case, the coordinator will still be executed on the config server after the transition completes and will end up creating the collection with a single chunk on the config server.
In this situation, the collection will never be balanced (since the config server is not considered for balancing) and if the user transitions back to embedded, we will drop the sessions collection locally on the config server resulting in broken metadata for the collection.
- is related to
-
SERVER-86949 The shard to run shardCollection for config.system.sessions may change due to add/removeShard
- In Progress
-
SERVER-97336 Prevent config.system.sessions from being created as unsharded
- Needs Scheduling