[SERVER-30052] Better synchronization between collection shard and drop Created: 07/Jul/17 Updated: 23/Sep/19 Resolved: 18/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.4.6, 3.5.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | todo_in_code | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | Sharding 2017-07-31 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 0 | ||||||||||||
| Description |
|
Currently, the 'shardCollection' command's checking/refresh phase is not protected by a distributed lock. This means that while that phase is performing a refresh, a concurrent drop can wipe out the chunks from underneath. Moving the distributed lock acquisition to happen inside the command itself should take care of this problem. |
| Comments |
| Comment by Githook User [ 19/Jul/17 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: This commit places it inside the command itself. |
| Comment by Kaloian Manassiev [ 18/Jul/17 ] |
|
Shard collection and drop as implemented currently, fundamentally cannot be synchronized. This is because in the second part of shardCollection we perform splits and merges, which themselves need the collection distributed lock. Because of this, we cannot hold the distributed lock for the entire duration of 'shardCollection', which again leaves a window open where drop can come in. Closing this ticket as won't fix as it will be obviated once we have UUIDs in place. The queryoptimizer3.js test will remain disabled from the suite until then. |
| Comment by Githook User [ 12/Jul/17 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |