[SERVER-34372] Drop collection command with majority write concern should wait until two-phase drop finishes Created: 06/Apr/18 Updated: 29/Oct/23 Resolved: 19/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.6 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Siyuan Zhou | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||
| Sprint: | Repl 2018-04-23 | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 13 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
Waiting for the drop command gets replicated to a majority doesn't guarantee the drop completes on the primary, so after the command returns, the drop-pending collection reaper will actually drop the collection, which takes the database lock in X mode. The asynchronous DB lock in X mode may be unexpected to users, especially transaction users, because it will block (or abort when |
| Comments |
| Comment by Githook User [ 19/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'username': 'benety', 'name': 'Benety Goh'}Message: |
| Comment by Githook User [ 18/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'username': 'benety', 'name': 'Benety Goh'}Message: |
| Comment by Githook User [ 18/Apr/18 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 18/Apr/18 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 17/Apr/18 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: This commit also adds a dropPendingCollectionReaperHang fail point used in the test. |
| Comment by Spencer Brody (Inactive) [ 13/Apr/18 ] |
|
We've decided not to do |
| Comment by Benety Goh [ 13/Apr/18 ] |
|
The proposed fix, combined with |
| Comment by Gregory McKeon (Inactive) [ 11/Apr/18 ] |
|
spencer, this blocks a 3.7.4 ticket so I'm bumping it to 3.7.4 |
| Comment by Siyuan Zhou [ 06/Apr/18 ] |
|
When this is done, we will be able to remove TwoPhaseDropCollectionTest.waitForDropToComplete() in transaction tests. |