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

out_max_time_ms.js does not correctly enable "maxTimeNeverTimeOut" failpoint leading to spurious test failure

    • Fully Compatible
    • ALL
    • v5.1, v5.0, v4.4
    • QE 2021-10-18
    • 37

      The test out_max_time_ms.js runs some test logic against both a standalone node as well as a two-node replica set. The test also depends on enabling the "maxTimeNeverTimeOut" failpoint on the nodes involved in the test. This is done in order to prevent operations with a maxTimeMS from timing out prematurely.

      In the case of testing against a replica set, however, there are scenarios in which the test can fail to enable "maxTimeNeverTimeOut" against all of the nodes in the replica set. In particular, this assertion passes the same connection three times to the forceAggregationToHangAndCheckMaxTimeMsExpires(). The helper function then enables the failpoint on the passed in connections. But if both of these connections are to the secondary node, for example, then the failpoint is left disabled on the primary. This can result in operations timing out prematurely, which in turn can cause the test to hang for 10 minutes and fail on an assert.soon() here.

      We should change the test logic so that it unconditionally enables/disables the failpoint for both nodes in the replica set, making it impossible to leave any failpoint in the wrong state.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: