[SERVER-40306] Lock acquisition in dropDatabase cmd can throw and leave the database with drop-pending set to true Created: 22/Mar/19  Updated: 29/Oct/23  Resolved: 02/Apr/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.10

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-39419 Stepdown interrupting a running dropD... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2019-04-08
Participants:
Linked BF Score: 9

 Description   

The dropDatabase cmd is getting stalled on lock acquisition here after waiting for replication of the dropCollection ops, before executing the dropDb logic that can proceed once the collections are gone. We have several Guards in the dropDatabase logic to unset the drop-pending flag if there are any errors, but that lock acquisition is not guarded, the previous guard being released here and a new guard not set until afterwards here, creating a window of opportunity. Lock acquisition can throw now.



 Comments   
Comment by Githook User [ 02/Apr/19 ]

Author:

{'name': 'Dianna Hohensee', 'username': 'DiannaHohensee', 'email': 'dianna.hohensee@10gen.com'}

Message: SERVER-40306 Ensure dropDatabase sets drop-pending back to false on failure
Branch: master
https://github.com/mongodb/mongo/commit/0d524262b183781aa6efa44431bd815110d746d7

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