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

Stepping down the primary when running 'dropDatabase' does not always reset the dropPending flag when the user operation is killed

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-04-20
    • 26

      I think this problem originated from the work to allow dropDatabase to abort in-progress index builds before dropping the database itself.

      Here is the sequence of events leading up to a fatal assertion in a build failure:

      1. The primary node runs dropDatabase on test.
      2. dropDatabase sets the dropPending flag to true.
      3. dropDatabase needs to abort any in-progress index builds on the collections belonging to it prior to dropping the database itself.
      4. dropDatabase waits until the index builds are aborted.
      5. The node steps down from primary to secondary.
      6. The nodes oplog application tries to create a collection on the test database but gets the DatabaseDropPending error, which is fatal during oplog application.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: