-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.4.25, 7.2.0-rc0, 7.0.2, 5.0.22, 6.0.11, 7.1.0
-
Component/s: Sharding
-
None
-
Catalog and Routing
-
ALL
The current implementation of addShard discovers/registers databases in the following way:
- listDatabases is invoked on the shard being added
- a document is added to config.databases for each result returned by (1)
If any database is created on the new shard between (1) and (2), the config server will not get to know that it exists. This is totally possible because during addShard users are allowed to use direct connections to the new shard. The same bug can be hit also when users keep on using direct connections instead of switching to the router after addShard returns.
This can lead to data loss since the first time a router tries to access the version of a non-tracked db it contacts the config server that can potentially register it on another shard.
- is duplicated by
-
SERVER-90369 find can return incorrect result during promotion from replica set to sharded cluster
- Closed
- related to
-
SERVER-81285 [For v8.1] Verify that users can't create new collections while auto-bootstrap code transitions config server to config shard
- Open