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

Add uassertWTOK, invariantWTOK, wtRCToStatus variants that explicitly throw exceptions

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Execution Team 2022-02-21

      Some call sites rely on these functions implicitly throwing exceptions as way to escape an assertion or invariant. This makes the failure modes hard to reason about, and complicates the introduction of new error codes.

      Make uassertWTOK, invariantWTOK and wtRCToStatus not throw exceptions. Introduce uassertWTOKMayThrow, invariantWTOKMayThrow, wtRCToStatusMayThrow which effectively implement the current API behaviour and which can throw an exception in some documented cases.

            Assignee:
            josef.ahmad@mongodb.com Josef Ahmad
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: