[SERVER-29017] Dropping unsharded collection fails to synchronize with a concurrent shardCollection Created: 28/Apr/17  Updated: 30/Oct/23  Resolved: 16/May/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.6
Fix Version/s: 3.5.8

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-05-08
Participants:
Linked BF Score: 0

 Description   

Currently the sharded collection drop code path branches for sharded or unsharded collections when in practice there is no reason why it should not be the same for both.

This causes race conditions between dropping an unsharded collection and sharding the same collection concurrently, because dropping the unsharded collection will not take the distributed lock.

Making both of them go through the catalog client also helps with moving that command to the config server primary.



 Comments   
Comment by Githook User [ 16/May/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-29017 Acquire the collection dist lock for unsharded drop
Branch: master
https://github.com/mongodb/mongo/commit/24c7c45f83155c72fee03a362b3e5a6a7b37f2a2

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-29017 Get rid of ShardingCatalogClient::updateCollection
Branch: master
https://github.com/mongodb/mongo/commit/a301a8450b394060700011135c071db29309cd4c

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