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

race between TransactionCoordinatorService::joinPreviousRound and coordinator destruction can trigger invariant

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1, 4.2.7
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Sharding 2019-08-26
    • 12

      Example scenario (from cpp test):

      The coordinator gets stored in the function object during commit, promises gets fulfilled, the main test gets unblocked here, coordinator gets removed from catalog and when the CoordinatorService tries to join, it will see that there are no coordinator in the catalog, and then it will still trigger the _quiesced invariant because one of the txnCoordinator shared_ptr is still alive in the function object call back inside the PromiseFuture.

      Probably very unlikely to happen in an actual mongod process since it takes a long time before a node would transition to primary after becoming a secondary.

            Assignee:
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: