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

fix race condition in the TransactionCoordinatorCatalog.CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete test

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • 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
    • Sharding 2019-08-26
    • 11

      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.

            Assignee:
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Reporter:
            lamont.nelson@mongodb.com Lamont Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: