Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3069

Investigate changes in SERVER-62759: applyOps of dropDatabase causes invariant failure

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: