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

dropDatabase() should wait for collection drops using ReplicationCoordinator::awaitReplication() instead of awaitReplicationOfLastOpForClient()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.3, 3.7.1
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • 0

      dropDatabase currently uses both ReplicationCoordinator::awaitReplication() and awaitReplicationOfLastOpForClient() when waiting for collection drops to complete depending the state of the collections in the database at command invocation. We should be unifying these two code paths and use awaitReplication() with an explicit optime. awaitReplicationOfLastOpForClient() also has the unnecessary effect of waiting for the current snapshot which is not necessary for dropDatabase because we are only interested in waiting for the drop pending collection reaper, which is triggered by the commit optime advancing, to complete its work.

            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: