[SERVER-31436] dropDatabase must check `ReplicationCoordinator::canAcceptWritesFor` after reacquiring global lock Created: 06/Oct/17  Updated: 30/Oct/23  Resolved: 16/Oct/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.0-rc1

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-32402 dropDatabase after step down can caus... Closed
is related to SERVER-29874 Two Phase Drops: dropDatabase does no... Closed
is related to SERVER-29876 Two Phase Drops: dropDatabase should ... Closed
is related to SERVER-29277 Two Phase Drops: implement dropDataba... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2017-11-13
Participants:
Linked BF Score: 0

 Description   

After waiting for all collection drops to replicate to a majority of the replica set, the dropDatabase command reacquires the global lock before completing the rest of the database drop and logging the dropDatabase oplog entry. It is possible that the primary has stepped down while waiting for the collection drops. We should check ReplicationCoordinator::canAcceptWritesFor after reacquiring the global lock to avoid hitting a fatal assertion in logOp() in this case.



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

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-31436 dropDatabase returns PrimarySteppedDown instead of NotMaster if server steps down while waiting for collection drops
Branch: master
https://github.com/mongodb/mongo/commit/da7585f1f501b0c61e8d53344673288c4ec63f15

Comment by Githook User [ 13/Oct/17 ]

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-31436 dropDatabase ensures writes are still accepted before finishing database drop
Branch: master
https://github.com/mongodb/mongo/commit/ae3ea6327667d80aed87150fb8ed9ba21dbae1b0

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