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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.6.0-rc1
    • Affects Version/s: None
    • Component/s: Replication
    • Fully Compatible
    • ALL
    • Repl 2017-11-13
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Benety Goh
            Reporter:
            Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: