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

Fix race condition in read_concern_snapshot_catalog_invalidation.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.3, 4.1.3
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2018-09-10
    • 7

      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

            Assignee:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: