OperatonContext's deadline enforcement inconsistently ignores interrupts

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

      In the checkForInterruptNoAssert implementation checks whether the deadline has expired regardless of the value of _ignoreInterrupts. waitForConditionOrInterruptNoASsertUntil does not check _ignoreInterrupts at all.

      On the other hand, the _markKilledIfDeadlineRequires helper won't make the opCtx killed if _ignoreInterrupts is true. This helper is only used in popArtificialDeadline and runWithoutInterruptionExceptAtGlobalShutdown. The latter also sets an artificial deadline of Date_t::max(), so this logic isn't relevant here either way.

      We should ensure that all places that handle interrupts and deadlines handle _ignoreInterrupts the same way.

      https://github.com/mongodb/mongo/blob/63e6747093904e173a2d0bc31eb6ad4cb5d0c727/src/mongo/db/operation_context.cpp#L235-L244

      https://github.com/mongodb/mongo/blob/63e6747093904e173a2d0bc31eb6ad4cb5d0c727/src/mongo/db/operation_context.h#L910-L915

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

              Created:
              Updated: