[SERVER-27474] Eliminate "dropped" collections from config server list of collections Created: 20/Dec/16  Updated: 06/Dec/22  Resolved: 31/Oct/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.1
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Nathan Myers Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-27475 mongos should request an update only ... Closed
Duplicate
duplicates SERVER-51880 Remove all {dropped:true} entries fro... Closed
Related
is related to SERVER-27393 Balancer taking 100% CPU due to large... Closed
Assigned Teams:
Sharding
Participants:

 Description   

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.



 Comments   
Comment by Nathan Myers [ 20/Dec/16 ]

See SERVER-27475 for changes in 3.6.

Generated at Thu Feb 08 04:15:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.