-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
ALL
-
v4.2
-
Sharding 2019-12-02, Sharding 2019-12-16
SERVER-44666 was done with the misconception that calling pauseWhileSet should not count as entering a fail point because this pattern shows up widely in the codebase:
if (failPoint.shouldFail()) { LOG(0) << "log line that used to be used for checkLog"; failPoint.pauseWhileSet(); }
However, the intended use of the function is for entering and waiting for a fail point to be disabled. Therefore, it should be made to increment _timesEntered once. Also, the tests that wait for additional times entered > 1 should be reverted to use checkLog.
Note: I also discovered that there is code all over that uses combinations of shouldFail, pauseWhileSet, executeIf, and execute when entering a fail point. This implies that prior to SERVER-44666 and even SERVER-39165, for the fail points that are entered that way, the times and skip mode in the configureFailPoint command did not have the correct behavior because we always overcounted the number of times entered and returned early.
- is duplicated by
-
SERVER-44829 FailPoint::pauseWhileSet should increment _timesEntered once
- Closed
- related to
-
SERVER-48171 replace OperationContext with Interruptible in FailPoint API
- Closed