totalBackoffTimeMillis is not reported when the IRRL retry backoff sleep is cancelled by the opCtx deadline

XMLWordPrintableJSON

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

      Behavior

      When an operation's maxTimeMS / opCtx deadline fires while mongos is sleeping in the IRRL retry backoff, the sleep is cancelled and recordBackoff() (invoked in the .then() callback after waitUntil) never runs. As a result, shardingStatistics.shards.<shard>.totalBackoffTimeMillis is not incremented by the backoff time already elapsed before cancellation, under-reporting the metric.

      Discovery

      Discovered while writing the test in SERVER-127631 (PR #57098), where totalBackoffTimeMillis is asserted to be 0 despite time genuinely spent in the backoff sleep.

      Low priority.

            Assignee:
            Unassigned
            Reporter:
            Anja Kalaba
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: