-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
-
ALL
The nTimes and waitForTimesEntered counters at a high level both appear to keep track of how many times the failpoint has been entered. nTimes is specified by the user via the failpoint's mode (pass a {times: NUM} document) and the waitForTimesEntered target is passed into the waitForTimesEntered method. nTimes is decremented in methods like executeIf, scopedIf, pauseWhileSet (decremented every iteration after the first while the waitForTimesEntered counter is incremented on the first iteration). The waitForTimesEntered counter appears to rely on comparing the _hitCount (the number of times the failpoint has been locked with a result) with the target num of times entered.
The logic for pauseWhileSet and waitForTimesEntered and the high-level idea of both counters are very similar. For consistency's sake, these two should probably rely on the same counter so their behavior is the same.
- is related to
-
SERVER-93077 failCommand holds its lock while blocking for blockTimeMS
- Backlog