QueuedAdmissionWithLargeMaxTimeMSSucceeds may start sleeping after mock clock is advanced, causing a hang

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Workload Resilience
    • ALL
    • Workload Resilience 2026-09-28
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-132777, we replaced the logic that checked to see if opCtx was currently waiting for interrupt with the more specific check on the AdmissionContext. However, this introduced a separate race, since the advancer thread may wake up before the request thread has actually computed its napTime in the RateLimiter. As a result, the request may compute a napTime with a deadline that is after the clock has been advanced, causing it to hang forever.

      To fix this, we should reintroduce the check that opCtx is waiting for interrupt, but we should put it after the AdmissionContext::waitUntilQueued_forTest call to ensure we're in the right queue.

            Assignee:
            Patrick Freed
            Reporter:
            Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: