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

Inconsistency between failpoint nTimes and waitForTimesEntered counters

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            adithi.raghavan@mongodb.com Adithi Raghavan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: