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

maxTimeMS deadline is set after potentially blocking work

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • ALL
    • SP Prioritized List
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      There is some work that is done on the command path prior to setting the deadline on the opCtx which could potentially have non-trivial latency (e.g. mutex acquisition, see SERVER-99896 and HELP-68909). If this work takes a sufficiently long amount of time, then the user's maxTimeMS will not be respected. We should set the deadline as early as possible, ideally before acquiring any kind of mutex that might have contention on it, to ensure that our deadline is as close to what the user intended as possible.

      https://github.com/10gen/mongo/blob/9455ad301b02dbb77493ea342981e63d137f6e9e/src/mongo/s/commands/strategy.cpp#L612

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: