-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Sharding 2017-10-23
-
0
queryoptimizer3.js does drop collection commands in parallel, which can conflict. See the linked BF for a full description.
In summary, drop collection first refreshes it's routing metadata, then takes the distlock and proceeds to delete data and metadata under the protection of the distlock. The problem occurs when one drop collection command is running, has acquired the distlock, cleared shard data and cleared config.chunks entries, but not the config.collections entry. Then another drop collection command arrives and tries to refresh before getting blocked by the distlock. The refresh fails 10 times (ConflictingOperationInProgress), the command fails, and the test fails.
Drop collection should take the distlock before calling getCollectionRoutingInfo, so that the command cannot conflict with itself, and prevent changes to the metadata it sees.
- related to
-
SERVER-30733 Make DistLocks hierarchical for mongos commands
- Closed