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

XMLWordPrintableJSON

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

      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
              Reporter:
              Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: