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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.10
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Repl 2017-07-31

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: