Require specification of timeoutCode when timeout is specified in RemoteCommandRequest

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      RemoteCommandRequest allows specifying a timeout and an optional timeoutCode, which parts of the networking stack will return when they hit the provided deadline. However, it's possible to specify a timeout without a timeout code, which results in the networking stack deciding which timeout code to use based on the context of the timeout. There are several places in the codebase that do this (unintentionally), which results in the confusing NetworkInterfaceExceededTimeLimit error being returned to external users. We should consider making it impossible to specify a timeout without also specifying a timeoutCode, to prevent this case from occurring at compile time.

      Note that this would prevent NITL from returning some useful context specific codes like PooledConnectionAcquisitionTimeout, but I'd argue that this is ultimately desirable. For example, when hitting a MaxTimeMS deadline, you would want the code to reflect that rather than the context of the timeout itself, which is included in the errmsg.

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

                Created:
                Updated: