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

Fix race condition in read_concern_snapshot_yielding.js

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0.0-rc1, 4.1.1
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2018-05-21, Repl 2018-06-04
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: