-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.5.1
-
Component/s: Sharding
-
None
-
Sharding
In releases up to and including 3.6, when a sharded collection was dropped, the config server, instead of deleting the dropped collection from its on-disk list of sharded collections, would instead tag it as "dropped". This was necessary because a <= 3.4 mongos, when a client tried to use the dropped collection, would get an error from the shard, and then would retrieve the whole collections list from the config server to update its collections cache. The mongos needs to see the collections with a "dropped" flag to know to discard its corresponding cached records of those collections and their chunks. As a consequence, other activities that read the list of collections have needed to filter out the "dropped" ones, and the records of dropped collections accumulate indefinitely.
The 3.6 mongos no longer reads in the whole list of collections when it gets an "collection does not exist" error from a shard, but only the entry for the one collection, so does not need to see dropped collections identified. "Dropped" entries left over from <= 3.6 should be ignored/skipped when reading the collections list, and no new ones should be written by the 3.8 config server. Collection entries in 3.8 no longer need the "dropped" flag, and code that checks for it may be deleted.
The upgrade process for 3.6 -> 3.8 config servers should scrub the remaining "dropped" entries from config.collections.
- depends on
-
SERVER-27475 mongos should request an update only of the collection not found
- Closed
- duplicates
-
SERVER-51880 Remove all {dropped:true} entries from config.collection on FCV upgrade
- Closed
- is related to
-
SERVER-27393 Balancer taking 100% CPU due to large number of dropped sharded collections
- Closed