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

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

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

      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@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: