Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31436

dropDatabase must check `ReplicationCoordinator::canAcceptWritesFor` after reacquiring global lock

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0-rc1
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Repl 2017-11-13
    • 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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              benety.goh Benety Goh
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: