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

Replication rollback of a dropDatabase oplog entries leaves the in-memory database closed on the primary but open on secondaries, leading to secondaries crashing on receipt of conflicting database name

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc3, 6.0.11
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.0, v6.0
    • Execution Team 2023-05-29
    • 29

      A primary running dropDatabase first majority commits dropCollection oplog entries and then writes a final dropDatabase oplog entry, with which the in-memory database is closed atomically. However, if replication rollback goes back to right before the dropDatabase and after the dropCollection(s), this leaves the node with no in-memory database state. Whereas nodes that were secondaries when the dropDatabase was running on the primary will still have the database open in-memory.

      This sets the replica set up to allow a createCollection on a conflicting database on the primary, and then crash on oplog application on the secondaries with a DatabaseDifferCase error.

      Potential solution: 

      • Secondaries could check whether a database is empty before returning name conflict errors.
      • SERVER-74703 should be re-examined to see whether or not it is simple to change something back to fix this new bug, without undoing the fix for the previous bug.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: