[SERVER-63338] Add uassertWTOK, invariantWTOK, wtRCToStatus variants that explicitly throw exceptions Created: 07/Feb/22  Updated: 10/Feb/22  Resolved: 10/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Josef Ahmad Assignee: Josef Ahmad
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-60839 Introduce a TemporarilyUnavailable er... Closed
Sprint: Execution Team 2022-02-21
Participants:

 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.



 Comments   
Comment by Josef Ahmad [ 10/Feb/22 ]

Decision to not implement this change. The long term intention seems to be making the WiredTiger status checks fully exception-driven, there is no use case for non-throwing variants at least currently.

Generated at Thu Feb 08 05:57:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.