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

fix race condition in the TransactionCoordinatorCatalog.CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete test

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      build/ninja/mongo/db/s/db_s_transaction_coordinator_test --filter CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete --suite TransactionCoordinatorCatalogTest --repeat=100000

      Show
      build/ninja/mongo/db/s/db_s_transaction_coordinator_test --filter CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete --suite TransactionCoordinatorCatalogTest --repeat=100000
    • Sprint:
      Sharding 2019-08-26
    • Linked BF Score:
      11

      Description

      This ticket is filed in response to BF-14376. The test assertion, and the code that removes the coordinator from the catalog are not synchronized, and could lead to the an execution where the assertion runs before the coordinator is removed.

      The CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete test waits on the future for the coordinator to complete and then checks if it is removed from the catalog. There is no coordination between the code that removes the coordinator from the catalog, which is an async callback that executes after the onCompletion future is ready, and the test assertion. Therefore, there are no ordering guarantees between the removal callback and the assertion code, which is what we see as the result of this build failure.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: