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

Two Phase Drops: dropDatabase should always wait for pending collection drops to complete

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.10
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2017-07-31

      SERVER-29277 changed the behavior of dropDatabase such that it will drop all collections and wait for the drops to replicate before returning. However, if the only collections in the database at the time of the dropDatabase request are already in the drop-pending state (ie. in the <db>.system.drop.* namespace), dropDatabase() will erroneously fail to detect any collections it needs to wait for and removes the database immediately.

      To fix this, dropDatabase() needs to detect any drop-pending collections and parse the most recent optime of these drop-pending collections that it will call ReplicationCoordinator::awaitReplication() with. This only applies to the case when dropDatabase() doesn't initiate any collection drops.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: