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

Fix race condition in read_concern_snapshot_catalog_invalidation.js

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.3, 4.1.3
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Sprint:
      Repl 2018-09-10
    • Linked BF Score:
      7

      Description

      In read_concern_snapshot_catalog_invalidation.js, there is code to wait for an operation to start. The test is racy because the test assumes that once waitForOp() has returned, the operation is hanging on a fail point. This is not necessarily true, and can cause the test to fail if the following happens:

      1) The operation starts, but does not reach the fail point
      2) waitForOp is run, and returns true
      3) createIndexes is run
      4) The operation reaches the fail point and preallocates a snapshot at a time that includes the new index, so the operation unexpectedly succeeds

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: