[SERVER-32402] dropDatabase after step down can cause fassert Created: 19/Dec/17  Updated: 30/Oct/23  Resolved: 03/Jan/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.3, 3.7.1

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

Issue Links:
Backports
Depends
Related
is related to SERVER-31436 dropDatabase must check `ReplicationC... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-01-01, Repl 2018-01-15
Participants:
Linked BF Score: 0

 Description   

If there is a step down, we return early and fail, but we never take the database out of the "drop pending" state. Thus if a new dropDatabase oplog entry comes in after the step down, it can cause an error in oplog application and a crash.



 Comments   
Comment by Githook User [ 10/Jan/18 ]

Author:

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

Message: SERVER-32402 refactor second dropDatabase WCE retry loop

Refactored logic checks if Database is still present before confirming if
writes are still accepted.

(cherry picked from commit e4405af1fa6d231a792cf62361968915a914fd2e)
Branch: v3.6
https://github.com/mongodb/mongo/commit/9d2d8b3adf589e6c50159e3a895c81ee54101196

Comment by Githook User [ 10/Jan/18 ]

Author:

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

Message: SERVER-32402 reset Database drop pending state upon step down after dropping collections

(cherry picked from commit afc4b85e1c9023548d6eba7b121a07172e0708ba)
Branch: v3.6
https://github.com/mongodb/mongo/commit/f6ee7e6f975f386a654d17768f4f7ac04946118b

Comment by Githook User [ 03/Jan/18 ]

Author:

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

Message: SERVER-32402 refactor second dropDatabase WCE retry loop

Refactored logic checks if Database is still present before confirming if
writes are still accepted.
Branch: master
https://github.com/mongodb/mongo/commit/e4405af1fa6d231a792cf62361968915a914fd2e

Comment by Githook User [ 03/Jan/18 ]

Author:

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

Message: SERVER-32402 reset Database drop pending state upon step down after dropping collections
Branch: master
https://github.com/mongodb/mongo/commit/afc4b85e1c9023548d6eba7b121a07172e0708ba

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