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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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@mongodb.com Mira Carey
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: