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

Fix race condition in read_concern_snapshot_yielding.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc1, 4.1.1
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2018-05-21, Repl 2018-06-04
    • 66

      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.

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

              Created:
              Updated:
              Resolved: