- 
    Type:Investigation 
- 
    Resolution: Done
- 
    Priority:Major - P3 
- 
    None
- 
    Affects Version/s: None
- 
    Component/s: None
- 
    None
Original Downstream Change Summary
applyOps now rejects commands with more than one op to apply if one of them is a dropDatabase command
Description of Linked Ticket
Running this command on a 5.2 ReplicaSet with a nonempty database:
db.adminCommand({"applyOps":[{"op":"c","ns":"test.$cmd","o":{"dropDatabase":1}}]}) 
Results in a fatal error:
{"t":{"$date":"2022-01-19T19:14:56.503+01:00"},"s":"F",  "c":"ASSERT",   "id":23079,   "ctx":"conn33","msg":"Invariant failure","attr":{"expr":"!opCtx->lockState()->isLocked()","file":"src/mongo/db/catalog/drop_database.cpp","line":309}}
{"t":{"$date":"2022-01-19T19:14:56.503+01:00"},"s":"F",  "c":"ASSERT",   "id":23080,   "ctx":"conn33","msg":"\n\n***aborting after invariant() failure\n\n"}
{"t":{"$date":"2022-01-19T19:14:56.503+01:00"},"s":"F",  "c":"CONTROL",  "id":4757800, "ctx":"conn33","msg":"Writing fatal message","attr":{"message":"Got signal: 6 (Abort trap: 6).\n"}} 
Looks like this is due to SERVER-49866.
- depends on
- 
                    SERVER-62759 applyOps of dropDatabase causes invariant failure -         
- Closed
 
-