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

Add uassertWTOK, invariantWTOK, wtRCToStatus variants that explicitly throw exceptions

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Execution Team 2022-02-21

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: