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

Fix race condition in read_concern_snapshot_yielding.js

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-rc1, 4.1.1
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Sprint:
      Repl 2018-05-21, Repl 2018-06-04
    • Linked BF Score:
      66

      Description

      In read_concern_snapshot_yielding.js there's some code which waits for an operation to start. The test is racy because the test assumes that once waitForOpId() 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 failPoint
      2) waitForOpId is run, and returns true
      3) killOp is run
      4) The operation checks for interrupt, and terminates (without ever having reached the fail point)
      5) assertKillPending() fails because the operation has terminated

      I'm marking this as depends-on SERVER-34726 because changing this test might hide the bug described in that ticket.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              suganthi.mani Suganthi Mani
              Reporter:
              ian.boros Ian Boros
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: