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

DropDatabaseCoordinator should only write on kConfigDropPendingDBsNamespace when the featureFlagCreateDatabaseCoord is enabled

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • Hide

      WIP

      Show
      WIP
    • CAR Team 2024-12-09
    • 200

      The DropDatabaseCoordinator inserts a document on kConfigDropPendingDBsNamespace after SERVER-96828 to notify the delete to a concurrent CreateDatabase operation.

      The document inserted is deleted at the end of the coordinator here.

      In a multiversion scenario with failovers, we may end up not removing the inserted document. For example:

      1. A DropDatabaseCoordinator starts on a node with v8.1. A document is inserted on kConfigDropPendingDBsNamespace.
      2. There is a step-down/step-up in the middle of the dropDatabase operation, and a node with v8.0 becomes the primary.
      3. The new primary resumes the DropDatabaseCoordinator operation and doesn't delete the document inserted on kConfigDropPendingDBsNamespace.

       

      Keeping a document on kConfigDropPendingDBsNamespace will cause that:

      • The next time we run a DropDatabaseCoordinator on the same database, we'll hit a DuplicateKey error and the coordinator will be retried forever.
      • After running setFCV to the latest version, a CreateDatabaseCoordinator execution will fail on this check and will retry forever.

            Assignee:
            silvia.surroca@mongodb.com Silvia Surroca
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: