-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query Execution
-
None
-
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.
- is related to
-
SERVER-45969 Tests for killOp and maxTimeMS with $merge/$out on secondaries
- Closed
-
SERVER-58855 Improve/Fix the Race Condition in out_max_time_ms.js
- Closed