-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
5
-
StorEng - Defined Pipeline
The current implementations of __wt_row_modify and __wt_col_modify include an optional additional argument bool restore in diagnostic mode.
Based on a quick skim of the code there is no additional overhead for callers to know whether restore should be true or false, so it would be better to keep the HAVE_DIAGNOSTIC check inside the implementation of the two functions, rather than forcing callers to be aware of it.
Doing so will probably require the use of WT_UNUSED(restore); to avoid a compiler warning in non-diagnostic builds.
The new function definitions would become:
int __wt_col_modify(WT_CURSOR_BTREE *cbt, uint64_t recno, const WT_ITEM *value, WT_UPDATE *upd_arg, u_int modify_type, bool exclusive, bool restore) int __wt_row_modify(WT_CURSOR_BTREE *cbt, const WT_ITEM *key, const WT_ITEM *value, WT_UPDATE *upd_arg, u_int modify_type, bool exclusive, bool restore)
And all callers can have the duplicated calls deduplicated, and start always passing in the restore parameter.
- duplicates
-
WT-10044 Remove HAVE_DIAGNOSTIC ifdefs that break WT_ASSERT
- Closed