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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Sprint:
      Sharding 2019-08-26
    • Linked BF Score:
      6

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: