Invariant on error codes with ErrorExtraInfo for OperationContext markKilled() and timeout

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.9
    • Affects Version/s: 4.1.5
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2018-12-31, Service Arch 2019-01-14, Service Arch 2019-01-28, Service Arch 2019-02-11, Service Arch 2019-02-25, Service Arch 2019-03-11
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The OperationContext class accepts an ErrorCodes::Error for markKilled() and deadline-setting methods. This error code may be converted to a Status object on checkForInterruptNoAssert() or waitForConditionOrInterruptNoAssertUntil() call. When the error code is one that is associated with an ErrorExtraInfo object, Status construction will fail as we expect Status construction to either include a subclass of ErrorExtraInfo or a BSONObj from which it can be serialized. 

      Until a use case comes up, add an invariant to prevent passing an error code with extra info

              Assignee:
              Mira Carey
              Reporter:
              James Wahlin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: