diff options
88 files changed, 1628 insertions, 799 deletions
diff --git a/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake b/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake index 695052591c9..f5e92e689ee 100644 --- a/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake +++ b/src/third_party/wiredtiger/cmake/configs/x86/windows/config.cmake @@ -8,8 +8,6 @@ set(ENABLE_STATIC ON CACHE BOOL "" FORCE) set(ENABLE_SHARED OFF CACHE BOOL "" FORCE) set(WITH_PIC ON CACHE BOOL "" FORCE) -# Compile as C code . -add_compile_options(/TC) # Inline expansion. add_compile_options(/Ob1) # Enable string pooling. diff --git a/src/third_party/wiredtiger/dist/s_define.list b/src/third_party/wiredtiger/dist/s_define.list index f4751006cd9..d74044add80 100644 --- a/src/third_party/wiredtiger/dist/s_define.list +++ b/src/third_party/wiredtiger/dist/s_define.list @@ -2,9 +2,11 @@ API_CALL API_CALL_NOCONF API_END +API_END_STAT API_SESSION_INIT API_SESSION_POP API_SESSION_PUSH +CURSOR_UPDATE_API_END_RETRY FLD_MASK JOINABLE_CURSOR_CALL_CHECK LF_MASK diff --git a/src/third_party/wiredtiger/dist/s_string.ok b/src/third_party/wiredtiger/dist/s_string.ok index ae6512ed5f5..b02ec62c5f1 100644 --- a/src/third_party/wiredtiger/dist/s_string.ok +++ b/src/third_party/wiredtiger/dist/s_string.ok @@ -715,6 +715,7 @@ countp cp cplusplus cpp +cppsuite cpuid crc create's diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index e77a98b2b62..ac0a3f29122 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -338,6 +338,7 @@ conn_stats = [ CursorStat('cursor_reopen', 'cursors reused from cache'), CursorStat('cursor_reserve', 'cursor reserve calls'), CursorStat('cursor_reset', 'cursor reset calls'), + CursorStat('cursor_bounds_reset', 'cursor bounds cleared from reset'), CursorStat('cursor_restart', 'cursor operation restarted'), CursorStat('cursor_search', 'cursor search calls'), CursorStat('cursor_search_hs', 'cursor search history store calls'), @@ -749,6 +750,7 @@ dsrc_stats = [ CursorStat('cursor_reopen', 'cache cursors reuse count'), CursorStat('cursor_reserve', 'reserve calls'), CursorStat('cursor_reset', 'reset calls'), + CursorStat('cursor_bounds_reset', 'cursor bounds cleared from reset'), CursorStat('cursor_restart', 'operation restarted'), CursorStat('cursor_search', 'search calls'), CursorStat('cursor_search_hs', 'search history store calls'), @@ -880,6 +882,32 @@ conn_dsrc_stats = [ CursorStat('cursor_skip_hs_cur_position', 'Total number of entries skipped to position the history store cursor'), ########################################## + # Cursor API error statistics + ########################################## + CursorStat('cursor_bound_error', 'cursor bound calls that return an error'), + CursorStat('cursor_cache_error', 'cursor cache calls that return an error'), + CursorStat('cursor_close_error', 'cursor close calls that return an error'), + CursorStat('cursor_compare_error', 'cursor compare calls that return an error'), + CursorStat('cursor_equals_error', 'cursor equals calls that return an error'), + CursorStat('cursor_get_key_error', 'cursor get key calls that return an error'), + CursorStat('cursor_get_value_error', 'cursor get key calls that return an error'), + CursorStat('cursor_insert_check_error', 'cursor insert check calls that return an error'), + CursorStat('cursor_insert_error', 'cursor insert calls that return an error'), + CursorStat('cursor_largest_key_error', 'cursor largest key calls that return an error'), + CursorStat('cursor_modify_error', 'cursor modify calls that return an error'), + CursorStat('cursor_next_error', 'cursor next calls that return an error'), + CursorStat('cursor_next_random_error', 'cursor random next calls that return an error'), + CursorStat('cursor_prev_error', 'cursor prev calls that return an error'), + CursorStat('cursor_reconfigure_error', 'cursor reconfigure calls that return an error'), + CursorStat('cursor_reset_error', 'cursor reset calls that return an error'), + CursorStat('cursor_reserve_error', 'cursor reserve calls that return an error'), + CursorStat('cursor_reopen_error', 'cursor reopen calls that return an error'), + CursorStat('cursor_remove_error', 'cursor remove calls that return an error'), + CursorStat('cursor_search_near_error', 'cursor search near calls that return an error'), + CursorStat('cursor_search_error', 'cursor search calls that return an error'), + CursorStat('cursor_update_error', 'cursor update calls that return an error'), + + ########################################## # Checkpoint cleanup statistics ########################################## CheckpointCleanupStat('cc_pages_evict', 'pages added for eviction'), diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index d9274606e10..6c7889b579d 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "aabaa42300d206a51260ad38051261d05fe7f3a1" + "commit": "b017f238da1ffd71a0623f6bc2e9eb2425887d44" } diff --git a/src/third_party/wiredtiger/lang/python/wiredtiger.i b/src/third_party/wiredtiger/lang/python/wiredtiger.i index 5daa1836360..40322728c5f 100644 --- a/src/third_party/wiredtiger/lang/python/wiredtiger.i +++ b/src/third_party/wiredtiger/lang/python/wiredtiger.i @@ -119,7 +119,7 @@ from packing import pack, unpack SWIGTYPE_p___wt_cursor, 0); if (*$1 != NULL) { PY_CALLBACK *pcb; - uint32_t json, version_cursor; + uint64_t json, version_cursor; json = (*$1)->flags & WT_CURSTD_DUMP_JSON; version_cursor = (*$1)->flags & WT_CURSTD_VERSION_CURSOR; diff --git a/src/third_party/wiredtiger/src/btree/bt_cursor.c b/src/third_party/wiredtiger/src/btree/bt_cursor.c index dff568d402f..2cbf4352e2a 100644 --- a/src/third_party/wiredtiger/src/btree/bt_cursor.c +++ b/src/third_party/wiredtiger/src/btree/bt_cursor.c @@ -17,7 +17,7 @@ typedef struct { WT_ITEM key; WT_ITEM value; uint64_t recno; - uint32_t flags; + uint64_t flags; } WT_CURFILE_STATE; /* @@ -514,6 +514,19 @@ __wt_btcur_reset(WT_CURSOR_BTREE *cbt) WT_STAT_CONN_DATA_INCR(session, cursor_reset); + /* Clear bounds if they are set. */ + if (F_ISSET(cursor, WT_CURSTD_BOUNDS_SET)) { + WT_STAT_CONN_DATA_INCR(session, cursor_bounds_reset); + /* Clear upper bound, and free the buffer. */ + F_CLR(cursor, WT_CURSTD_BOUND_UPPER | WT_CURSTD_BOUND_UPPER_INCLUSIVE); + __wt_buf_free(session, &cursor->upper_bound); + WT_CLEAR(cursor->upper_bound); + /* Clear lower bound, and free the buffer. */ + F_CLR(cursor, WT_CURSTD_BOUND_LOWER | WT_CURSTD_BOUND_LOWER_INCLUSIVE); + __wt_buf_free(session, &cursor->lower_bound); + WT_CLEAR(cursor->lower_bound); + } + F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET); return (__cursor_reset(cbt)); diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c index 6bcdd90fcfd..8cf8fe13b6d 100644 --- a/src/third_party/wiredtiger/src/conn/conn_api.c +++ b/src/third_party/wiredtiger/src/conn/conn_api.c @@ -2207,7 +2207,7 @@ __wt_verbose_dump_sessions(WT_SESSION_IMPL *session, bool show_cursors) WT_ERR(__wt_buf_catfmt(session, buf, ", OVERWRITE")); WT_ERR(__wt_msg(session, " %s", (const char *)buf->data)); } - WT_ERR(__wt_msg(session, " Flags: 0x%" PRIx32, cursor->flags)); + WT_ERR(__wt_msg(session, " Flags: 0x%" PRIx64, cursor->flags)); WT_ERR(__wt_msg(session, " Key_format: %s, Value_format: %s", cursor->key_format == NULL ? "EMPTY" : cursor->key_format, cursor->value_format == NULL ? "EMPTY" : cursor->value_format)); diff --git a/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c b/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c index 341c604b52a..8dfafe886fa 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c +++ b/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c @@ -122,8 +122,7 @@ __curbackup_incr_next(WT_CURSOR *cursor) WT_DECL_RET; WT_SESSION_IMPL *session; wt_off_t size; - uint64_t start_bitoff, total_len; - uint32_t raw; + uint64_t start_bitoff, total_len, raw; const char *file; bool found; diff --git a/src/third_party/wiredtiger/src/cursor/cur_file.c b/src/third_party/wiredtiger/src/cursor/cur_file.c index 58479857e74..9eeb0ec0fbe 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_file.c +++ b/src/third_party/wiredtiger/src/cursor/cur_file.c @@ -133,7 +133,7 @@ __curfile_compare(WT_CURSOR *a, WT_CURSOR *b, int *cmpp) ret = __wt_btcur_compare((WT_CURSOR_BTREE *)a, (WT_CURSOR_BTREE *)b, cmpp); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_compare); } /* @@ -194,7 +194,7 @@ __curfile_next(WT_CURSOR *cursor) err: CURSOR_REPOSITION_END(cursor, session); - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_next); } /* @@ -224,7 +224,7 @@ __wt_curfile_next_random(WT_CURSOR *cursor) F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_next_random); } /* @@ -255,7 +255,7 @@ __curfile_prev(WT_CURSOR *cursor) err: CURSOR_REPOSITION_END(cursor, session); - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_prev); } /* @@ -281,7 +281,7 @@ __curfile_reset(WT_CURSOR *cursor) F_MASK(cursor, WT_CURSTD_VALUE_SET) == 0); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_reset); } /* @@ -317,7 +317,7 @@ __curfile_search(WT_CURSOR *cursor) err: CURSOR_REPOSITION_END(cursor, session); - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_search); } /* @@ -353,7 +353,7 @@ __curfile_search_near(WT_CURSOR *cursor, int *exact) err: CURSOR_REPOSITION_END(cursor, session); - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_search_near); } /* @@ -393,7 +393,7 @@ __curfile_insert(WT_CURSOR *cursor) WT_ASSERT(session, F_MASK(cursor, WT_CURSTD_VALUE_SET) == 0); err: - CURSOR_UPDATE_API_END(session, ret); + CURSOR_UPDATE_API_END_STAT(session, ret, cursor_insert); return (ret); } @@ -423,7 +423,7 @@ __wt_curfile_insert_check(WT_CURSOR *cursor) err: CURSOR_UPDATE_API_END(session, ret); WT_TRET(tret); - return (ret); + API_RET_STAT(session, ret, cursor_insert_check); } /* @@ -456,7 +456,7 @@ __curfile_modify(WT_CURSOR *cursor, WT_MODIFY *entries, int nentries) WT_ASSERT(session, F_MASK(cursor, WT_CURSTD_VALUE_SET) != 0); err: - CURSOR_UPDATE_API_END(session, ret); + CURSOR_UPDATE_API_END_STAT(session, ret, cursor_modify); return (ret); } @@ -489,7 +489,7 @@ __curfile_update(WT_CURSOR *cursor) F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT); err: - CURSOR_UPDATE_API_END(session, ret); + CURSOR_UPDATE_API_END_STAT(session, ret, cursor_update); return (ret); } @@ -541,7 +541,8 @@ __curfile_remove(WT_CURSOR *cursor) err: /* If we've lost an initial position, we must fail. */ - CURSOR_UPDATE_API_END_RETRY(session, ret, !positioned || F_ISSET(cursor, WT_CURSTD_KEY_INT)); + CURSOR_UPDATE_API_END_RETRY_STAT( + session, ret, !positioned || F_ISSET(cursor, WT_CURSTD_KEY_INT), cursor_remove); return (ret); } @@ -574,7 +575,7 @@ __curfile_reserve(WT_CURSOR *cursor) WT_ASSERT(session, F_MASK(cursor, WT_CURSTD_VALUE_SET) == 0); err: - CURSOR_UPDATE_API_END(session, ret); + CURSOR_UPDATE_API_END_STAT(session, ret, cursor_reserve); /* * The application might do a WT_CURSOR.get_value call when we return, so we need a value and @@ -655,7 +656,7 @@ err: } done: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_close); } /* @@ -768,7 +769,7 @@ __curfile_reopen(WT_CURSOR *cursor, bool sweep_check_only) * completes. */ WT_WITH_DHANDLE(session, dhandle, ret = __curfile_reopen_int(cursor)); - return (ret); + API_RET_STAT(session, ret, cursor_reopen); } /* diff --git a/src/third_party/wiredtiger/src/cursor/cur_log.c b/src/third_party/wiredtiger/src/cursor/cur_log.c index f9608159e82..8361012543f 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_log.c +++ b/src/third_party/wiredtiger/src/cursor/cur_log.c @@ -147,7 +147,8 @@ __curlog_kv(WT_SESSION_IMPL *session, WT_CURSOR *cursor) { WT_CURSOR_LOG *cl; WT_DECL_RET; - uint32_t fileid, key_count, opsize, optype, raw; + uint64_t raw; + uint32_t fileid, key_count, opsize, optype; cl = (WT_CURSOR_LOG *)cursor; /* Temporarily turn off raw so we can do direct cursor operations. */ @@ -232,7 +233,8 @@ __curlog_search(WT_CURSOR *cursor) WT_DECL_RET; WT_LSN key; WT_SESSION_IMPL *session; - uint32_t counter, key_file, key_offset, raw; + uint64_t raw; + uint32_t counter, key_file, key_offset; cl = (WT_CURSOR_LOG *)cursor; /* Temporarily turn off raw so we can do direct cursor operations. */ diff --git a/src/third_party/wiredtiger/src/cursor/cur_std.c b/src/third_party/wiredtiger/src/cursor/cur_std.c index edd42b32497..43fd9fb7cc8 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_std.c +++ b/src/third_party/wiredtiger/src/cursor/cur_std.c @@ -367,7 +367,7 @@ __wt_cursor_set_raw_value(WT_CURSOR *cursor, WT_ITEM *value) * WT_CURSOR->get_key worker function. */ int -__wt_cursor_get_keyv(WT_CURSOR *cursor, uint32_t flags, va_list ap) +__wt_cursor_get_keyv(WT_CURSOR *cursor, uint64_t flags, va_list ap) { WT_DECL_RET; WT_ITEM *key; @@ -407,7 +407,7 @@ __wt_cursor_get_keyv(WT_CURSOR *cursor, uint32_t flags, va_list ap) } err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_get_key); } /* @@ -415,7 +415,7 @@ err: * WT_CURSOR->set_key default implementation. */ int -__wt_cursor_set_keyv(WT_CURSOR *cursor, uint32_t flags, va_list ap) +__wt_cursor_set_keyv(WT_CURSOR *cursor, uint64_t flags, va_list ap) { WT_DECL_RET; WT_ITEM *buf, *item, tmp; @@ -546,7 +546,7 @@ __wt_cursor_get_valuev(WT_CURSOR *cursor, va_list ap) ret = __wt_struct_unpackv(session, cursor->value.data, cursor->value.size, fmt, ap); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_get_value); } /* @@ -677,7 +677,8 @@ __wt_cursor_cache(WT_CURSOR *cursor, WT_DATA_HANDLE *dhandle) WT_STAT_CONN_INCR_ATOMIC(session, cursor_cached_count); WT_STAT_DATA_DECR(session, cursor_open_count); F_SET(cursor, WT_CURSTD_CACHED); - return (ret); + + API_RET_STAT(session, ret, cursor_cache); } /* @@ -786,8 +787,7 @@ __wt_cursor_cache_get(WT_SESSION_IMPL *session, const char *uri, uint64_t hash_v WT_CURSOR *cursor; WT_CURSOR_BTREE *cbt; WT_DECL_RET; - uint64_t bucket; - uint32_t overwrite_flag; + uint64_t bucket, overwrite_flag; bool have_config; if (!F_ISSET(session, WT_SESSION_CACHE_CURSORS)) @@ -928,6 +928,9 @@ __wt_cursor_close(WT_CURSOR *cursor) __wt_buf_free(session, &cursor->key); __wt_buf_free(session, &cursor->value); + __wt_buf_free(session, &cursor->lower_bound); + __wt_buf_free(session, &cursor->upper_bound); + __wt_free(session, cursor->internal_uri); __wt_free(session, cursor->uri); __wt_overwrite_and_free(session, cursor); @@ -950,7 +953,7 @@ __wt_cursor_equals(WT_CURSOR *cursor, WT_CURSOR *other, int *equalp) *equalp = (cmp == 0) ? 1 : 0; err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_equals); } /* @@ -990,7 +993,7 @@ __cursor_modify(WT_CURSOR *cursor, WT_MODIFY *entries, int nentries) ret = cursor->update(cursor); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_modify); } /* @@ -1110,7 +1113,7 @@ __wt_cursor_reconfigure(WT_CURSOR *cursor, const char *config) WT_ERR(__cursor_config_debug(cursor, cfg)); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_reconfigure); } /* @@ -1154,7 +1157,7 @@ err: __wt_scr_free(session, &key); if (ret != 0) WT_TRET(cursor->reset(cursor)); - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_largest_key); } /* @@ -1166,24 +1169,108 @@ __wt_cursor_bound(WT_CURSOR *cursor, const char *config) { WT_CONFIG_ITEM cval; WT_DECL_RET; + WT_ITEM key; WT_SESSION_IMPL *session; + int exact; + bool inclusive; + + exact = 0; + inclusive = false; + CURSOR_API_CALL_CONF(cursor, session, bound, config, cfg, NULL); WT_ERR(__wt_config_gets(session, cfg, "action", &cval)); if (WT_STRING_MATCH("set", cval.str, cval.len)) { + WT_ERR(__wt_config_gets(session, cfg, "inclusive", &cval)); + inclusive = cval.val != 0; + /* Check that bound is set with action set configuration. */ WT_ERR(__wt_config_gets(session, cfg, "bound", &cval)); if (cval.len == 0) WT_ERR_MSG(session, EINVAL, "setting bounds must require the bound configuration set"); + + /* The cursor must have a key set to place the lower or upper bound. */ + WT_ERR(__cursor_checkkey(cursor)); + if (WT_STRING_MATCH("upper", cval.str, cval.len)) { + /* + * If the lower bounds are set, make sure that the upper bound is greater than the lower + * bound. + */ + WT_ERR(__wt_cursor_get_raw_key(cursor, &key)); + if (F_ISSET(cursor, WT_CURSTD_BOUND_LOWER)) { + WT_ERR(__wt_compare( + session, CUR2BT(cursor)->collator, &key, &cursor->lower_bound, &exact)); + if (exact < 0) + WT_ERR_MSG(session, EINVAL, "The provided cursor bounds are overlapping"); + /* + * If the lower bound and upper bound are equal, both inclusive flags must be + * specified. + */ + if (exact == 0 && (!F_ISSET(cursor, WT_CURSTD_BOUND_LOWER_INCLUSIVE) || !inclusive)) + WT_ERR_MSG( + session, EINVAL, "The provided cursor bounds are equal but not inclusive"); + } + /* Copy the key over to the upper bound item and set upper bound and inclusive flags. */ + F_SET(cursor, WT_CURSTD_BOUND_UPPER); + if (inclusive) + F_SET(cursor, WT_CURSTD_BOUND_UPPER_INCLUSIVE); + else + F_CLR(cursor, WT_CURSTD_BOUND_UPPER_INCLUSIVE); + WT_ERR(__wt_buf_set(session, &cursor->upper_bound, key.data, key.size)); + } else if (WT_STRING_MATCH("lower", cval.str, cval.len)) { + /* + * If the upper bounds are set, make sure that the lower bound is less than the upper + * bound. + */ + WT_ERR(__wt_cursor_get_raw_key(cursor, &key)); + if (F_ISSET(cursor, WT_CURSTD_BOUND_UPPER)) { + WT_ERR(__wt_compare( + session, CUR2BT(cursor)->collator, &key, &cursor->upper_bound, &exact)); + if (exact > 0) + WT_ERR_MSG(session, EINVAL, "The provided cursor bounds are overlapping"); + /* + * If the lower bound and upper bound are equal, both inclusive flags must be + * specified. + */ + if (exact == 0 && (!F_ISSET(cursor, WT_CURSTD_BOUND_UPPER_INCLUSIVE) || !inclusive)) + WT_ERR_MSG( + session, EINVAL, "The provided cursor bounds are equal but not inclusive"); + } + /* Copy the key over to the lower bound item and set upper bound and inclusive flags. */ + F_SET(cursor, WT_CURSTD_BOUND_LOWER); + if (inclusive) + F_SET(cursor, WT_CURSTD_BOUND_LOWER_INCLUSIVE); + else + F_CLR(cursor, WT_CURSTD_BOUND_LOWER_INCLUSIVE); + WT_ERR(__wt_buf_set(session, &cursor->lower_bound, key.data, key.size)); + } else + WT_ERR_MSG(session, EINVAL, + "setting bounds only accepts \"upper\" or \"lower\" as the configuration"); + } else if (WT_STRING_MATCH("clear", cval.str, cval.len)) { - /* Inclusive should not be supplied from the application the action clear configuration. */ + /* Inclusive should not be supplied from the application with action clear configuration. */ if (__wt_config_getones(session, config, "inclusive", &cval) != WT_NOTFOUND) WT_ERR_MSG(session, EINVAL, "clearing bounds is not compatible with the inclusive configuration"); - } + /* + * Check if there is a lower or upper specified bound config. If there are no specified + * bounds, both the upper and lower bound will be cleared. + */ + WT_ERR(__wt_config_gets(session, cfg, "bound", &cval)); + if (cval.len == 0 || WT_STRING_MATCH("upper", cval.str, cval.len)) { + F_CLR(cursor, WT_CURSTD_BOUND_UPPER | WT_CURSTD_BOUND_UPPER_INCLUSIVE); + __wt_buf_free(session, &cursor->upper_bound); + WT_CLEAR(cursor->upper_bound); + } + if (cval.len == 0 || WT_STRING_MATCH("lower", cval.str, cval.len)) { + F_CLR(cursor, WT_CURSTD_BOUND_LOWER | WT_CURSTD_BOUND_LOWER_INCLUSIVE); + __wt_buf_free(session, &cursor->lower_bound); + WT_CLEAR(cursor->lower_bound); + } + } err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_bound); } /* @@ -1286,7 +1373,7 @@ __wt_cursor_init( */ WT_RET(__wt_config_gets_def(session, cfg, "dump", 0, &cval)); if (cval.len != 0 && owner == NULL) { - uint32_t dump_flag; + uint64_t dump_flag; if (WT_STRING_MATCH("json", cval.str, cval.len)) dump_flag = WT_CURSTD_DUMP_JSON; else if (WT_STRING_MATCH("print", cval.str, cval.len)) diff --git a/src/third_party/wiredtiger/src/cursor/cur_table.c b/src/third_party/wiredtiger/src/cursor/cur_table.c index 64245345eca..d82b3c6e731 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_table.c +++ b/src/third_party/wiredtiger/src/cursor/cur_table.c @@ -74,7 +74,7 @@ __curextract_insert(WT_CURSOR *cursor) ret = cextract->f(cextract->idxc); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_insert); } /* @@ -208,7 +208,7 @@ __wt_curtable_get_value(WT_CURSOR *cursor, ...) va_end(ap); err: - API_END_RET(session, ret); + API_END_RET_STAT(session, ret, cursor_get_value); } /* @@ -511,7 +511,7 @@ __curtable_insert(WT_CURSOR *cursor) WT_CURSOR_TABLE *ctable; WT_DECL_RET; WT_SESSION_IMPL *session; - uint32_t flag_orig; + uint64_t flag_orig; u_int i; ctable = (WT_CURSOR_TABLE *)cursor; diff --git a/src/third_party/wiredtiger/src/cursor/cur_version.c b/src/third_party/wiredtiger/src/cursor/cur_version.c index 6600ad66335..6bb323ffe74 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_version.c +++ b/src/third_party/wiredtiger/src/cursor/cur_version.c @@ -20,7 +20,7 @@ __curversion_set_key(WT_CURSOR *cursor, ...) WT_CURSOR_VERSION *version_cursor; WT_DECL_RET; WT_SESSION_IMPL *session; - uint32_t flags; + uint64_t flags; va_list ap; session = CUR2S(cursor); @@ -51,7 +51,7 @@ __curversion_get_key(WT_CURSOR *cursor, ...) WT_CURSOR *file_cursor; WT_CURSOR_VERSION *version_cursor; WT_DECL_RET; - uint32_t flags; + uint64_t flags; va_list ap; version_cursor = (WT_CURSOR_VERSION *)cursor; @@ -162,8 +162,7 @@ __curversion_next_int(WT_CURSOR *cursor) WT_TIME_WINDOW *twp; WT_UPDATE *first, *next_upd, *upd, *tombstone; wt_timestamp_t durable_start_ts, durable_stop_ts, stop_ts; - uint64_t stop_txn, hs_upd_type; - uint32_t raw; + uint64_t stop_txn, hs_upd_type, raw; uint8_t *p, version_prepare_state; bool upd_found; diff --git a/src/third_party/wiredtiger/src/include/api.h b/src/third_party/wiredtiger/src/include/api.h index 7b88288d802..76ea129011a 100644 --- a/src/third_party/wiredtiger/src/include/api.h +++ b/src/third_party/wiredtiger/src/include/api.h @@ -156,6 +156,26 @@ #define API_END_RET(s, ret) \ API_END(s, ret); \ return (ret) + +#define API_END_STAT(s, ret, api) \ + do { \ + if ((ret) != 0 && ((ret) != WT_NOTFOUND)) { \ + WT_STAT_CONN_DATA_INCR(s, api##_error); \ + } \ + } while (0) + +#define API_RET_STAT(s, ret, api) \ + do { \ + API_END_STAT(s, ret, api); \ + return ((ret)); \ + } while (0) + +#define API_END_RET_STAT(s, ret, api) \ + do { \ + API_END_STAT(s, ret, api); \ + API_END_RET(s, ret); \ + } while (0) + #define API_END_RET_NOTFOUND_MAP(s, ret) \ API_END(s, ret); \ return ((ret) == WT_NOTFOUND ? ENOENT : (ret)) @@ -276,6 +296,14 @@ #define CURSOR_UPDATE_API_END(s, ret) CURSOR_UPDATE_API_END_RETRY(s, ret, true) +#define CURSOR_UPDATE_API_END_RETRY_STAT(s, ret, retry, api) \ + if ((ret) == WT_PREPARE_CONFLICT) \ + (ret) = WT_ROLLBACK; \ + API_END_STAT(s, ret, api); \ + TXN_API_END(s, ret, retry) + +#define CURSOR_UPDATE_API_END_STAT(s, ret, api) CURSOR_UPDATE_API_END_RETRY_STAT(s, ret, true, api) + /* * FIXME-WT-9372 The cursor reposition code has been disabled to isolate performance impact of a * couple of eviction bugs. We are going to introduce a debug configuration option to control diff --git a/src/third_party/wiredtiger/src/include/cursor.h b/src/third_party/wiredtiger/src/include/cursor.h index ec6bf22f05f..716545c310a 100644 --- a/src/third_party/wiredtiger/src/include/cursor.h +++ b/src/third_party/wiredtiger/src/include/cursor.h @@ -32,6 +32,8 @@ {NULL, 0, NULL, 0, 0}, /* WT_ITEM value */ \ 0, /* int saved_err */ \ NULL, /* internal_uri */ \ + {NULL, 0, NULL, 0, 0}, /* WT_ITEM lower bound */ \ + {NULL, 0, NULL, 0, 0}, /* WT_ITEM upper bound */ \ 0 /* uint32_t flags */ \ } diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h index ea18c96dd78..c8aa22a5d34 100644 --- a/src/third_party/wiredtiger/src/include/extern.h +++ b/src/third_party/wiredtiger/src/include/extern.h @@ -563,7 +563,7 @@ extern int __wt_cursor_equals_notsup(WT_CURSOR *cursor, WT_CURSOR *other, int *e WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_cursor_get_key(WT_CURSOR *cursor, ...) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_cursor_get_keyv(WT_CURSOR *cursor, uint32_t flags, va_list ap) +extern int __wt_cursor_get_keyv(WT_CURSOR *cursor, uint64_t flags, va_list ap) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_cursor_get_raw_key(WT_CURSOR *cursor, WT_ITEM *key) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -597,7 +597,7 @@ extern int __wt_cursor_reopen_notsup(WT_CURSOR *cursor, bool check_only) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_cursor_search_near_notsup(WT_CURSOR *cursor, int *exact) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_cursor_set_keyv(WT_CURSOR *cursor, uint32_t flags, va_list ap) +extern int __wt_cursor_set_keyv(WT_CURSOR *cursor, uint64_t flags, va_list ap) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_cursor_set_valuev(WT_CURSOR *cursor, const char *fmt, va_list ap) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); diff --git a/src/third_party/wiredtiger/src/include/msvc.h b/src/third_party/wiredtiger/src/include/msvc.h index 9823313035c..f2f861f1bf1 100644 --- a/src/third_party/wiredtiger/src/include/msvc.h +++ b/src/third_party/wiredtiger/src/include/msvc.h @@ -11,7 +11,9 @@ #error "Only x64 is supported with MSVC" #endif +#ifndef __cplusplus #define inline __inline +#endif /* MSVC Doesn't provide __PRETTY_FUNCTION__, it has __FUNCSIG__ */ #ifdef _MSC_VER @@ -32,22 +34,23 @@ #define WT_GCC_FUNC_ATTRIBUTE(x) #define WT_GCC_FUNC_DECL_ATTRIBUTE(x) -#define WT_ATOMIC_FUNC(name, ret, type, s, t) \ - static inline ret __wt_atomic_add##name(type *vp, type v) \ - { \ - return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v)) + (v)); \ - } \ - static inline ret __wt_atomic_fetch_add##name(type *vp, type v) \ - { \ - return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v))); \ - } \ - static inline ret __wt_atomic_sub##name(type *vp, type v) \ - { \ - return (_InterlockedExchangeAdd##s((t *)(vp), -(t)v) - (v)); \ - } \ - static inline bool __wt_atomic_cas##name(type *vp, type old, type new) \ - { \ - return (_InterlockedCompareExchange##s((t *)(vp), (t)(new), (t)(old)) == (t)(old)); \ +#define WT_ATOMIC_FUNC(name, ret, type, s, t) \ + static inline ret __wt_atomic_add##name(type *vp, type v) \ + { \ + return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v)) + (v)); \ + } \ + static inline ret __wt_atomic_fetch_add##name(type *vp, type v) \ + { \ + return (_InterlockedExchangeAdd##s((t *)(vp), (t)(v))); \ + } \ + static inline ret __wt_atomic_sub##name(type *vp, type v) \ + { \ + return (_InterlockedExchangeAdd##s((t *)(vp), -(t)v) - (v)); \ + } \ + static inline bool __wt_atomic_cas##name(type *vp, type old_val, type new_val) \ + { \ + return ( \ + _InterlockedCompareExchange##s((t *)(vp), (t)(new_val), (t)(old_val)) == (t)(old_val)); \ } WT_ATOMIC_FUNC(8, uint8_t, uint8_t, 8, char) @@ -68,9 +71,10 @@ WT_ATOMIC_FUNC(size, size_t, size_t, 64, __int64) * Pointer compare and swap. */ static inline bool -__wt_atomic_cas_ptr(void *vp, void *old, void *new) +__wt_atomic_cas_ptr(void *vp, void *old_val, void *new_val) { - return (_InterlockedCompareExchange64(vp, (int64_t) new, (int64_t)old) == ((int64_t)old)); + return (_InterlockedCompareExchange64( + (volatile __int64 *)vp, (int64_t)new_val, (int64_t)old_val) == ((int64_t)old_val)); } /* diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index b09296912f1..44d90d45d3a 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -551,36 +551,59 @@ struct __wt_connection_stats { int64_t cursor_reposition_failed; int64_t cursor_reposition; int64_t cursor_cached_count; + int64_t cursor_bound_error; + int64_t cursor_bounds_reset; int64_t cursor_insert_bulk; + int64_t cursor_cache_error; int64_t cursor_cache; + int64_t cursor_close_error; + int64_t cursor_compare_error; int64_t cursor_create; + int64_t cursor_equals_error; + int64_t cursor_get_key_error; + int64_t cursor_get_value_error; int64_t cursor_insert; + int64_t cursor_insert_error; + int64_t cursor_insert_check_error; int64_t cursor_insert_bytes; + int64_t cursor_largest_key_error; int64_t cursor_modify; + int64_t cursor_modify_error; int64_t cursor_modify_bytes; int64_t cursor_modify_bytes_touch; int64_t cursor_next; + int64_t cursor_next_error; int64_t cursor_next_hs_tombstone; int64_t cursor_next_skip_ge_100; int64_t cursor_next_skip_lt_100; int64_t cursor_restart; int64_t cursor_prev; + int64_t cursor_prev_error; int64_t cursor_prev_hs_tombstone; int64_t cursor_prev_skip_ge_100; int64_t cursor_prev_skip_lt_100; + int64_t cursor_next_random_error; + int64_t cursor_reconfigure_error; int64_t cursor_remove; + int64_t cursor_remove_error; int64_t cursor_remove_bytes; + int64_t cursor_reopen_error; int64_t cursor_reserve; + int64_t cursor_reserve_error; int64_t cursor_reset; + int64_t cursor_reset_error; int64_t cursor_search; + int64_t cursor_search_error; int64_t cursor_search_hs; int64_t cursor_search_near; + int64_t cursor_search_near_error; int64_t cursor_sweep_buckets; int64_t cursor_sweep_closed; int64_t cursor_sweep_examined; int64_t cursor_sweep; int64_t cursor_truncate; int64_t cursor_update; + int64_t cursor_update_error; int64_t cursor_update_bytes; int64_t cursor_update_bytes_changed; int64_t cursor_reopen; @@ -1010,12 +1033,35 @@ struct __wt_dsrc_stats { int64_t cursor_reopen; int64_t cursor_cache; int64_t cursor_create; + int64_t cursor_bound_error; + int64_t cursor_bounds_reset; + int64_t cursor_cache_error; + int64_t cursor_close_error; + int64_t cursor_compare_error; + int64_t cursor_equals_error; + int64_t cursor_get_key_error; + int64_t cursor_get_value_error; + int64_t cursor_insert_error; + int64_t cursor_insert_check_error; + int64_t cursor_largest_key_error; + int64_t cursor_modify_error; + int64_t cursor_next_error; int64_t cursor_next_hs_tombstone; int64_t cursor_next_skip_ge_100; int64_t cursor_next_skip_lt_100; + int64_t cursor_prev_error; int64_t cursor_prev_hs_tombstone; int64_t cursor_prev_skip_ge_100; int64_t cursor_prev_skip_lt_100; + int64_t cursor_next_random_error; + int64_t cursor_reconfigure_error; + int64_t cursor_remove_error; + int64_t cursor_reopen_error; + int64_t cursor_reserve_error; + int64_t cursor_reset_error; + int64_t cursor_search_error; + int64_t cursor_search_near_error; + int64_t cursor_update_error; int64_t cursor_insert; int64_t cursor_insert_bytes; int64_t cursor_modify; diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index 34d71446dd6..65b7eb8c2bf 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -733,41 +733,53 @@ struct __wt_cursor { */ const char *internal_uri; + /* + * Lower bound and upper bound buffers that is used for the bound API. Store the key set for + * either the lower bound and upper bound such that cursor operations can limit the returned key + * to be within the bounded ranges. + */ + WT_ITEM lower_bound, upper_bound; + /* AUTOMATIC FLAG VALUE GENERATION START 0 */ -#define WT_CURSTD_APPEND 0x00000001u -#define WT_CURSTD_BULK 0x00000002u -#define WT_CURSTD_CACHEABLE 0x00000004u -#define WT_CURSTD_CACHED 0x00000008u -#define WT_CURSTD_DEAD 0x00000010u -#define WT_CURSTD_DEBUG_COPY_KEY 0x00000020u -#define WT_CURSTD_DEBUG_COPY_VALUE 0x00000040u -#define WT_CURSTD_DEBUG_RESET_EVICT 0x00000080u -#define WT_CURSTD_DUMP_HEX 0x00000100u -#define WT_CURSTD_DUMP_JSON 0x00000200u -#define WT_CURSTD_DUMP_PRETTY 0x00000400u -#define WT_CURSTD_DUMP_PRINT 0x00000800u -#define WT_CURSTD_DUP_NO_VALUE 0x00001000u -#define WT_CURSTD_EVICT_REPOSITION 0x00002000u -#define WT_CURSTD_HS_READ_ALL 0x00004000u -#define WT_CURSTD_HS_READ_COMMITTED 0x00008000u -#define WT_CURSTD_IGNORE_TOMBSTONE 0x00010000u -#define WT_CURSTD_JOINED 0x00020000u -#define WT_CURSTD_KEY_EXT 0x00040000u /* Key points out of tree. */ -#define WT_CURSTD_KEY_INT 0x00080000u /* Key points into tree. */ -#define WT_CURSTD_KEY_ONLY 0x00100000u -#define WT_CURSTD_META_INUSE 0x00200000u -#define WT_CURSTD_OPEN 0x00400000u -#define WT_CURSTD_OVERWRITE 0x00800000u -#define WT_CURSTD_PREFIX_SEARCH 0x01000000u -#define WT_CURSTD_RAW 0x02000000u -#define WT_CURSTD_RAW_SEARCH 0x04000000u -#define WT_CURSTD_VALUE_EXT 0x08000000u /* Value points out of tree. */ -#define WT_CURSTD_VALUE_INT 0x10000000u /* Value points into tree. */ -#define WT_CURSTD_VERSION_CURSOR 0x20000000u /* Version cursor. */ -/* AUTOMATIC FLAG VALUE GENERATION STOP 32 */ +#define WT_CURSTD_APPEND 0x000000001u +#define WT_CURSTD_BULK 0x000000002u +#define WT_CURSTD_CACHEABLE 0x000000004u +#define WT_CURSTD_CACHED 0x000000008u +#define WT_CURSTD_DEAD 0x000000010u +#define WT_CURSTD_DEBUG_COPY_KEY 0x000000020u +#define WT_CURSTD_DEBUG_COPY_VALUE 0x000000040u +#define WT_CURSTD_DEBUG_RESET_EVICT 0x000000080u +#define WT_CURSTD_DUMP_HEX 0x000000100u +#define WT_CURSTD_DUMP_JSON 0x000000200u +#define WT_CURSTD_DUMP_PRETTY 0x000000400u +#define WT_CURSTD_DUMP_PRINT 0x000000800u +#define WT_CURSTD_DUP_NO_VALUE 0x000001000u +#define WT_CURSTD_EVICT_REPOSITION 0x000002000u +#define WT_CURSTD_HS_READ_ALL 0x000004000u +#define WT_CURSTD_HS_READ_COMMITTED 0x000008000u +#define WT_CURSTD_IGNORE_TOMBSTONE 0x000010000u +#define WT_CURSTD_JOINED 0x000020000u +#define WT_CURSTD_KEY_EXT 0x000040000u /* Key points out of tree. */ +#define WT_CURSTD_KEY_INT 0x000080000u /* Key points into tree. */ +#define WT_CURSTD_KEY_ONLY 0x000100000u +#define WT_CURSTD_META_INUSE 0x000200000u +#define WT_CURSTD_OPEN 0x000400000u +#define WT_CURSTD_OVERWRITE 0x000800000u +#define WT_CURSTD_PREFIX_SEARCH 0x001000000u +#define WT_CURSTD_RAW 0x002000000u +#define WT_CURSTD_RAW_SEARCH 0x004000000u +#define WT_CURSTD_VALUE_EXT 0x008000000u /* Value points out of tree. */ +#define WT_CURSTD_VALUE_INT 0x010000000u /* Value points into tree. */ +#define WT_CURSTD_BOUND_LOWER 0x020000000u /* Lower bound. */ +#define WT_CURSTD_BOUND_LOWER_INCLUSIVE 0x040000000u /* Inclusive lower bound. */ +#define WT_CURSTD_BOUND_UPPER 0x080000000u /* Upper bound. */ +#define WT_CURSTD_BOUND_UPPER_INCLUSIVE 0x100000000u /* Inclusive upper bound. */ +#define WT_CURSTD_VERSION_CURSOR 0x200000000u /* Version cursor. */ +/* AUTOMATIC FLAG VALUE GENERATION STOP 64 */ #define WT_CURSTD_KEY_SET (WT_CURSTD_KEY_EXT | WT_CURSTD_KEY_INT) #define WT_CURSTD_VALUE_SET (WT_CURSTD_VALUE_EXT | WT_CURSTD_VALUE_INT) - uint32_t flags; +#define WT_CURSTD_BOUNDS_SET (WT_CURSTD_BOUND_LOWER | WT_CURSTD_BOUND_UPPER) + uint64_t flags; #endif }; @@ -5721,724 +5733,770 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_CURSOR_REPOSITION 1217 /*! cursor: cached cursor count */ #define WT_STAT_CONN_CURSOR_CACHED_COUNT 1218 +/*! cursor: cursor bound calls that return an error */ +#define WT_STAT_CONN_CURSOR_BOUND_ERROR 1219 +/*! cursor: cursor bounds cleared from reset */ +#define WT_STAT_CONN_CURSOR_BOUNDS_RESET 1220 /*! cursor: cursor bulk loaded cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT_BULK 1219 +#define WT_STAT_CONN_CURSOR_INSERT_BULK 1221 +/*! cursor: cursor cache calls that return an error */ +#define WT_STAT_CONN_CURSOR_CACHE_ERROR 1222 /*! cursor: cursor close calls that result in cache */ -#define WT_STAT_CONN_CURSOR_CACHE 1220 +#define WT_STAT_CONN_CURSOR_CACHE 1223 +/*! cursor: cursor close calls that return an error */ +#define WT_STAT_CONN_CURSOR_CLOSE_ERROR 1224 +/*! cursor: cursor compare calls that return an error */ +#define WT_STAT_CONN_CURSOR_COMPARE_ERROR 1225 /*! cursor: cursor create calls */ -#define WT_STAT_CONN_CURSOR_CREATE 1221 +#define WT_STAT_CONN_CURSOR_CREATE 1226 +/*! cursor: cursor equals calls that return an error */ +#define WT_STAT_CONN_CURSOR_EQUALS_ERROR 1227 +/*! cursor: cursor get key calls that return an error */ +#define WT_STAT_CONN_CURSOR_GET_KEY_ERROR 1228 +/*! cursor: cursor get key calls that return an error */ +#define WT_STAT_CONN_CURSOR_GET_VALUE_ERROR 1229 /*! cursor: cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT 1222 +#define WT_STAT_CONN_CURSOR_INSERT 1230 +/*! cursor: cursor insert calls that return an error */ +#define WT_STAT_CONN_CURSOR_INSERT_ERROR 1231 +/*! cursor: cursor insert check calls that return an error */ +#define WT_STAT_CONN_CURSOR_INSERT_CHECK_ERROR 1232 /*! cursor: cursor insert key and value bytes */ -#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1223 +#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1233 +/*! cursor: cursor largest key calls that return an error */ +#define WT_STAT_CONN_CURSOR_LARGEST_KEY_ERROR 1234 /*! cursor: cursor modify calls */ -#define WT_STAT_CONN_CURSOR_MODIFY 1224 +#define WT_STAT_CONN_CURSOR_MODIFY 1235 +/*! cursor: cursor modify calls that return an error */ +#define WT_STAT_CONN_CURSOR_MODIFY_ERROR 1236 /*! cursor: cursor modify key and value bytes affected */ -#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1225 +#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1237 /*! cursor: cursor modify value bytes modified */ -#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1226 +#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1238 /*! cursor: cursor next calls */ -#define WT_STAT_CONN_CURSOR_NEXT 1227 +#define WT_STAT_CONN_CURSOR_NEXT 1239 +/*! cursor: cursor next calls that return an error */ +#define WT_STAT_CONN_CURSOR_NEXT_ERROR 1240 /*! * cursor: cursor next calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_CONN_CURSOR_NEXT_HS_TOMBSTONE 1228 +#define WT_STAT_CONN_CURSOR_NEXT_HS_TOMBSTONE 1241 /*! * cursor: cursor next calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1229 +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1242 /*! cursor: cursor next calls that skip less than 100 entries */ -#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1230 +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1243 /*! cursor: cursor operation restarted */ -#define WT_STAT_CONN_CURSOR_RESTART 1231 +#define WT_STAT_CONN_CURSOR_RESTART 1244 /*! cursor: cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV 1232 +#define WT_STAT_CONN_CURSOR_PREV 1245 +/*! cursor: cursor prev calls that return an error */ +#define WT_STAT_CONN_CURSOR_PREV_ERROR 1246 /*! * cursor: cursor prev calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE 1233 +#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE 1247 /*! * cursor: cursor prev calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1234 +#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1248 /*! cursor: cursor prev calls that skip less than 100 entries */ -#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1235 +#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1249 +/*! cursor: cursor random next calls that return an error */ +#define WT_STAT_CONN_CURSOR_NEXT_RANDOM_ERROR 1250 +/*! cursor: cursor reconfigure calls that return an error */ +#define WT_STAT_CONN_CURSOR_RECONFIGURE_ERROR 1251 /*! cursor: cursor remove calls */ -#define WT_STAT_CONN_CURSOR_REMOVE 1236 +#define WT_STAT_CONN_CURSOR_REMOVE 1252 +/*! cursor: cursor remove calls that return an error */ +#define WT_STAT_CONN_CURSOR_REMOVE_ERROR 1253 /*! cursor: cursor remove key bytes removed */ -#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1237 +#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1254 +/*! cursor: cursor reopen calls that return an error */ +#define WT_STAT_CONN_CURSOR_REOPEN_ERROR 1255 /*! cursor: cursor reserve calls */ -#define WT_STAT_CONN_CURSOR_RESERVE 1238 +#define WT_STAT_CONN_CURSOR_RESERVE 1256 +/*! cursor: cursor reserve calls that return an error */ +#define WT_STAT_CONN_CURSOR_RESERVE_ERROR 1257 /*! cursor: cursor reset calls */ -#define WT_STAT_CONN_CURSOR_RESET 1239 +#define WT_STAT_CONN_CURSOR_RESET 1258 +/*! cursor: cursor reset calls that return an error */ +#define WT_STAT_CONN_CURSOR_RESET_ERROR 1259 /*! cursor: cursor search calls */ -#define WT_STAT_CONN_CURSOR_SEARCH 1240 +#define WT_STAT_CONN_CURSOR_SEARCH 1260 +/*! cursor: cursor search calls that return an error */ +#define WT_STAT_CONN_CURSOR_SEARCH_ERROR 1261 /*! cursor: cursor search history store calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_HS 1241 +#define WT_STAT_CONN_CURSOR_SEARCH_HS 1262 /*! cursor: cursor search near calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1242 +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1263 +/*! cursor: cursor search near calls that return an error */ +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR_ERROR 1264 /*! cursor: cursor sweep buckets */ -#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1243 +#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1265 /*! cursor: cursor sweep cursors closed */ -#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1244 +#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1266 /*! cursor: cursor sweep cursors examined */ -#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1245 +#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1267 /*! cursor: cursor sweeps */ -#define WT_STAT_CONN_CURSOR_SWEEP 1246 +#define WT_STAT_CONN_CURSOR_SWEEP 1268 /*! cursor: cursor truncate calls */ -#define WT_STAT_CONN_CURSOR_TRUNCATE 1247 +#define WT_STAT_CONN_CURSOR_TRUNCATE 1269 /*! cursor: cursor update calls */ -#define WT_STAT_CONN_CURSOR_UPDATE 1248 +#define WT_STAT_CONN_CURSOR_UPDATE 1270 +/*! cursor: cursor update calls that return an error */ +#define WT_STAT_CONN_CURSOR_UPDATE_ERROR 1271 /*! cursor: cursor update key and value bytes */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1249 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1272 /*! cursor: cursor update value size change */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1250 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1273 /*! cursor: cursors reused from cache */ -#define WT_STAT_CONN_CURSOR_REOPEN 1251 +#define WT_STAT_CONN_CURSOR_REOPEN 1274 /*! cursor: open cursor count */ -#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1252 +#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1275 /*! data-handle: connection data handle size */ -#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1253 +#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1276 /*! data-handle: connection data handles currently active */ -#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1254 +#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1277 /*! data-handle: connection sweep candidate became referenced */ -#define WT_STAT_CONN_DH_SWEEP_REF 1255 +#define WT_STAT_CONN_DH_SWEEP_REF 1278 /*! data-handle: connection sweep dhandles closed */ -#define WT_STAT_CONN_DH_SWEEP_CLOSE 1256 +#define WT_STAT_CONN_DH_SWEEP_CLOSE 1279 /*! data-handle: connection sweep dhandles removed from hash list */ -#define WT_STAT_CONN_DH_SWEEP_REMOVE 1257 +#define WT_STAT_CONN_DH_SWEEP_REMOVE 1280 /*! data-handle: connection sweep time-of-death sets */ -#define WT_STAT_CONN_DH_SWEEP_TOD 1258 +#define WT_STAT_CONN_DH_SWEEP_TOD 1281 /*! data-handle: connection sweeps */ -#define WT_STAT_CONN_DH_SWEEPS 1259 +#define WT_STAT_CONN_DH_SWEEPS 1282 /*! * data-handle: connection sweeps skipped due to checkpoint gathering * handles */ -#define WT_STAT_CONN_DH_SWEEP_SKIP_CKPT 1260 +#define WT_STAT_CONN_DH_SWEEP_SKIP_CKPT 1283 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1261 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1284 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1262 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1285 /*! lock: checkpoint lock acquisitions */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1263 +#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1286 /*! lock: checkpoint lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1264 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1287 /*! lock: checkpoint lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1265 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1288 /*! lock: dhandle lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1266 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1289 /*! lock: dhandle lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1267 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1290 /*! lock: dhandle read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1268 +#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1291 /*! lock: dhandle write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1269 +#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1292 /*! * lock: durable timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1270 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1293 /*! * lock: durable timestamp queue lock internal thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1271 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1294 /*! lock: durable timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1272 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1295 /*! lock: durable timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1273 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1296 /*! lock: metadata lock acquisitions */ -#define WT_STAT_CONN_LOCK_METADATA_COUNT 1274 +#define WT_STAT_CONN_LOCK_METADATA_COUNT 1297 /*! lock: metadata lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1275 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1298 /*! lock: metadata lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1276 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1299 /*! * lock: read timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1277 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1300 /*! lock: read timestamp queue lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1278 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1301 /*! lock: read timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1279 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1302 /*! lock: read timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1280 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1303 /*! lock: schema lock acquisitions */ -#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1281 +#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1304 /*! lock: schema lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1282 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1305 /*! lock: schema lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1283 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1306 /*! * lock: table lock application thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1284 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1307 /*! * lock: table lock internal thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1285 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1308 /*! lock: table read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1286 +#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1309 /*! lock: table write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1287 +#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1310 /*! lock: txn global lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1288 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1311 /*! lock: txn global lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1289 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1312 /*! lock: txn global read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1290 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1313 /*! lock: txn global write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1291 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1314 /*! log: busy returns attempting to switch slots */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1292 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1315 /*! log: force log remove time sleeping (usecs) */ -#define WT_STAT_CONN_LOG_FORCE_REMOVE_SLEEP 1293 +#define WT_STAT_CONN_LOG_FORCE_REMOVE_SLEEP 1316 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1294 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1317 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1295 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1318 /*! log: log files manually zero-filled */ -#define WT_STAT_CONN_LOG_ZERO_FILLS 1296 +#define WT_STAT_CONN_LOG_ZERO_FILLS 1319 /*! log: log flush operations */ -#define WT_STAT_CONN_LOG_FLUSH 1297 +#define WT_STAT_CONN_LOG_FLUSH 1320 /*! log: log force write operations */ -#define WT_STAT_CONN_LOG_FORCE_WRITE 1298 +#define WT_STAT_CONN_LOG_FORCE_WRITE 1321 /*! log: log force write operations skipped */ -#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1299 +#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1322 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1300 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1323 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1301 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1324 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1302 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1325 /*! log: log release advances write LSN */ -#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1303 +#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1326 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1304 +#define WT_STAT_CONN_LOG_SCANS 1327 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1305 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1328 /*! log: log server thread advances write LSN */ -#define WT_STAT_CONN_LOG_WRITE_LSN 1306 +#define WT_STAT_CONN_LOG_WRITE_LSN 1329 /*! log: log server thread write LSN walk skipped */ -#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1307 +#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1330 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1308 +#define WT_STAT_CONN_LOG_SYNC 1331 /*! log: log sync time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DURATION 1309 +#define WT_STAT_CONN_LOG_SYNC_DURATION 1332 /*! log: log sync_dir operations */ -#define WT_STAT_CONN_LOG_SYNC_DIR 1310 +#define WT_STAT_CONN_LOG_SYNC_DIR 1333 /*! log: log sync_dir time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1311 +#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1334 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1312 +#define WT_STAT_CONN_LOG_WRITES 1335 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1313 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1336 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1314 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1337 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1315 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1338 /*! log: pre-allocated log files not ready and missed */ -#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1316 +#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1339 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1317 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1340 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1318 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1341 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1319 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1342 /*! log: slot close lost race */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1320 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1343 /*! log: slot close unbuffered waits */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1321 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1344 /*! log: slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1322 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1345 /*! log: slot join atomic update races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1323 +#define WT_STAT_CONN_LOG_SLOT_RACES 1346 /*! log: slot join calls atomic updates raced */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1324 +#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1347 /*! log: slot join calls did not yield */ -#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1325 +#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1348 /*! log: slot join calls found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1326 +#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1349 /*! log: slot join calls slept */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1327 +#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1350 /*! log: slot join calls yielded */ -#define WT_STAT_CONN_LOG_SLOT_YIELD 1328 +#define WT_STAT_CONN_LOG_SLOT_YIELD 1351 /*! log: slot join found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1329 +#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1352 /*! log: slot joins yield time (usecs) */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1330 +#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1353 /*! log: slot transitions unable to find free slot */ -#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1331 +#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1354 /*! log: slot unbuffered writes */ -#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1332 +#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1355 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1333 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1356 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1334 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1357 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1335 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1358 /*! log: written slots coalesced */ -#define WT_STAT_CONN_LOG_SLOT_COALESCED 1336 +#define WT_STAT_CONN_LOG_SLOT_COALESCED 1359 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1337 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1360 /*! perf: file system read latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1338 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1361 /*! perf: file system read latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1339 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1362 /*! perf: file system read latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1340 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1363 /*! perf: file system read latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1341 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1364 /*! perf: file system read latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1342 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1365 /*! perf: file system read latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1343 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1366 /*! perf: file system write latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1344 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1367 /*! perf: file system write latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1345 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1368 /*! perf: file system write latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1346 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1369 /*! perf: file system write latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1347 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1370 /*! perf: file system write latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1348 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1371 /*! perf: file system write latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1349 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1372 /*! perf: operation read latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1350 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1373 /*! perf: operation read latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1351 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1374 /*! perf: operation read latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1352 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1375 /*! perf: operation read latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1353 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1376 /*! perf: operation read latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1354 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1377 /*! perf: operation write latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1355 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1378 /*! perf: operation write latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1356 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1379 /*! perf: operation write latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1357 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1380 /*! perf: operation write latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1358 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1381 /*! perf: operation write latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1359 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1382 /*! reconciliation: approximate byte size of timestamps in pages written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1360 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1383 /*! * reconciliation: approximate byte size of transaction IDs in pages * written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1361 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1384 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1362 +#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1385 /*! reconciliation: leaf-page overflow keys */ -#define WT_STAT_CONN_REC_OVERFLOW_KEY_LEAF 1363 +#define WT_STAT_CONN_REC_OVERFLOW_KEY_LEAF 1386 /*! reconciliation: maximum seconds spent in a reconciliation call */ -#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1364 +#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1387 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1365 +#define WT_STAT_CONN_REC_PAGES 1388 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1366 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1389 /*! * reconciliation: page reconciliation calls that resulted in values with * prepared transaction metadata */ -#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1367 +#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1390 /*! * reconciliation: page reconciliation calls that resulted in values with * timestamps */ -#define WT_STAT_CONN_REC_PAGES_WITH_TS 1368 +#define WT_STAT_CONN_REC_PAGES_WITH_TS 1391 /*! * reconciliation: page reconciliation calls that resulted in values with * transaction ids */ -#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1369 +#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1392 /*! reconciliation: pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE 1370 +#define WT_STAT_CONN_REC_PAGE_DELETE 1393 /*! * reconciliation: pages written including an aggregated newest start * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1371 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1394 /*! * reconciliation: pages written including an aggregated newest stop * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1372 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1395 /*! * reconciliation: pages written including an aggregated newest stop * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1373 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1396 /*! * reconciliation: pages written including an aggregated newest stop * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1374 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1397 /*! * reconciliation: pages written including an aggregated newest * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_TXN 1375 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_TXN 1398 /*! * reconciliation: pages written including an aggregated oldest start * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1376 +#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1399 /*! reconciliation: pages written including an aggregated prepare */ -#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1377 +#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1400 /*! reconciliation: pages written including at least one prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1378 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1401 /*! * reconciliation: pages written including at least one start durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1379 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1402 /*! reconciliation: pages written including at least one start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1380 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1403 /*! * reconciliation: pages written including at least one start transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1381 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1404 /*! * reconciliation: pages written including at least one stop durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1382 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1405 /*! reconciliation: pages written including at least one stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1383 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1406 /*! * reconciliation: pages written including at least one stop transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1384 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1407 /*! reconciliation: records written including a prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1385 +#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1408 /*! reconciliation: records written including a start durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1386 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1409 /*! reconciliation: records written including a start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1387 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1410 /*! reconciliation: records written including a start transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1388 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1411 /*! reconciliation: records written including a stop durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1389 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1412 /*! reconciliation: records written including a stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1390 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1413 /*! reconciliation: records written including a stop transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1391 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1414 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1392 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1415 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1393 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1416 /*! session: attempts to remove a local object and the object is in use */ -#define WT_STAT_CONN_LOCAL_OBJECTS_INUSE 1394 +#define WT_STAT_CONN_LOCAL_OBJECTS_INUSE 1417 /*! session: flush_tier operation calls */ -#define WT_STAT_CONN_FLUSH_TIER 1395 +#define WT_STAT_CONN_FLUSH_TIER 1418 /*! session: flush_tier tables skipped due to no checkpoint */ -#define WT_STAT_CONN_FLUSH_TIER_SKIPPED 1396 +#define WT_STAT_CONN_FLUSH_TIER_SKIPPED 1419 /*! session: flush_tier tables switched */ -#define WT_STAT_CONN_FLUSH_TIER_SWITCHED 1397 +#define WT_STAT_CONN_FLUSH_TIER_SWITCHED 1420 /*! session: local objects removed */ -#define WT_STAT_CONN_LOCAL_OBJECTS_REMOVED 1398 +#define WT_STAT_CONN_LOCAL_OBJECTS_REMOVED 1421 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1399 +#define WT_STAT_CONN_SESSION_OPEN 1422 /*! session: session query timestamp calls */ -#define WT_STAT_CONN_SESSION_QUERY_TS 1400 +#define WT_STAT_CONN_SESSION_QUERY_TS 1423 /*! session: table alter failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1401 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1424 /*! session: table alter successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1402 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1425 /*! session: table alter triggering checkpoint calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_TRIGGER_CHECKPOINT 1403 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_TRIGGER_CHECKPOINT 1426 /*! session: table alter unchanged and skipped */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1404 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1427 /*! session: table compact failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1405 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1428 /*! session: table compact failed calls due to cache pressure */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL_CACHE_PRESSURE 1406 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL_CACHE_PRESSURE 1429 /*! session: table compact running */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_RUNNING 1407 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_RUNNING 1430 /*! session: table compact skipped as process would not reduce file size */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SKIPPED 1408 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SKIPPED 1431 /*! session: table compact successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1409 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1432 /*! session: table compact timeout */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_TIMEOUT 1410 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_TIMEOUT 1433 /*! session: table create failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1411 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1434 /*! session: table create successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1412 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1435 /*! session: table drop failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1413 +#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1436 /*! session: table drop successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1414 +#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1437 /*! session: table rename failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1415 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1438 /*! session: table rename successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1416 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1439 /*! session: table salvage failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1417 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1440 /*! session: table salvage successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1418 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1441 /*! session: table truncate failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1419 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1442 /*! session: table truncate successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1420 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1443 /*! session: table verify failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1421 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1444 /*! session: table verify successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1422 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1445 /*! session: tiered operations dequeued and processed */ -#define WT_STAT_CONN_TIERED_WORK_UNITS_DEQUEUED 1423 +#define WT_STAT_CONN_TIERED_WORK_UNITS_DEQUEUED 1446 /*! session: tiered operations scheduled */ -#define WT_STAT_CONN_TIERED_WORK_UNITS_CREATED 1424 +#define WT_STAT_CONN_TIERED_WORK_UNITS_CREATED 1447 /*! session: tiered storage local retention time (secs) */ -#define WT_STAT_CONN_TIERED_RETENTION 1425 +#define WT_STAT_CONN_TIERED_RETENTION 1448 /*! thread-state: active filesystem fsync calls */ -#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1426 +#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1449 /*! thread-state: active filesystem read calls */ -#define WT_STAT_CONN_THREAD_READ_ACTIVE 1427 +#define WT_STAT_CONN_THREAD_READ_ACTIVE 1450 /*! thread-state: active filesystem write calls */ -#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1428 +#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1451 /*! thread-yield: application thread time evicting (usecs) */ -#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1429 +#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1452 /*! thread-yield: application thread time waiting for cache (usecs) */ -#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1430 +#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1453 /*! * thread-yield: connection close blocked waiting for transaction state * stabilization */ -#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1431 +#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1454 /*! thread-yield: connection close yielded for lsm manager shutdown */ -#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1432 +#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1455 /*! thread-yield: data handle lock yielded */ -#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1433 +#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1456 /*! * thread-yield: get reference for page index and slot time sleeping * (usecs) */ -#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1434 +#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1457 /*! thread-yield: page access yielded due to prepare state change */ -#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1435 +#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1458 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1436 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1459 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1437 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1460 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1438 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1461 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1439 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1462 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1440 +#define WT_STAT_CONN_PAGE_SLEEP 1463 /*! * thread-yield: page delete rollback time sleeping for state change * (usecs) */ -#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1441 +#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1464 /*! thread-yield: page reconciliation yielded due to child modification */ -#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1442 +#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1465 /*! transaction: Number of prepared updates */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES 1443 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES 1466 /*! transaction: Number of prepared updates committed */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COMMITTED 1444 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COMMITTED 1467 /*! transaction: Number of prepared updates repeated on the same key */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_KEY_REPEATED 1445 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_KEY_REPEATED 1468 /*! transaction: Number of prepared updates rolled back */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_ROLLEDBACK 1446 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_ROLLEDBACK 1469 /*! transaction: prepared transactions */ -#define WT_STAT_CONN_TXN_PREPARE 1447 +#define WT_STAT_CONN_TXN_PREPARE 1470 /*! transaction: prepared transactions committed */ -#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1448 +#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1471 /*! transaction: prepared transactions currently active */ -#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1449 +#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1472 /*! transaction: prepared transactions rolled back */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1450 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1473 /*! * transaction: prepared transactions rolled back and do not remove the * history store entry */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK_DO_NOT_REMOVE_HS_UPDATE 1451 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK_DO_NOT_REMOVE_HS_UPDATE 1474 /*! * transaction: prepared transactions rolled back and fix the history * store entry with checkpoint reserved transaction id */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK_FIX_HS_UPDATE_WITH_CKPT_RESERVED_TXNID 1452 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK_FIX_HS_UPDATE_WITH_CKPT_RESERVED_TXNID 1475 /*! transaction: query timestamp calls */ -#define WT_STAT_CONN_TXN_QUERY_TS 1453 +#define WT_STAT_CONN_TXN_QUERY_TS 1476 /*! transaction: race to read prepared update retry */ -#define WT_STAT_CONN_TXN_READ_RACE_PREPARE_UPDATE 1454 +#define WT_STAT_CONN_TXN_READ_RACE_PREPARE_UPDATE 1477 /*! transaction: rollback to stable calls */ -#define WT_STAT_CONN_TXN_RTS 1455 +#define WT_STAT_CONN_TXN_RTS 1478 /*! * transaction: rollback to stable history store records with stop * timestamps older than newer records */ -#define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1456 +#define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1479 /*! transaction: rollback to stable inconsistent checkpoint */ -#define WT_STAT_CONN_TXN_RTS_INCONSISTENT_CKPT 1457 +#define WT_STAT_CONN_TXN_RTS_INCONSISTENT_CKPT 1480 /*! transaction: rollback to stable keys removed */ -#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1458 +#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1481 /*! transaction: rollback to stable keys restored */ -#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1459 +#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1482 /*! transaction: rollback to stable pages visited */ -#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1460 +#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1483 /*! transaction: rollback to stable restored tombstones from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1461 +#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1484 /*! transaction: rollback to stable restored updates from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_UPDATES 1462 +#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_UPDATES 1485 /*! transaction: rollback to stable skipping delete rle */ -#define WT_STAT_CONN_TXN_RTS_DELETE_RLE_SKIPPED 1463 +#define WT_STAT_CONN_TXN_RTS_DELETE_RLE_SKIPPED 1486 /*! transaction: rollback to stable skipping stable rle */ -#define WT_STAT_CONN_TXN_RTS_STABLE_RLE_SKIPPED 1464 +#define WT_STAT_CONN_TXN_RTS_STABLE_RLE_SKIPPED 1487 /*! transaction: rollback to stable sweeping history store keys */ -#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1465 +#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1488 /*! transaction: rollback to stable tree walk skipping pages */ -#define WT_STAT_CONN_TXN_RTS_TREE_WALK_SKIP_PAGES 1466 +#define WT_STAT_CONN_TXN_RTS_TREE_WALK_SKIP_PAGES 1489 /*! transaction: rollback to stable updates aborted */ -#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1467 +#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1490 /*! transaction: rollback to stable updates removed from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1468 +#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1491 /*! transaction: sessions scanned in each walk of concurrent sessions */ -#define WT_STAT_CONN_TXN_SESSIONS_WALKED 1469 +#define WT_STAT_CONN_TXN_SESSIONS_WALKED 1492 /*! transaction: set timestamp calls */ -#define WT_STAT_CONN_TXN_SET_TS 1470 +#define WT_STAT_CONN_TXN_SET_TS 1493 /*! transaction: set timestamp durable calls */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1471 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1494 /*! transaction: set timestamp durable updates */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1472 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1495 /*! transaction: set timestamp oldest calls */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1473 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1496 /*! transaction: set timestamp oldest updates */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1474 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1497 /*! transaction: set timestamp stable calls */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE 1475 +#define WT_STAT_CONN_TXN_SET_TS_STABLE 1498 /*! transaction: set timestamp stable updates */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1476 +#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1499 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1477 +#define WT_STAT_CONN_TXN_BEGIN 1500 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1478 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1501 /*! * transaction: transaction checkpoint currently running for history * store file */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING_HS 1479 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING_HS 1502 /*! transaction: transaction checkpoint generation */ -#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1480 +#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1503 /*! * transaction: transaction checkpoint history store file duration * (usecs) */ -#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1481 +#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1504 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1482 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1505 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1483 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1506 /*! * transaction: transaction checkpoint most recent duration for gathering * all handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1484 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1507 /*! * transaction: transaction checkpoint most recent duration for gathering * applied handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1485 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1508 /*! * transaction: transaction checkpoint most recent duration for gathering * skipped handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1486 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1509 /*! transaction: transaction checkpoint most recent handles applied */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1487 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1510 /*! transaction: transaction checkpoint most recent handles skipped */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1488 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1511 /*! transaction: transaction checkpoint most recent handles walked */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1489 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1512 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1490 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1513 /*! transaction: transaction checkpoint prepare currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1491 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1514 /*! transaction: transaction checkpoint prepare max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1492 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1515 /*! transaction: transaction checkpoint prepare min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1493 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1516 /*! transaction: transaction checkpoint prepare most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1494 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1517 /*! transaction: transaction checkpoint prepare total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1495 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1518 /*! transaction: transaction checkpoint scrub dirty target */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1496 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1519 /*! transaction: transaction checkpoint scrub time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1497 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1520 /*! transaction: transaction checkpoint stop timing stress active */ -#define WT_STAT_CONN_TXN_CHECKPOINT_STOP_STRESS_ACTIVE 1498 +#define WT_STAT_CONN_TXN_CHECKPOINT_STOP_STRESS_ACTIVE 1521 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1499 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1522 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1500 +#define WT_STAT_CONN_TXN_CHECKPOINT 1523 /*! transaction: transaction checkpoints due to obsolete pages */ -#define WT_STAT_CONN_TXN_CHECKPOINT_OBSOLETE_APPLIED 1501 +#define WT_STAT_CONN_TXN_CHECKPOINT_OBSOLETE_APPLIED 1524 /*! * transaction: transaction checkpoints skipped because database was * clean */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1502 +#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1525 /*! transaction: transaction failures due to history store */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1503 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1526 /*! * transaction: transaction fsync calls for checkpoint after allocating * the transaction ID */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1504 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1527 /*! * transaction: transaction fsync duration for checkpoint after * allocating the transaction ID (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1505 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1528 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1506 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1529 /*! transaction: transaction range of IDs currently pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1507 +#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1530 /*! transaction: transaction range of timestamps currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1508 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1531 /*! transaction: transaction range of timestamps pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1509 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1532 /*! * transaction: transaction range of timestamps pinned by the oldest * active read timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1510 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1533 /*! * transaction: transaction range of timestamps pinned by the oldest * timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1511 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1534 /*! transaction: transaction read timestamp of the oldest active reader */ -#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1512 +#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1535 /*! transaction: transaction rollback to stable currently running */ -#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE_RUNNING 1513 +#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE_RUNNING 1536 /*! transaction: transaction walk of concurrent sessions */ -#define WT_STAT_CONN_TXN_WALK_SESSIONS 1514 +#define WT_STAT_CONN_TXN_WALK_SESSIONS 1537 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1515 +#define WT_STAT_CONN_TXN_COMMIT 1538 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1516 +#define WT_STAT_CONN_TXN_ROLLBACK 1539 /*! transaction: update conflicts */ -#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1517 +#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1540 /*! * @} @@ -6916,209 +6974,255 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_DSRC_CURSOR_CACHE 2151 /*! cursor: create calls */ #define WT_STAT_DSRC_CURSOR_CREATE 2152 +/*! cursor: cursor bound calls that return an error */ +#define WT_STAT_DSRC_CURSOR_BOUND_ERROR 2153 +/*! cursor: cursor bounds cleared from reset */ +#define WT_STAT_DSRC_CURSOR_BOUNDS_RESET 2154 +/*! cursor: cursor cache calls that return an error */ +#define WT_STAT_DSRC_CURSOR_CACHE_ERROR 2155 +/*! cursor: cursor close calls that return an error */ +#define WT_STAT_DSRC_CURSOR_CLOSE_ERROR 2156 +/*! cursor: cursor compare calls that return an error */ +#define WT_STAT_DSRC_CURSOR_COMPARE_ERROR 2157 +/*! cursor: cursor equals calls that return an error */ +#define WT_STAT_DSRC_CURSOR_EQUALS_ERROR 2158 +/*! cursor: cursor get key calls that return an error */ +#define WT_STAT_DSRC_CURSOR_GET_KEY_ERROR 2159 +/*! cursor: cursor get key calls that return an error */ +#define WT_STAT_DSRC_CURSOR_GET_VALUE_ERROR 2160 +/*! cursor: cursor insert calls that return an error */ +#define WT_STAT_DSRC_CURSOR_INSERT_ERROR 2161 +/*! cursor: cursor insert check calls that return an error */ +#define WT_STAT_DSRC_CURSOR_INSERT_CHECK_ERROR 2162 +/*! cursor: cursor largest key calls that return an error */ +#define WT_STAT_DSRC_CURSOR_LARGEST_KEY_ERROR 2163 +/*! cursor: cursor modify calls that return an error */ +#define WT_STAT_DSRC_CURSOR_MODIFY_ERROR 2164 +/*! cursor: cursor next calls that return an error */ +#define WT_STAT_DSRC_CURSOR_NEXT_ERROR 2165 /*! * cursor: cursor next calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_DSRC_CURSOR_NEXT_HS_TOMBSTONE 2153 +#define WT_STAT_DSRC_CURSOR_NEXT_HS_TOMBSTONE 2166 /*! * cursor: cursor next calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100 2154 +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100 2167 /*! cursor: cursor next calls that skip less than 100 entries */ -#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100 2155 +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100 2168 +/*! cursor: cursor prev calls that return an error */ +#define WT_STAT_DSRC_CURSOR_PREV_ERROR 2169 /*! * cursor: cursor prev calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_DSRC_CURSOR_PREV_HS_TOMBSTONE 2156 +#define WT_STAT_DSRC_CURSOR_PREV_HS_TOMBSTONE 2170 /*! * cursor: cursor prev calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100 2157 +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100 2171 /*! cursor: cursor prev calls that skip less than 100 entries */ -#define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100 2158 +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100 2172 +/*! cursor: cursor random next calls that return an error */ +#define WT_STAT_DSRC_CURSOR_NEXT_RANDOM_ERROR 2173 +/*! cursor: cursor reconfigure calls that return an error */ +#define WT_STAT_DSRC_CURSOR_RECONFIGURE_ERROR 2174 +/*! cursor: cursor remove calls that return an error */ +#define WT_STAT_DSRC_CURSOR_REMOVE_ERROR 2175 +/*! cursor: cursor reopen calls that return an error */ +#define WT_STAT_DSRC_CURSOR_REOPEN_ERROR 2176 +/*! cursor: cursor reserve calls that return an error */ +#define WT_STAT_DSRC_CURSOR_RESERVE_ERROR 2177 +/*! cursor: cursor reset calls that return an error */ +#define WT_STAT_DSRC_CURSOR_RESET_ERROR 2178 +/*! cursor: cursor search calls that return an error */ +#define WT_STAT_DSRC_CURSOR_SEARCH_ERROR 2179 +/*! cursor: cursor search near calls that return an error */ +#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR_ERROR 2180 +/*! cursor: cursor update calls that return an error */ +#define WT_STAT_DSRC_CURSOR_UPDATE_ERROR 2181 /*! cursor: insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT 2159 +#define WT_STAT_DSRC_CURSOR_INSERT 2182 /*! cursor: insert key and value bytes */ -#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2160 +#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2183 /*! cursor: modify */ -#define WT_STAT_DSRC_CURSOR_MODIFY 2161 +#define WT_STAT_DSRC_CURSOR_MODIFY 2184 /*! cursor: modify key and value bytes affected */ -#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2162 +#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2185 /*! cursor: modify value bytes modified */ -#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2163 +#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2186 /*! cursor: next calls */ -#define WT_STAT_DSRC_CURSOR_NEXT 2164 +#define WT_STAT_DSRC_CURSOR_NEXT 2187 /*! cursor: open cursor count */ -#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2165 +#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2188 /*! cursor: operation restarted */ -#define WT_STAT_DSRC_CURSOR_RESTART 2166 +#define WT_STAT_DSRC_CURSOR_RESTART 2189 /*! cursor: prev calls */ -#define WT_STAT_DSRC_CURSOR_PREV 2167 +#define WT_STAT_DSRC_CURSOR_PREV 2190 /*! cursor: remove calls */ -#define WT_STAT_DSRC_CURSOR_REMOVE 2168 +#define WT_STAT_DSRC_CURSOR_REMOVE 2191 /*! cursor: remove key bytes removed */ -#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2169 +#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2192 /*! cursor: reserve calls */ -#define WT_STAT_DSRC_CURSOR_RESERVE 2170 +#define WT_STAT_DSRC_CURSOR_RESERVE 2193 /*! cursor: reset calls */ -#define WT_STAT_DSRC_CURSOR_RESET 2171 +#define WT_STAT_DSRC_CURSOR_RESET 2194 /*! cursor: search calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH 2172 +#define WT_STAT_DSRC_CURSOR_SEARCH 2195 /*! cursor: search history store calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH_HS 2173 +#define WT_STAT_DSRC_CURSOR_SEARCH_HS 2196 /*! cursor: search near calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2174 +#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2197 /*! cursor: truncate calls */ -#define WT_STAT_DSRC_CURSOR_TRUNCATE 2175 +#define WT_STAT_DSRC_CURSOR_TRUNCATE 2198 /*! cursor: update calls */ -#define WT_STAT_DSRC_CURSOR_UPDATE 2176 +#define WT_STAT_DSRC_CURSOR_UPDATE 2199 /*! cursor: update key and value bytes */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2177 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2200 /*! cursor: update value size change */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2178 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2201 /*! reconciliation: approximate byte size of timestamps in pages written */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2179 +#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2202 /*! * reconciliation: approximate byte size of transaction IDs in pages * written */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2180 +#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2203 /*! reconciliation: dictionary matches */ -#define WT_STAT_DSRC_REC_DICTIONARY 2181 +#define WT_STAT_DSRC_REC_DICTIONARY 2204 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2182 +#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2205 /*! * reconciliation: internal page key bytes discarded using suffix * compression */ -#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2183 +#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2206 /*! reconciliation: internal page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2184 +#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2207 /*! reconciliation: leaf page key bytes discarded using prefix compression */ -#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2185 +#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2208 /*! reconciliation: leaf page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2186 +#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2209 /*! reconciliation: leaf-page overflow keys */ -#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2187 +#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2210 /*! reconciliation: maximum blocks required for a page */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2188 +#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2211 /*! reconciliation: overflow values written */ -#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2189 +#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2212 /*! reconciliation: page checksum matches */ -#define WT_STAT_DSRC_REC_PAGE_MATCH 2190 +#define WT_STAT_DSRC_REC_PAGE_MATCH 2213 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_DSRC_REC_PAGES 2191 +#define WT_STAT_DSRC_REC_PAGES 2214 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_DSRC_REC_PAGES_EVICTION 2192 +#define WT_STAT_DSRC_REC_PAGES_EVICTION 2215 /*! reconciliation: pages deleted */ -#define WT_STAT_DSRC_REC_PAGE_DELETE 2193 +#define WT_STAT_DSRC_REC_PAGE_DELETE 2216 /*! * reconciliation: pages written including an aggregated newest start * durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2194 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2217 /*! * reconciliation: pages written including an aggregated newest stop * durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2195 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2218 /*! * reconciliation: pages written including an aggregated newest stop * timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2196 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2219 /*! * reconciliation: pages written including an aggregated newest stop * transaction ID */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2197 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2220 /*! * reconciliation: pages written including an aggregated newest * transaction ID */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_TXN 2198 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_TXN 2221 /*! * reconciliation: pages written including an aggregated oldest start * timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2199 +#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2222 /*! reconciliation: pages written including an aggregated prepare */ -#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2200 +#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2223 /*! reconciliation: pages written including at least one prepare */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2201 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2224 /*! * reconciliation: pages written including at least one start durable * timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2202 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2225 /*! reconciliation: pages written including at least one start timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2203 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2226 /*! * reconciliation: pages written including at least one start transaction * ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2204 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2227 /*! * reconciliation: pages written including at least one stop durable * timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2205 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2228 /*! reconciliation: pages written including at least one stop timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2206 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2229 /*! * reconciliation: pages written including at least one stop transaction * ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2207 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2230 /*! reconciliation: records written including a prepare */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2208 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2231 /*! reconciliation: records written including a start durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2209 +#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2232 /*! reconciliation: records written including a start timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2210 +#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2233 /*! reconciliation: records written including a start transaction ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2211 +#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2234 /*! reconciliation: records written including a stop durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2212 +#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2235 /*! reconciliation: records written including a stop timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2213 +#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2236 /*! reconciliation: records written including a stop transaction ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2214 +#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2237 /*! session: object compaction */ -#define WT_STAT_DSRC_SESSION_COMPACT 2215 +#define WT_STAT_DSRC_SESSION_COMPACT 2238 /*! transaction: race to read prepared update retry */ -#define WT_STAT_DSRC_TXN_READ_RACE_PREPARE_UPDATE 2216 +#define WT_STAT_DSRC_TXN_READ_RACE_PREPARE_UPDATE 2239 /*! * transaction: rollback to stable history store records with stop * timestamps older than newer records */ -#define WT_STAT_DSRC_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 2217 +#define WT_STAT_DSRC_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 2240 /*! transaction: rollback to stable inconsistent checkpoint */ -#define WT_STAT_DSRC_TXN_RTS_INCONSISTENT_CKPT 2218 +#define WT_STAT_DSRC_TXN_RTS_INCONSISTENT_CKPT 2241 /*! transaction: rollback to stable keys removed */ -#define WT_STAT_DSRC_TXN_RTS_KEYS_REMOVED 2219 +#define WT_STAT_DSRC_TXN_RTS_KEYS_REMOVED 2242 /*! transaction: rollback to stable keys restored */ -#define WT_STAT_DSRC_TXN_RTS_KEYS_RESTORED 2220 +#define WT_STAT_DSRC_TXN_RTS_KEYS_RESTORED 2243 /*! transaction: rollback to stable restored tombstones from history store */ -#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_TOMBSTONES 2221 +#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_TOMBSTONES 2244 /*! transaction: rollback to stable restored updates from history store */ -#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_UPDATES 2222 +#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_UPDATES 2245 /*! transaction: rollback to stable skipping delete rle */ -#define WT_STAT_DSRC_TXN_RTS_DELETE_RLE_SKIPPED 2223 +#define WT_STAT_DSRC_TXN_RTS_DELETE_RLE_SKIPPED 2246 /*! transaction: rollback to stable skipping stable rle */ -#define WT_STAT_DSRC_TXN_RTS_STABLE_RLE_SKIPPED 2224 +#define WT_STAT_DSRC_TXN_RTS_STABLE_RLE_SKIPPED 2247 /*! transaction: rollback to stable sweeping history store keys */ -#define WT_STAT_DSRC_TXN_RTS_SWEEP_HS_KEYS 2225 +#define WT_STAT_DSRC_TXN_RTS_SWEEP_HS_KEYS 2248 /*! transaction: rollback to stable updates removed from history store */ -#define WT_STAT_DSRC_TXN_RTS_HS_REMOVED 2226 +#define WT_STAT_DSRC_TXN_RTS_HS_REMOVED 2249 /*! transaction: transaction checkpoints due to obsolete pages */ -#define WT_STAT_DSRC_TXN_CHECKPOINT_OBSOLETE_APPLIED 2227 +#define WT_STAT_DSRC_TXN_CHECKPOINT_OBSOLETE_APPLIED 2250 /*! transaction: update conflicts */ -#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2228 +#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2251 /*! * @} diff --git a/src/third_party/wiredtiger/src/reconcile/rec_track.c b/src/third_party/wiredtiger/src/reconcile/rec_track.c index d10590d453c..72d2e2388ab 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_track.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_track.c @@ -34,6 +34,10 @@ __ovfl_discard_verbose(WT_SESSION_IMPL *session, WT_PAGE *page, WT_CELL *cell, c WT_CELL_UNPACK_KV *unpack, _unpack; WT_DECL_ITEM(tmp); + /* Because we dereference the page pointer, it can't be NULL */ + if (page == NULL) + WT_RET(EINVAL); + WT_RET(__wt_scr_alloc(session, 512, &tmp)); unpack = &_unpack; diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index 9b693ac814f..5aaaf0ac917 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -168,12 +168,35 @@ static const char *const __stats_dsrc_desc[] = { "cursor: cache cursors reuse count", "cursor: close calls that result in cache", "cursor: create calls", + "cursor: cursor bound calls that return an error", + "cursor: cursor bounds cleared from reset", + "cursor: cursor cache calls that return an error", + "cursor: cursor close calls that return an error", + "cursor: cursor compare calls that return an error", + "cursor: cursor equals calls that return an error", + "cursor: cursor get key calls that return an error", + "cursor: cursor get key calls that return an error", + "cursor: cursor insert calls that return an error", + "cursor: cursor insert check calls that return an error", + "cursor: cursor largest key calls that return an error", + "cursor: cursor modify calls that return an error", + "cursor: cursor next calls that return an error", "cursor: cursor next calls that skip due to a globally visible history store tombstone", "cursor: cursor next calls that skip greater than or equal to 100 entries", "cursor: cursor next calls that skip less than 100 entries", + "cursor: cursor prev calls that return an error", "cursor: cursor prev calls that skip due to a globally visible history store tombstone", "cursor: cursor prev calls that skip greater than or equal to 100 entries", "cursor: cursor prev calls that skip less than 100 entries", + "cursor: cursor random next calls that return an error", + "cursor: cursor reconfigure calls that return an error", + "cursor: cursor remove calls that return an error", + "cursor: cursor reopen calls that return an error", + "cursor: cursor reserve calls that return an error", + "cursor: cursor reset calls that return an error", + "cursor: cursor search calls that return an error", + "cursor: cursor search near calls that return an error", + "cursor: cursor update calls that return an error", "cursor: insert calls", "cursor: insert key and value bytes", "cursor: modify", @@ -438,12 +461,35 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->cursor_reopen = 0; stats->cursor_cache = 0; stats->cursor_create = 0; + stats->cursor_bound_error = 0; + stats->cursor_bounds_reset = 0; + stats->cursor_cache_error = 0; + stats->cursor_close_error = 0; + stats->cursor_compare_error = 0; + stats->cursor_equals_error = 0; + stats->cursor_get_key_error = 0; + stats->cursor_get_value_error = 0; + stats->cursor_insert_error = 0; + stats->cursor_insert_check_error = 0; + stats->cursor_largest_key_error = 0; + stats->cursor_modify_error = 0; + stats->cursor_next_error = 0; stats->cursor_next_hs_tombstone = 0; stats->cursor_next_skip_ge_100 = 0; stats->cursor_next_skip_lt_100 = 0; + stats->cursor_prev_error = 0; stats->cursor_prev_hs_tombstone = 0; stats->cursor_prev_skip_ge_100 = 0; stats->cursor_prev_skip_lt_100 = 0; + stats->cursor_next_random_error = 0; + stats->cursor_reconfigure_error = 0; + stats->cursor_remove_error = 0; + stats->cursor_reopen_error = 0; + stats->cursor_reserve_error = 0; + stats->cursor_reset_error = 0; + stats->cursor_search_error = 0; + stats->cursor_search_near_error = 0; + stats->cursor_update_error = 0; stats->cursor_insert = 0; stats->cursor_insert_bytes = 0; stats->cursor_modify = 0; @@ -696,12 +742,35 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->cursor_reopen += from->cursor_reopen; to->cursor_cache += from->cursor_cache; to->cursor_create += from->cursor_create; + to->cursor_bound_error += from->cursor_bound_error; + to->cursor_bounds_reset += from->cursor_bounds_reset; + to->cursor_cache_error += from->cursor_cache_error; + to->cursor_close_error += from->cursor_close_error; + to->cursor_compare_error += from->cursor_compare_error; + to->cursor_equals_error += from->cursor_equals_error; + to->cursor_get_key_error += from->cursor_get_key_error; + to->cursor_get_value_error += from->cursor_get_value_error; + to->cursor_insert_error += from->cursor_insert_error; + to->cursor_insert_check_error += from->cursor_insert_check_error; + to->cursor_largest_key_error += from->cursor_largest_key_error; + to->cursor_modify_error += from->cursor_modify_error; + to->cursor_next_error += from->cursor_next_error; to->cursor_next_hs_tombstone += from->cursor_next_hs_tombstone; to->cursor_next_skip_ge_100 += from->cursor_next_skip_ge_100; to->cursor_next_skip_lt_100 += from->cursor_next_skip_lt_100; + to->cursor_prev_error += from->cursor_prev_error; to->cursor_prev_hs_tombstone += from->cursor_prev_hs_tombstone; to->cursor_prev_skip_ge_100 += from->cursor_prev_skip_ge_100; to->cursor_prev_skip_lt_100 += from->cursor_prev_skip_lt_100; + to->cursor_next_random_error += from->cursor_next_random_error; + to->cursor_reconfigure_error += from->cursor_reconfigure_error; + to->cursor_remove_error += from->cursor_remove_error; + to->cursor_reopen_error += from->cursor_reopen_error; + to->cursor_reserve_error += from->cursor_reserve_error; + to->cursor_reset_error += from->cursor_reset_error; + to->cursor_search_error += from->cursor_search_error; + to->cursor_search_near_error += from->cursor_search_near_error; + to->cursor_update_error += from->cursor_update_error; to->cursor_insert += from->cursor_insert; to->cursor_insert_bytes += from->cursor_insert_bytes; to->cursor_modify += from->cursor_modify; @@ -958,12 +1027,35 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) to->cursor_reopen += WT_STAT_READ(from, cursor_reopen); to->cursor_cache += WT_STAT_READ(from, cursor_cache); to->cursor_create += WT_STAT_READ(from, cursor_create); + to->cursor_bound_error += WT_STAT_READ(from, cursor_bound_error); + to->cursor_bounds_reset += WT_STAT_READ(from, cursor_bounds_reset); + to->cursor_cache_error += WT_STAT_READ(from, cursor_cache_error); + to->cursor_close_error += WT_STAT_READ(from, cursor_close_error); + to->cursor_compare_error += WT_STAT_READ(from, cursor_compare_error); + to->cursor_equals_error += WT_STAT_READ(from, cursor_equals_error); + to->cursor_get_key_error += WT_STAT_READ(from, cursor_get_key_error); + to->cursor_get_value_error += WT_STAT_READ(from, cursor_get_value_error); + to->cursor_insert_error += WT_STAT_READ(from, cursor_insert_error); + to->cursor_insert_check_error += WT_STAT_READ(from, cursor_insert_check_error); + to->cursor_largest_key_error += WT_STAT_READ(from, cursor_largest_key_error); + to->cursor_modify_error += WT_STAT_READ(from, cursor_modify_error); + to->cursor_next_error += WT_STAT_READ(from, cursor_next_error); to->cursor_next_hs_tombstone += WT_STAT_READ(from, cursor_next_hs_tombstone); to->cursor_next_skip_ge_100 += WT_STAT_READ(from, cursor_next_skip_ge_100); to->cursor_next_skip_lt_100 += WT_STAT_READ(from, cursor_next_skip_lt_100); + to->cursor_prev_error += WT_STAT_READ(from, cursor_prev_error); to->cursor_prev_hs_tombstone += WT_STAT_READ(from, cursor_prev_hs_tombstone); to->cursor_prev_skip_ge_100 += WT_STAT_READ(from, cursor_prev_skip_ge_100); to->cursor_prev_skip_lt_100 += WT_STAT_READ(from, cursor_prev_skip_lt_100); + to->cursor_next_random_error += WT_STAT_READ(from, cursor_next_random_error); + to->cursor_reconfigure_error += WT_STAT_READ(from, cursor_reconfigure_error); + to->cursor_remove_error += WT_STAT_READ(from, cursor_remove_error); + to->cursor_reopen_error += WT_STAT_READ(from, cursor_reopen_error); + to->cursor_reserve_error += WT_STAT_READ(from, cursor_reserve_error); + to->cursor_reset_error += WT_STAT_READ(from, cursor_reset_error); + to->cursor_search_error += WT_STAT_READ(from, cursor_search_error); + to->cursor_search_near_error += WT_STAT_READ(from, cursor_search_near_error); + to->cursor_update_error += WT_STAT_READ(from, cursor_update_error); to->cursor_insert += WT_STAT_READ(from, cursor_insert); to->cursor_insert_bytes += WT_STAT_READ(from, cursor_insert_bytes); to->cursor_modify += WT_STAT_READ(from, cursor_modify); @@ -1278,36 +1370,59 @@ static const char *const __stats_connection_desc[] = { "cursor: Total number of times cursor temporarily releases pinned page to encourage eviction of " "hot or large page", "cursor: cached cursor count", + "cursor: cursor bound calls that return an error", + "cursor: cursor bounds cleared from reset", "cursor: cursor bulk loaded cursor insert calls", + "cursor: cursor cache calls that return an error", "cursor: cursor close calls that result in cache", + "cursor: cursor close calls that return an error", + "cursor: cursor compare calls that return an error", "cursor: cursor create calls", + "cursor: cursor equals calls that return an error", + "cursor: cursor get key calls that return an error", + "cursor: cursor get key calls that return an error", "cursor: cursor insert calls", + "cursor: cursor insert calls that return an error", + "cursor: cursor insert check calls that return an error", "cursor: cursor insert key and value bytes", + "cursor: cursor largest key calls that return an error", "cursor: cursor modify calls", + "cursor: cursor modify calls that return an error", "cursor: cursor modify key and value bytes affected", "cursor: cursor modify value bytes modified", "cursor: cursor next calls", + "cursor: cursor next calls that return an error", "cursor: cursor next calls that skip due to a globally visible history store tombstone", "cursor: cursor next calls that skip greater than or equal to 100 entries", "cursor: cursor next calls that skip less than 100 entries", "cursor: cursor operation restarted", "cursor: cursor prev calls", + "cursor: cursor prev calls that return an error", "cursor: cursor prev calls that skip due to a globally visible history store tombstone", "cursor: cursor prev calls that skip greater than or equal to 100 entries", "cursor: cursor prev calls that skip less than 100 entries", + "cursor: cursor random next calls that return an error", + "cursor: cursor reconfigure calls that return an error", "cursor: cursor remove calls", + "cursor: cursor remove calls that return an error", "cursor: cursor remove key bytes removed", + "cursor: cursor reopen calls that return an error", "cursor: cursor reserve calls", + "cursor: cursor reserve calls that return an error", "cursor: cursor reset calls", + "cursor: cursor reset calls that return an error", "cursor: cursor search calls", + "cursor: cursor search calls that return an error", "cursor: cursor search history store calls", "cursor: cursor search near calls", + "cursor: cursor search near calls that return an error", "cursor: cursor sweep buckets", "cursor: cursor sweep cursors closed", "cursor: cursor sweep cursors examined", "cursor: cursor sweeps", "cursor: cursor truncate calls", "cursor: cursor update calls", + "cursor: cursor update calls that return an error", "cursor: cursor update key and value bytes", "cursor: cursor update value size change", "cursor: cursors reused from cache", @@ -1840,36 +1955,59 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cursor_reposition_failed = 0; stats->cursor_reposition = 0; /* not clearing cursor_cached_count */ + stats->cursor_bound_error = 0; + stats->cursor_bounds_reset = 0; stats->cursor_insert_bulk = 0; + stats->cursor_cache_error = 0; stats->cursor_cache = 0; + stats->cursor_close_error = 0; + stats->cursor_compare_error = 0; stats->cursor_create = 0; + stats->cursor_equals_error = 0; + stats->cursor_get_key_error = 0; + stats->cursor_get_value_error = 0; stats->cursor_insert = 0; + stats->cursor_insert_error = 0; + stats->cursor_insert_check_error = 0; stats->cursor_insert_bytes = 0; + stats->cursor_largest_key_error = 0; stats->cursor_modify = 0; + stats->cursor_modify_error = 0; stats->cursor_modify_bytes = 0; stats->cursor_modify_bytes_touch = 0; stats->cursor_next = 0; + stats->cursor_next_error = 0; stats->cursor_next_hs_tombstone = 0; stats->cursor_next_skip_ge_100 = 0; stats->cursor_next_skip_lt_100 = 0; stats->cursor_restart = 0; stats->cursor_prev = 0; + stats->cursor_prev_error = 0; stats->cursor_prev_hs_tombstone = 0; stats->cursor_prev_skip_ge_100 = 0; stats->cursor_prev_skip_lt_100 = 0; + stats->cursor_next_random_error = 0; + stats->cursor_reconfigure_error = 0; stats->cursor_remove = 0; + stats->cursor_remove_error = 0; stats->cursor_remove_bytes = 0; + stats->cursor_reopen_error = 0; stats->cursor_reserve = 0; + stats->cursor_reserve_error = 0; stats->cursor_reset = 0; + stats->cursor_reset_error = 0; stats->cursor_search = 0; + stats->cursor_search_error = 0; stats->cursor_search_hs = 0; stats->cursor_search_near = 0; + stats->cursor_search_near_error = 0; stats->cursor_sweep_buckets = 0; stats->cursor_sweep_closed = 0; stats->cursor_sweep_examined = 0; stats->cursor_sweep = 0; stats->cursor_truncate = 0; stats->cursor_update = 0; + stats->cursor_update_error = 0; stats->cursor_update_bytes = 0; stats->cursor_update_bytes_changed = 0; stats->cursor_reopen = 0; @@ -2404,36 +2542,59 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->cursor_reposition_failed += WT_STAT_READ(from, cursor_reposition_failed); to->cursor_reposition += WT_STAT_READ(from, cursor_reposition); to->cursor_cached_count += WT_STAT_READ(from, cursor_cached_count); + to->cursor_bound_error += WT_STAT_READ(from, cursor_bound_error); + to->cursor_bounds_reset += WT_STAT_READ(from, cursor_bounds_reset); to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk); + to->cursor_cache_error += WT_STAT_READ(from, cursor_cache_error); to->cursor_cache += WT_STAT_READ(from, cursor_cache); + to->cursor_close_error += WT_STAT_READ(from, cursor_close_error); + to->cursor_compare_error += WT_STAT_READ(from, cursor_compare_error); to->cursor_create += WT_STAT_READ(from, cursor_create); + to->cursor_equals_error += WT_STAT_READ(from, cursor_equals_error); + to->cursor_get_key_error += WT_STAT_READ(from, cursor_get_key_error); + to->cursor_get_value_error += WT_STAT_READ(from, cursor_get_value_error); to->cursor_insert += WT_STAT_READ(from, cursor_insert); + to->cursor_insert_error += WT_STAT_READ(from, cursor_insert_error); + to->cursor_insert_check_error += WT_STAT_READ(from, cursor_insert_check_error); to->cursor_insert_bytes += WT_STAT_READ(from, cursor_insert_bytes); + to->cursor_largest_key_error += WT_STAT_READ(from, cursor_largest_key_error); to->cursor_modify += WT_STAT_READ(from, cursor_modify); + to->cursor_modify_error += WT_STAT_READ(from, cursor_modify_error); to->cursor_modify_bytes += WT_STAT_READ(from, cursor_modify_bytes); to->cursor_modify_bytes_touch += WT_STAT_READ(from, cursor_modify_bytes_touch); to->cursor_next += WT_STAT_READ(from, cursor_next); + to->cursor_next_error += WT_STAT_READ(from, cursor_next_error); to->cursor_next_hs_tombstone += WT_STAT_READ(from, cursor_next_hs_tombstone); to->cursor_next_skip_ge_100 += WT_STAT_READ(from, cursor_next_skip_ge_100); to->cursor_next_skip_lt_100 += WT_STAT_READ(from, cursor_next_skip_lt_100); to->cursor_restart += WT_STAT_READ(from, cursor_restart); to->cursor_prev += WT_STAT_READ(from, cursor_prev); + to->cursor_prev_error += WT_STAT_READ(from, cursor_prev_error); to->cursor_prev_hs_tombstone += WT_STAT_READ(from, cursor_prev_hs_tombstone); to->cursor_prev_skip_ge_100 += WT_STAT_READ(from, cursor_prev_skip_ge_100); to->cursor_prev_skip_lt_100 += WT_STAT_READ(from, cursor_prev_skip_lt_100); + to->cursor_next_random_error += WT_STAT_READ(from, cursor_next_random_error); + to->cursor_reconfigure_error += WT_STAT_READ(from, cursor_reconfigure_error); to->cursor_remove += WT_STAT_READ(from, cursor_remove); + to->cursor_remove_error += WT_STAT_READ(from, cursor_remove_error); to->cursor_remove_bytes += WT_STAT_READ(from, cursor_remove_bytes); + to->cursor_reopen_error += WT_STAT_READ(from, cursor_reopen_error); to->cursor_reserve += WT_STAT_READ(from, cursor_reserve); + to->cursor_reserve_error += WT_STAT_READ(from, cursor_reserve_error); to->cursor_reset += WT_STAT_READ(from, cursor_reset); + to->cursor_reset_error += WT_STAT_READ(from, cursor_reset_error); to->cursor_search += WT_STAT_READ(from, cursor_search); + to->cursor_search_error += WT_STAT_READ(from, cursor_search_error); to->cursor_search_hs += WT_STAT_READ(from, cursor_search_hs); to->cursor_search_near += WT_STAT_READ(from, cursor_search_near); + to->cursor_search_near_error += WT_STAT_READ(from, cursor_search_near_error); to->cursor_sweep_buckets += WT_STAT_READ(from, cursor_sweep_buckets); to->cursor_sweep_closed += WT_STAT_READ(from, cursor_sweep_closed); to->cursor_sweep_examined += WT_STAT_READ(from, cursor_sweep_examined); to->cursor_sweep += WT_STAT_READ(from, cursor_sweep); to->cursor_truncate += WT_STAT_READ(from, cursor_truncate); to->cursor_update += WT_STAT_READ(from, cursor_update); + to->cursor_update_error += WT_STAT_READ(from, cursor_update_error); to->cursor_update_bytes += WT_STAT_READ(from, cursor_update_bytes); to->cursor_update_bytes_changed += WT_STAT_READ(from, cursor_update_bytes_changed); to->cursor_reopen += WT_STAT_READ(from, cursor_reopen); diff --git a/src/third_party/wiredtiger/test/cppsuite/README.md b/src/third_party/wiredtiger/test/cppsuite/README.md new file mode 100644 index 00000000000..26c95664ab3 --- /dev/null +++ b/src/third_party/wiredtiger/test/cppsuite/README.md @@ -0,0 +1 @@ +# WiredTiger cppsuite diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.cpp b/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.cpp index db313b93ebc..db313b93ebc 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.cpp diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.h b/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.h index 8c0038fdee5..8c0038fdee5 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.h diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.cpp b/src/third_party/wiredtiger/test/cppsuite/src/common/logger.cpp index 67b72eac172..4bb0e982a31 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/logger.cpp @@ -26,13 +26,15 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <chrono> +#include "logger.h" + #include <iostream> -#include <mutex> #include <sstream> #include <thread> -#include "logger.h" +extern "C" { +#include "test_util.h" +} /* Define helpful functions related to debugging. */ namespace test_harness { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.h b/src/third_party/wiredtiger/test/cppsuite/src/common/logger.h index 3b30ede7bd4..3284d82ee00 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/logger.h @@ -26,8 +26,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef DEBUG_UTILS_H -#define DEBUG_UTILS_H +#ifndef LOGGER_H +#define LOGGER_H /* Following definitions are required in order to use printing format specifiers in C++. */ #ifndef __STDC_LIMIT_MACROS @@ -37,15 +37,7 @@ #define __STDC_FORMAT_MACROS #endif -#include <chrono> -#include <iostream> #include <mutex> -#include <sstream> -#include <thread> - -extern "C" { -#include "test_util.h" -} /* Define helpful functions related to debugging. */ namespace test_harness { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.cpp b/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.cpp index 3973af7242c..f391db0d180 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.cpp @@ -27,6 +27,7 @@ */ #include "random_generator.h" + #include <algorithm> extern "C" { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.h b/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.h index 967d5566ce1..967d5566ce1 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.h diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.cpp index 29d1e547151..e41516c196e 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.cpp @@ -26,9 +26,10 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/util/logger.h" #include "thread_manager.h" +#include "logger.h" + namespace test_harness { thread_manager::~thread_manager() { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h b/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.h index 0fce6bfeb45..0fce6bfeb45 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.h diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.cpp index 66836325acf..ba8de32a03f 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.cpp @@ -27,9 +27,15 @@ */ #include "checkpoint_manager.h" -#include "connection_manager.h" -#include "util/api_const.h" -#include "util/logger.h" + +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/main/configuration.h" +#include "src/storage/connection_manager.h" + +extern "C" { +#include "test_util.h" +} namespace test_harness { checkpoint_manager::checkpoint_manager(configuration *configuration) diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.h b/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.h index a127ee63657..a570c8d215e 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.h @@ -29,8 +29,9 @@ #ifndef CHECKPOINT_MANAGER_H #define CHECKPOINT_MANAGER_H -#include "core/component.h" -#include "util/scoped_types.h" +#include "component.h" + +#include "src/storage/scoped_types.h" namespace test_harness { class checkpoint_manager : public component { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/component.cpp index aeb691fe674..f2966db8d22 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/component.cpp @@ -27,7 +27,9 @@ */ #include "component.h" -#include "test_harness/util/api_const.h" + +#include "src/common/api_const.h" +#include "src/common/logger.h" namespace test_harness { component::component(const std::string &name, configuration *config) : _config(config), _name(name) diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.h b/src/third_party/wiredtiger/test/cppsuite/src/component/component.h index 5a8f8f81cf5..effbd259310 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/component.h @@ -29,15 +29,15 @@ #ifndef COMPONENT_H #define COMPONENT_H -#include "configuration.h" -#include "throttle.h" +#include <string> + +#include "src/main/configuration.h" +#include "src/main/throttle.h" namespace test_harness { /* * A component is a class that defines 4 unique stages in its life-cycle, the stages must be run in * the following order: load, run, end_run, finish. - * - * */ class component { public: diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.cpp new file mode 100644 index 00000000000..f40cfc22479 --- /dev/null +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.cpp @@ -0,0 +1,65 @@ +/*- + * Public Domain 2014-present MongoDB, Inc. + * Public Domain 2008-2014 WiredTiger, Inc. + * + * This is free and unencumbered software released into the public domain. + * + * Anyone is free to copy, modify, publish, use, compile, sell, or + * distribute this software, either in source code form or as a compiled + * binary, for any purpose, commercial or non-commercial, and by any + * means. + * + * In jurisdictions that recognize copyright laws, the author or authors + * of this software dedicate any and all copyright interest in the + * software to the public domain. We make this dedication for the benefit + * of the public at large and to the detriment of our heirs and + * successors. We intend this dedication to be an overt act of + * relinquishment in perpetuity of all present and future rights to this + * software under copyright law. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "op_tracker.h" + +#include "perf_plotter.h" + +namespace test_harness { +op_tracker::op_tracker(const std::string id, const std::string &test_name) + : _id(id), _test_name(test_name), _it_count(0), _total_time_taken(0) +{ +} + +void +op_tracker::append_stats() +{ + uint64_t avg = (uint64_t)_total_time_taken / _it_count; + std::string stat = "{\"name\":\"" + _id + "\",\"value\":" + std::to_string(avg) + "}"; + perf_plotter::instance().add_stat(stat); +} + +template <typename T> +auto +op_tracker::track(T lambda) +{ + auto _start_time = std::chrono::steady_clock::now(); + int ret = lambda(); + auto _end_time = std::chrono::steady_clock::now(); + _total_time_taken += (_end_time - _start_time).count(); + _it_count += 1; + + return ret; +} + +op_tracker::~op_tracker() +{ + if (_it_count != 0) + append_stats(); +} +}; // namespace test_harness diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.h b/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.h index eea99b2414c..f9a3c3c5698 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.h @@ -26,8 +26,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <chrono> -#include <fstream> +#ifndef OP_TRACKER_H +#define OP_TRACKER_H + #include <string> namespace test_harness { @@ -56,3 +57,5 @@ class op_tracker { uint64_t _total_time_taken; }; } // namespace test_harness + +#endif diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.cpp index d02c1ae61a9..780dcb4fff9 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.cpp @@ -25,6 +25,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ + #include "perf_plotter.h" namespace test_harness { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.h b/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.h index 36cd9a5817e..3710f0d1ddf 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.h @@ -25,11 +25,15 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ + #ifndef PERF_PLOTTER_H #define PERF_PLOTTER_H + #include <fstream> #include <mutex> +#include <string> #include <vector> + namespace test_harness { /* * Singleton class owning the perf plot json, provides access to add statistics, and a central call diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.cpp index 7298175e858..1dce6df6c16 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.cpp @@ -26,16 +26,18 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include "runtime_monitor.h" + #include <fstream> -#include "connection_manager.h" -#include "core/component.h" -#include "core/configuration.h" -#include "core/throttle.h" -#include "runtime_monitor.h" -#include "util/api_const.h" -#include "util/logger.h" -#include "util/perf_plotter.h" +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/component/perf_plotter.h" +#include "src/storage/connection_manager.h" + +extern "C" { +#include "test_util.h" +} namespace test_harness { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.h b/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.h index a02d9979801..383401aefeb 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.h @@ -29,19 +29,11 @@ #ifndef RUNTIME_MONITOR_H #define RUNTIME_MONITOR_H -#include <string> -#include <vector> +#include <memory> -extern "C" { -#include "test_util.h" -#include "wiredtiger.h" -} - -#include "util/scoped_types.h" -#include "workload/database_model.h" - -/* Forward declarations for classes to reduce compilation time and modules coupling. */ -class configuration; +#include "src/main/configuration.h" +#include "src/main/database_model.h" +#include "src/storage/scoped_types.h" namespace test_harness { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.cpp index fce4b3ca789..865dad819fa 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.cpp @@ -26,15 +26,14 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <chrono> +#include "timestamp_manager.h" + #include <sstream> -#include <thread> -#include "connection_manager.h" -#include "core/configuration.h" -#include "timestamp_manager.h" -#include "util/api_const.h" -#include "workload/random_generator.h" +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/common/random_generator.h" +#include "src/storage/connection_manager.h" namespace test_harness { const std::string @@ -134,10 +133,26 @@ timestamp_manager::get_oldest_ts() const } wt_timestamp_t -timestamp_manager::get_random_ts() const +timestamp_manager::get_valid_read_ts() const { + /* Use get_oldest_ts here to convert from atomic to wt_timestamp_t. */ + wt_timestamp_t current_oldest = get_oldest_ts(); + wt_timestamp_t current_stable = _stable_ts; + if (current_stable > current_oldest) { + --current_stable; + } + /* + * Assert that our stable and oldest match if 0 or that the stable is greater than or equal to + * the oldest. Ensuring that the oldest is never greater than the stable. + */ + testutil_assert( + (current_stable == 0 && current_oldest == 0) || current_stable >= current_oldest); + /* + * Its okay to return a timestamp less than a concurrently updated oldest timestamp as all + * readers should be reading with timestamp rounding. + */ return random_generator::instance().generate_integer<wt_timestamp_t>( - _oldest_ts, static_cast<wt_timestamp_t>(get_time_now_s())); + current_oldest, current_stable); } uint64_t diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.h b/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.h index 88cff40c30e..55fa4a3cc41 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.h @@ -30,12 +30,12 @@ #define TIMESTAMP_MANAGER_H #include <atomic> -#include <string> -#include "core/component.h" +#include "component.h" -/* Forward declarations for classes to reduce compilation time and modules coupling. */ -class configuration; +extern "C" { +#include "test_util.h" +} namespace test_harness { /* @@ -62,8 +62,17 @@ class timestamp_manager : public component { /* Get oldest timestamp. */ wt_timestamp_t get_oldest_ts() const; - /* Generate a random timestamp between the oldest timestamp and now. */ - wt_timestamp_t get_random_ts() const; + /* + * Generate a timestamp between the oldest timestamp and the stable timestamp. + * + * WiredTiger will abort commit transactions that attempt to commit behind an active read + * timestamp in order to preserve repeatable reads. Currently the cppsuite doesn't handle that + * well, so to avoid this issue we will read behind the stable timestamp. + * + * This timestamp isn't guaranteed to provide a repeatable read as the oldest could move + * concurrently removing the previously seen data. + */ + wt_timestamp_t get_valid_read_ts() const; private: /* Get the current time in seconds, bit shifted to the expected location. */ diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.cpp index 026f05b2cb5..e643a576a55 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.cpp @@ -26,19 +26,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <atomic> -#include <map> - -#include "connection_manager.h" -#include "core/configuration.h" -#include "core/throttle.h" -#include "util/api_const.h" -#include "workload/database_model.h" -#include "workload/database_operation.h" -#include "workload/random_generator.h" -#include "workload/workload_tracking.h" #include "workload_generator.h" +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/storage/connection_manager.h" + namespace test_harness { /* operation_config class implementation */ operation_config::operation_config(configuration *config, thread_type type) @@ -46,7 +39,7 @@ operation_config::operation_config(configuration *config, thread_type type) { } -std::function<void(test_harness::thread_context *)> +std::function<void(thread_context *)> operation_config::get_func(database_operation *dbo) { switch (type) { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.h b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.h index 11049e53063..53a33311bfc 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.h @@ -29,18 +29,12 @@ #ifndef WORKLOAD_GENERATOR_H #define WORKLOAD_GENERATOR_H -#include <algorithm> #include <functional> -#include "core/component.h" -#include "workload/thread_context.h" -#include "thread_manager.h" -#include "workload/database_operation.h" - -/* Forward declarations for classes to reduce compilation time and modules coupling. */ -class configuration; -class database; -class workload_tracking; +#include "src/common/thread_manager.h" +#include "src/main/configuration.h" +#include "src/main/database_operation.h" +#include "src/main/thread_context.h" namespace test_harness { /* @@ -51,7 +45,7 @@ class operation_config { explicit operation_config(configuration *config, thread_type type); /* Returns a function pointer to the member function of the supplied database operation. */ - std::function<void(test_harness::thread_context *)> get_func(database_operation *dbo); + std::function<void(thread_context *)> get_func(database_operation *dbo); public: configuration *config; diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.cpp index 9b459bd4ad8..668ce176291 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.cpp @@ -26,12 +26,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "../connection_manager.h" -#include "../core/configuration.h" -#include "../util/api_const.h" -#include "../util/scoped_types.h" #include "workload_tracking.h" +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/storage/connection_manager.h" + namespace test_harness { workload_tracking::workload_tracking( configuration *_config, const bool use_compression, timestamp_manager &tsm) diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.h b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.h index 0599c0b5a55..640cb294f0c 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.h @@ -29,9 +29,9 @@ #ifndef WORKLOAD_TRACKING_H #define WORKLOAD_TRACKING_H -#include "../core/component.h" -#include "../timestamp_manager.h" -#include "../util/scoped_types.h" +#include "component.h" +#include "src/storage/scoped_types.h" +#include "timestamp_manager.h" /* * Default schema for tracking operations on collections (key_format: Collection id / Key / diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.cpp index a64ef7e5b7b..b10958be297 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.cpp @@ -26,11 +26,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include "workload_validation.h" + #include <algorithm> -#include "../connection_manager.h" -#include "database_model.h" -#include "workload_validation.h" +#include "src/common/logger.h" +#include "src/storage/connection_manager.h" namespace test_harness { void diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.h b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.h index ba745a225df..ecb8f660bc3 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.h @@ -33,11 +33,7 @@ #include <string> #include <vector> -extern "C" { -#include "wiredtiger.h" -} - -#include "../util/scoped_types.h" +#include "src/main/database_model.h" namespace test_harness { struct key_state { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.cpp b/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.cpp index f508dc76bea..3e00cb7450b 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.cpp @@ -26,10 +26,16 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include "configuration.h" + #include <algorithm> #include <stack> -#include "configuration.h" +#include "src/common/logger.h" + +extern "C" { +#include "test_util.h" +} namespace test_harness { /* Static methods implementation. */ diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.h b/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.h index b61defc9d3f..e30291f199b 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.h @@ -32,10 +32,8 @@ #include <string> #include <vector> -#include "test_harness/util/logger.h" - extern "C" { -#include "test_util.h" +#include "wiredtiger.h" } namespace test_harness { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.cpp b/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.cpp index 1fbd40012ed..848eff3863d 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.cpp @@ -26,15 +26,11 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <chrono> -#include <tuple> - -#include "../connection_manager.h" -#include "../timestamp_manager.h" -#include "../util/api_const.h" #include "database_model.h" -#include "random_generator.h" -#include "workload_tracking.h" + +#include "src/common/api_const.h" +#include "src/common/random_generator.h" +#include "src/storage/connection_manager.h" namespace test_harness { /* collection class implementation */ diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.h b/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.h index d907dbfbda1..aa239b00c75 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.h @@ -29,14 +29,11 @@ #ifndef DATABASE_MODEL_H #define DATABASE_MODEL_H -#include <atomic> #include <string> #include <map> +#include <mutex> -#include "workload_tracking.h" - -/* Forward declarations for classes to reduce compilation time and modules coupling. */ -class timestamp_manager; +#include "src/component/workload_tracking.h" namespace test_harness { /* Key/Value type. */ diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.cpp b/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.cpp index 549a84b5387..0a72b79a778 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.cpp @@ -26,16 +26,14 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <cmath> -#include <map> - -#include "../connection_manager.h" -#include "../thread_manager.h" -#include "../util/api_const.h" #include "database_operation.h" -#include "random_generator.h" -#include "workload_tracking.h" -#include "workload_validation.h" + +#include "src/common/thread_manager.h" +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/common/random_generator.h" +#include "src/component/workload_validation.h" +#include "src/storage/connection_manager.h" namespace test_harness { /* Static methods. */ diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.h b/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.h index 946a322f25a..946a322f25a 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.h diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/test.cpp b/src/third_party/wiredtiger/test/cppsuite/src/main/test.cpp index 9f93415ac64..288ca08e2c4 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/test.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/test.cpp @@ -26,19 +26,11 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -/* Required to build using older versions of g++. */ -#include <cinttypes> -#include <memory> -#include <mutex> - -#include "connection_manager.h" -#include "core/component.h" -#include "core/configuration.h" #include "test.h" -#include "thread_manager.h" -#include "timestamp_manager.h" -#include "util/api_const.h" -#include "util/perf_plotter.h" + +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/component/perf_plotter.h" namespace test_harness { test::test(const test_args &args) : _args(args) diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/test.h b/src/third_party/wiredtiger/test/cppsuite/src/main/test.h index 5e851cf7d03..513df520e74 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/test.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/test.h @@ -29,20 +29,14 @@ #ifndef TEST_H #define TEST_H -#include <memory> #include <string> -#include <vector> -extern "C" { -#include "wiredtiger.h" -} - -#include "checkpoint_manager.h" -#include "connection_manager.h" -#include "runtime_monitor.h" -#include "util/scoped_connection.h" -#include "workload/database_operation.h" -#include "workload_generator.h" +#include "database_operation.h" +#include "src/component/checkpoint_manager.h" +#include "src/component/runtime_monitor.h" +#include "src/component/workload_generator.h" +#include "src/storage/connection_manager.h" +#include "src/storage/scoped_connection.h" namespace test_harness { class test_args { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.cpp b/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.cpp index 75f1c338f74..b48b985b91f 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.cpp @@ -26,14 +26,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "../core/configuration.h" -#include "../timestamp_manager.h" -#include "../util/api_const.h" -#include "../util/logger.h" -#include "workload_tracking.h" -#include "random_generator.h" #include "thread_context.h" +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/common/random_generator.h" + namespace test_harness { const std::string diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.h b/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.h index e968db51ec9..c97038f11cf 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.h @@ -31,17 +31,11 @@ #include <string> -extern "C" { -#include "test_util.h" -} - -#include "../core/throttle.h" -#include "../workload/database_model.h" - -/* Forward declarations for classes to reduce compilation time and modules coupling. */ -class configuration; -class timestamp_manager; -class workload_tracking; +#include "database_model.h" +#include "src/component/workload_tracking.h" +#include "src/component/timestamp_manager.h" +#include "src/main/configuration.h" +#include "src/storage/scoped_types.h" namespace test_harness { enum thread_type { CUSTOM, INSERT, READ, REMOVE, UPDATE }; diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.cpp b/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.cpp index af7b94e8f98..98263140d4d 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.cpp @@ -26,11 +26,15 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include "throttle.h" + #include <thread> -#include "configuration.h" -#include "test_harness/util/api_const.h" -#include "throttle.h" +#include "src/common/api_const.h" + +extern "C" { +#include "test_util.h" +} namespace test_harness { throttle::throttle(const std::string &throttle_rate) diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.h b/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.h index 24161ea956e..29dd622f872 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.h @@ -31,8 +31,7 @@ #include <string> -/* Forward declarations for classes to reduce compilation time and modules coupling. */ -class configuration; +#include "configuration.h" namespace test_harness { class throttle { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.cpp index 292cfbbfeab..f5bf44637bb 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.cpp @@ -27,9 +27,12 @@ */ #include "connection_manager.h" -#include "util/api_const.h" -#include "util/logger.h" -#include "util/scoped_connection.h" + +#include "src/common/logger.h" + +extern "C" { +#include "test_util.h" +} namespace test_harness { connection_manager & diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.h b/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.h index 2fef81d2af8..20161126736 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.h @@ -39,12 +39,7 @@ #include <mutex> -extern "C" { -#include "test_util.h" -#include "wiredtiger.h" -} - -#include "util/scoped_types.h" +#include "scoped_types.h" namespace test_harness { /* diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.cpp b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.cpp index 39a8fede916..ca879aa4da9 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.cpp @@ -25,12 +25,11 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ -#include <iostream> -#include <utility> -#include "../connection_manager.h" #include "scoped_connection.h" +#include "connection_manager.h" + namespace test_harness { scoped_connection::scoped_connection(const std::string &db_conn_config, const std::string &home) diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.h b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.h index 6e999b6db54..2d76b800235 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.h @@ -37,12 +37,12 @@ #define __STDC_FORMAT_MACROS #endif +#include <string> + extern "C" { #include "test_util.h" } -#include "../connection_manager.h" - namespace test_harness { class scoped_connection { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.cpp b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.cpp index b0b20ccc0f8..4c97213abc8 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.cpp @@ -26,11 +26,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <string> -#include <utility> - #include "scoped_types.h" +extern "C" { +#include "test_util.h" +} + namespace test_harness { /* scoped_cursor implementation */ diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.h b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.h index c015c0c909b..e6f33931319 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.h +++ b/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.h @@ -37,8 +37,10 @@ #define __STDC_FORMAT_MACROS #endif +#include <string> + extern "C" { -#include "test_util.h" +#include "wiredtiger.h" } namespace test_harness { diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.cpp deleted file mode 100644 index af806927768..00000000000 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "test_harness/test.h" -#include "test_harness/util/perf_plotter.h" -#include "op_tracker.h" - -namespace test_harness { -op_tracker::op_tracker(const std::string id, const std::string &test_name) - : _id(id), _test_name(test_name), _it_count(0), _total_time_taken(0) -{ -} - -void -op_tracker::append_stats() -{ - uint64_t avg = (uint64_t)_total_time_taken / _it_count; - std::string stat = "{\"name\":\"" + _id + "\",\"value\":" + std::to_string(avg) + "}"; - perf_plotter::instance().add_stat(stat); -} - -template <typename T> -auto -op_tracker::track(T lambda) -{ - auto _start_time = std::chrono::steady_clock::now(); - int ret = lambda(); - auto _end_time = std::chrono::steady_clock::now(); - _total_time_taken += (_end_time - _start_time).count(); - _it_count += 1; - - return ret; -} - -op_tracker::~op_tracker() -{ - if (_it_count != 0) - append_stats(); -} -}; // namespace test_harness diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp index 7f4dfea30b0..faa002f06af 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp @@ -26,14 +26,10 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <time.h> +#include "src/component/op_tracker.cpp" +#include "src/main/test.h" -#include "test_harness/core/op_tracker.cpp" -#include "test_harness/test.h" -#include "test_harness/util/api_const.h" -#include "test_harness/workload/random_generator.h" - -namespace test_harness { +using namespace test_harness; /* * This test performs cursor traversal operations next() and prev() on a collection with both @@ -50,9 +46,11 @@ class bounded_cursor_perf : public test { static void set_bounds(scoped_cursor &cursor) { - cursor->set_key(cursor.get(), std::string(1, ('0' - 1)).c_str()); + std::string lower_bound(1, ('0' - 1)); + cursor->set_key(cursor.get(), lower_bound.c_str()); cursor->bound(cursor.get(), "bound=lower"); - cursor->set_key(cursor.get(), std::string(1, ('9' + 1)).c_str()); + std::string upper_bound(1, ('9' + 1)); + cursor->set_key(cursor.get(), upper_bound.c_str()); cursor->bound(cursor.get(), "bound=upper"); } @@ -114,4 +112,3 @@ class bounded_cursor_perf : public test { } } }; -} // namespace test_harness diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp index 97341e356b3..64ae392d14b 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp @@ -26,9 +26,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" -#include "test_harness/workload/random_generator.h" -#include "test_harness/timestamp_manager.h" +#include "src/common/random_generator.h" +#include "src/main/test.h" using namespace test_harness; diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp index ccffed30420..98b357b7eb8 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp @@ -26,11 +26,15 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" +#include "src/common/api_const.h" +#include "src/common/random_generator.h" +#include "src/component/workload_tracking.h" +#include "src/main/test.h" + +using namespace test_harness; -namespace test_harness { /* Defines what data is written to the tracking table for use in custom validation. */ -class tracking_table_cache_resize : public test_harness::workload_tracking { +class tracking_table_cache_resize : public workload_tracking { public: tracking_table_cache_resize( @@ -55,16 +59,16 @@ class tracking_table_cache_resize : public test_harness::workload_tracking { * than the cache size they are rejected, so only transactions made when cache size is 500MB should * be allowed. */ -class cache_resize : public test_harness::test { +class cache_resize : public test { public: - cache_resize(const test_harness::test_args &args) : test(args) + cache_resize(const test_args &args) : test(args) { init_tracking(new tracking_table_cache_resize(_config->get_subconfig(WORKLOAD_TRACKING), _config->get_bool(COMPRESSION_ENABLED), *_timestamp_manager)); } void - custom_operation(test_harness::thread_context *tc) override final + custom_operation(thread_context *tc) override final { WT_CONNECTION *conn = connection_manager::instance().get_connection(); WT_CONNECTION_IMPL *conn_impl = (WT_CONNECTION_IMPL *)conn; @@ -120,7 +124,7 @@ class cache_resize : public test_harness::test { } void - insert_operation(test_harness::thread_context *tc) override final + insert_operation(thread_context *tc) override final { const uint64_t collection_count = tc->db.get_collection_count(); testutil_assert(collection_count > 0); @@ -233,5 +237,3 @@ class cache_resize : public test_harness::test { */ } }; - -} // namespace test_harness diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp index 0b5a2966b2f..155ffc101e9 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp @@ -33,15 +33,16 @@ * test_template.cpp and create_script.sh. */ -#include "test_harness/connection_manager.h" -#include "test_harness/thread_manager.h" -#include "test_harness/util/api_const.h" -#include "test_harness/util/logger.h" -#include "test_harness/util/scoped_connection.h" -#include "test_harness/workload/random_generator.h" +#include "src/common/api_const.h" +#include "src/common/logger.h" +#include "src/common/random_generator.h" +#include "src/common/thread_manager.h" +#include "src/storage/connection_manager.h" +#include "src/storage/scoped_connection.h" extern "C" { #include "wiredtiger.h" +#include "test_util.h" } using namespace test_harness; diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp index f3f733dfe25..ba048dbbca8 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp @@ -26,9 +26,11 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" -#include "test_harness/util/api_const.h" -#include "test_harness/workload/random_generator.h" +#include "src/common/api_const.h" +#include "src/common/random_generator.h" +#include "src/main/test.h" + +using namespace test_harness; /* * In this test, we want to verify the usage of the cursor bound API and check that the cursor @@ -43,8 +45,6 @@ * random bounds set. Both next() and prev() calls with bounds set is verified against the * default cursor next() and prev() calls. */ -namespace test_harness { - class cursor_bound_01 : public test { /* Class helper to represent the lower and uppers bounds for the range cursor. */ class bound { @@ -605,7 +605,7 @@ class cursor_bound_01 : public test { } scoped_cursor normal_cursor = tc->session.open_scoped_cursor(coll.name); - wt_timestamp_t ts = tc->tsm->get_random_ts(); + wt_timestamp_t ts = tc->tsm->get_valid_read_ts(); /* * The oldest timestamp might move ahead and the reading timestamp might become invalid. * To tackle this issue, we round the timestamp to the oldest timestamp value. @@ -677,7 +677,7 @@ class cursor_bound_01 : public test { } scoped_cursor normal_cursor = tc->session.open_scoped_cursor(coll.name); - wt_timestamp_t ts = tc->tsm->get_random_ts(); + wt_timestamp_t ts = tc->tsm->get_valid_read_ts(); /* * The oldest timestamp might move ahead and the reading timestamp might become invalid. * To tackle this issue, we round the timestamp to the oldest timestamp value. @@ -699,5 +699,3 @@ class cursor_bound_01 : public test { tc->transaction.rollback(); } }; - -} // namespace test_harness diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp index 475153ae9c7..a92b53066fb 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp @@ -26,9 +26,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" - -#include "test_harness/connection_manager.h" +#include "src/common/random_generator.h" +#include "src/main/test.h" using namespace test_harness; diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp index b96ba0ebd86..7be490958ff 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp @@ -26,7 +26,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" +#include "src/main/test.h" + +using namespace test_harness; /* * The "base test" that the framework uses, because its not overloading any of the database @@ -34,9 +36,9 @@ * * Can be used to create stress tests in various ways. */ -class operations_test : public test_harness::test { +class operations_test : public test { public: - operations_test(const test_harness::test_args &args) : test(args) + operations_test(const test_args &args) : test(args) { init_tracking(); } diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp index 6d52caee4fb..c79c0cb4220 100755 --- a/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp @@ -26,12 +26,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include <fstream> +#include <algorithm> #include <iostream> #include <string> -#include "test_harness/util/logger.h" -#include "test_harness/test.h" +#include "src/common/logger.h" +#include "src/main/test.h" #include "bounded_cursor_perf.cpp" #include "burst_inserts.cpp" @@ -44,6 +44,10 @@ #include "search_near_03.cpp" #include "test_template.cpp" +extern "C" { +#include "test_util.h" +} + /* Declarations to avoid the error raised by -Werror=missing-prototypes. */ const std::string parse_configuration_from_file(const std::string &filename); void print_help(); diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp index dcb6692f643..b70c5573f74 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp @@ -26,13 +26,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/util/api_const.h" -#include "test_harness/workload/random_generator.h" -#include "test_harness/workload/thread_context.h" -#include "test_harness/test.h" -#include "test_harness/thread_manager.h" +#include "src/common/api_const.h" +#include "src/common/random_generator.h" +#include "src/main/test.h" using namespace test_harness; + /* * In this test, we want to verify that search_near with prefix enabled only traverses the portion * of the tree that follows the prefix portion of the search key. The test is composed of a populate @@ -43,7 +42,7 @@ using namespace test_harness; * - Using WiredTiger statistics to validate that the number of entries traversed is within * bounds of the search key. */ -class search_near_01 : public test_harness::test { +class search_near_01 : public test { uint64_t keys_per_prefix = 0; uint64_t srchkey_len = 0; const std::string ALPHABET{"abcdefghijklmnopqrstuvwxyz"}; @@ -102,14 +101,14 @@ class search_near_01 : public test_harness::test { } public: - search_near_01(const test_harness::test_args &args) : test(args) + search_near_01(const test_args &args) : test(args) { init_tracking(); } void - populate(test_harness::database &database, test_harness::timestamp_manager *tsm, - test_harness::configuration *config, test_harness::workload_tracking *tracking) override final + populate(database &database, timestamp_manager *tsm, configuration *config, + workload_tracking *tracking) override final { uint64_t collection_count, key_size; std::vector<thread_context *> workers; @@ -180,8 +179,8 @@ class search_near_01 : public test_harness::test { } static void - perform_search_near(test_harness::thread_context *tc, std::string collection_name, - uint64_t srchkey_len, std::atomic<int64_t> &z_key_searches) + perform_search_near(thread_context *tc, std::string collection_name, uint64_t srchkey_len, + std::atomic<int64_t> &z_key_searches) { std::string srch_key; int cmpp = 0; @@ -223,13 +222,13 @@ class search_near_01 : public test_harness::test { } void - read_operation(test_harness::thread_context *tc) override final + read_operation(thread_context *tc) override final { /* Make sure that thread statistics cursor is null before we open it. */ testutil_assert(tc->stat_cursor.get() == nullptr); /* This test will only work with one read thread. */ testutil_assert(tc->thread_count == 1); - test_harness::configuration *workload_config, *read_config; + configuration *workload_config, *read_config; std::vector<thread_context *> workers; std::atomic<int64_t> z_key_searches; int64_t entries_stat, expected_entries, prefix_stat, prev_entries_stat, prev_prefix_stat; diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp index 63d0354c9c8..dd98a88e6dc 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp @@ -26,9 +26,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" -#include "test_harness/util/api_const.h" -#include "test_harness/workload/random_generator.h" +#include "src/common/api_const.h" +#include "src/common/random_generator.h" +#include "src/main/test.h" using namespace test_harness; @@ -39,16 +39,16 @@ using namespace test_harness; * - M threads will execute search_near calls with prefix enabled using random prefixes as well. * Each search_near call with prefix enabled is verified using the default search_near. */ -class search_near_02 : public test_harness::test { +class search_near_02 : public test { public: - search_near_02(const test_harness::test_args &args) : test(args) + search_near_02(const test_args &args) : test(args) { init_tracking(); } void - populate(test_harness::database &database, test_harness::timestamp_manager *, - test_harness::configuration *config, test_harness::workload_tracking *) override final + populate(database &database, timestamp_manager *, configuration *config, + workload_tracking *) override final { /* * The populate phase only creates empty collections. The number of collections is defined @@ -66,7 +66,7 @@ class search_near_02 : public test_harness::test { } void - insert_operation(test_harness::thread_context *tc) override final + insert_operation(thread_context *tc) override final { /* Each insert operation will insert new keys in the collections. */ logger::log_msg( @@ -145,7 +145,7 @@ class search_near_02 : public test_harness::test { } void - read_operation(test_harness::thread_context *tc) override final + read_operation(thread_context *tc) override final { /* * Each read operation performs search_near calls with and without prefix enabled on random @@ -176,7 +176,7 @@ class search_near_02 : public test_harness::test { auto &cursor_prefix = cursors[coll.id]; - wt_timestamp_t ts = tc->tsm->get_random_ts(); + wt_timestamp_t ts = tc->tsm->get_valid_read_ts(); /* * The oldest timestamp might move ahead and the reading timestamp might become invalid. * To tackle this issue, we round the timestamp to the oldest timestamp value. diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp index dc6b4a0352a..b4b365a9792 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp @@ -26,9 +26,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" -#include "test_harness/util/api_const.h" -#include "test_harness/workload/random_generator.h" +#include "src/common/api_const.h" +#include "src/common/random_generator.h" +#include "src/main/test.h" using namespace test_harness; @@ -40,13 +40,13 @@ using namespace test_harness; * - M threads will traverse the collections and ensure that the number of records in the * collections don't change. */ -class search_near_03 : public test_harness::test { +class search_near_03 : public test { /* A 2D array consisted of a mapping between each collection and their inserted prefixes. */ std::vector<std::vector<std::string>> prefixes_map; const std::string ALPHABET{"abcdefghijklmnopqrstuvwxyz"}; public: - search_near_03(const test_harness::test_args &args) : test(args) + search_near_03(const test_args &args) : test(args) { init_tracking(); } @@ -143,8 +143,8 @@ class search_near_03 : public test_harness::test { } void - populate(test_harness::database &database, test_harness::timestamp_manager *tsm, - test_harness::configuration *config, test_harness::workload_tracking *tracking) override final + populate(database &database, timestamp_manager *tsm, configuration *config, + workload_tracking *tracking) override final { uint64_t collection_count, key_count, key_size; std::vector<thread_context *> workers; @@ -217,7 +217,7 @@ class search_near_03 : public test_harness::test { } void - insert_operation(test_harness::thread_context *tc) override final + insert_operation(thread_context *tc) override final { std::map<uint64_t, scoped_cursor> cursors; std::string prefix_key; @@ -261,7 +261,7 @@ class search_near_03 : public test_harness::test { } void - read_operation(test_harness::thread_context *tc) override final + read_operation(thread_context *tc) override final { uint64_t key_count = 0; int ret = 0; diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp index 96e9ff29fdc..5ddf4826597 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp +++ b/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp @@ -26,11 +26,14 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "test_harness/test.h" +#include <iostream> + +#include "src/common/api_const.h" +#include "src/main/test.h" namespace test_harness { /* Defines what data is written to the tracking table for use in custom validation. */ -class tracking_table_template : public test_harness::workload_tracking { +class tracking_table_template : public workload_tracking { public: tracking_table_template( @@ -54,9 +57,9 @@ class tracking_table_template : public test_harness::workload_tracking { * Class that defines operations that do nothing as an example. This shows how database operations * can be overridden and customized. */ -class test_template : public test_harness::test { +class test_template : public test { public: - test_template(const test_harness::test_args &args) : test(args) + test_template(const test_args &args) : test(args) { init_tracking(new tracking_table_template(_config->get_subconfig(WORKLOAD_TRACKING), _config->get_bool(COMPRESSION_ENABLED), *_timestamp_manager)); @@ -70,38 +73,37 @@ class test_template : public test_harness::test { } void - populate(test_harness::database &, test_harness::timestamp_manager *, - test_harness::configuration *, test_harness::workload_tracking *) override final + populate(database &, timestamp_manager *, configuration *, workload_tracking *) override final { std::cout << "populate: nothing done." << std::endl; } void - custom_operation(test_harness::thread_context *) override final + custom_operation(thread_context *) override final { std::cout << "custom_operation: nothing done." << std::endl; } void - insert_operation(test_harness::thread_context *) override final + insert_operation(thread_context *) override final { std::cout << "insert_operation: nothing done." << std::endl; } void - read_operation(test_harness::thread_context *) override final + read_operation(thread_context *) override final { std::cout << "read_operation: nothing done." << std::endl; } void - remove_operation(test_harness::thread_context *) override final + remove_operation(thread_context *) override final { std::cout << "remove_operation: nothing done." << std::endl; } void - update_operation(test_harness::thread_context *) override final + update_operation(thread_context *) override final { std::cout << "update_operation: nothing done." << std::endl; } diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml index d431af14ddf..105abffe6d7 100755 --- a/src/third_party/wiredtiger/test/evergreen.yml +++ b/src/third_party/wiredtiger/test/evergreen.yml @@ -1030,6 +1030,8 @@ tasks: - func: "compile wiredtiger" vars: posix_configure_flags: -DENABLE_STRICT=1 -DHAVE_DIAGNOSTIC=1 -DENABLE_LZ4=1 -DENABLE_SNAPPY=1 -DENABLE_ZLIB=1 -DHAVE_UNITTEST=1 + # Different flags for windows based on what is supported and enabled by default. + windows_configure_flags: -DHAVE_DIAGNOSTIC=1 -DHAVE_UNITTEST=1 - command: shell.exec params: working_dir: "wiredtiger/cmake_build" @@ -4353,6 +4355,7 @@ buildvariants: - name: make-check-test - name: ".unit_test" - name: fops + - name: unittest-test - name: macos-1014 display_name: "OS X 10.14" diff --git a/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 b/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 index 001a93dbab4..56a68b0ab55 100644 --- a/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 +++ b/src/third_party/wiredtiger/test/evergreen/build_windows.ps1 @@ -27,7 +27,8 @@ cd cmake_build # Configure build with CMake. if( $configure -eq $true) { - C:\cmake\bin\cmake --no-warn-unused-cli -DSWIG_DIR="C:\swigwin-3.0.2" -DSWIG_EXECUTABLE="C:\swigwin-3.0.2\swig.exe" -DCMAKE_BUILD_TYPE='None' -DENABLE_PYTHON=1 -DENABLE_STRICT=1 -DCMAKE_TOOLCHAIN_FILE='..\cmake\toolchains\cl.cmake' -G "Ninja" ..\. + # Note that ${args} are all the command line options that are not automatically parsed by the param function. + C:\cmake\bin\cmake --no-warn-unused-cli -DSWIG_DIR='C:\swigwin-3.0.2' -DSWIG_EXECUTABLE='C:\swigwin-3.0.2\swig.exe' -DCMAKE_BUILD_TYPE='None' -DENABLE_PYTHON=1 -DENABLE_STRICT=1 -DCMAKE_TOOLCHAIN_FILE='..\cmake\toolchains\cl.cmake' ${args} -G "Ninja" ..\. } # Execute Ninja build. diff --git a/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py b/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py index 7e806650f33..c0baf30ee22 100644 --- a/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py +++ b/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py @@ -30,25 +30,34 @@ import wiredtiger, wttest from wtscenario import make_scenarios # test_cursor_bound01.py -# Basic cursor bound API validation +# Basic cursor bound API validation. class test_cursor_bound01(wttest.WiredTigerTestCase): file_name = 'test_cursor_bound01' types = [ - ('file', dict(uri='file:', use_index = False)), - ('table', dict(uri='table:', use_index = False)), - ('lsm', dict(uri='lsm:', use_index = False)), - ('index', dict(uri='table:', use_index = True)), + ('file', dict(uri='file:', use_index = False, use_colgroup = False)), + ('table', dict(uri='table:', use_index = False, use_colgroup = False)), + ('lsm', dict(uri='lsm:', use_index = False, use_colgroup = False)), + ('colgroup', dict(uri='table:', use_index = False, use_colgroup = False)), + #FIXME: Turn on once index cursor bound implementation is done. + #('index', dict(uri='table:', use_index = True)), ] - scenarios = make_scenarios(types) def test_bound_api(self): uri = self.uri + self.file_name create_params = 'value_format=S,key_format=i' - if self.use_index: + if self.use_index or self.use_colgroup: create_params += ",columns=(k,v)" + if self.use_colgroup: + create_params += ',colgroups=(g0)' self.session.create(uri, create_params) + # Add in column group. + if self.use_colgroup: + create_params = 'columns=(v),' + suburi = 'colgroup:table0:g0' + self.session.create(suburi, create_params) + cursor = None if self.use_index: # Test Index Cursors bound API support. @@ -69,7 +78,9 @@ class test_cursor_bound01(wttest.WiredTigerTestCase): '/Invalid argument/') # Check that bound configuration works properly. + cursor.set_key(0) cursor.bound("bound=lower") + cursor.set_key(10) cursor.bound("bound=upper") # Clear and inclusive configuration are not compatible with each other. diff --git a/src/third_party/wiredtiger/test/suite/test_cursor_bound02.py b/src/third_party/wiredtiger/test/suite/test_cursor_bound02.py new file mode 100644 index 00000000000..5e8ec36f422 --- /dev/null +++ b/src/third_party/wiredtiger/test/suite/test_cursor_bound02.py @@ -0,0 +1,294 @@ +#!/usr/bin/env python +# +# Public Domain 2014-present MongoDB, Inc. +# Public Domain 2008-2014 WiredTiger, Inc. +# +# This is free and unencumbered software released into the public domain. +# +# Anyone is free to copy, modify, publish, use, compile, sell, or +# distribute this software, either in source code form or as a compiled +# binary, for any purpose, commercial or non-commercial, and by any +# means. +# +# In jurisdictions that recognize copyright laws, the author or authors +# of this software dedicate any and all copyright interest in the +# software to the public domain. We make this dedication for the benefit +# of the public at large and to the detriment of our heirs and +# successors. We intend this dedication to be an overt act of +# relinquishment in perpetuity of all present and future rights to this +# software under copyright law. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +import wiredtiger, wttest +from wtscenario import make_scenarios + +# test_cursor_bound02.py +# Test that setting bounds of different key formats works in the cursor bound API. Make +# sure that WiredTiger complains when the upper and lower bounds overlap and that clearing the +# bounds through the bound API and reset calls work appriopately. +class test_cursor_bound02(wttest.WiredTigerTestCase): + file_name = 'test_cursor_bound02' + + types = [ + ('file', dict(uri='file:', use_colgroup=False)), + ('table', dict(uri='table:', use_colgroup=False)), + ('colgroup', dict(uri='table:', use_colgroup=True)) + ] + + key_format_values = [ + ('string', dict(key_format='S')), + ('var', dict(key_format='r')), + ('int', dict(key_format='i')), + ('bytes', dict(key_format='u')), + ('composite_string', dict(key_format='SSS')), + ('composite_int_string', dict(key_format='iS')), + ('composite_complex', dict(key_format='iSru')), + ] + + inclusive = [ + ('inclusive', dict(inclusive=True)), + ('no-inclusive', dict(inclusive=False)) + ] + scenarios = make_scenarios(types, key_format_values, inclusive) + + def gen_key(self, i): + tuple_key = [] + for key in self.key_format: + if key == 'S' or key == 'u': + tuple_key.append('key' + str(i)) + elif key == "r": + tuple_key.append(self.recno(i)) + elif key == "i": + tuple_key.append(i) + + if (len(self.key_format) == 1): + return tuple_key[0] + else: + return tuple(tuple_key) + + def gen_colgroup_create_param(self): + create_params = ",columns=(" + start = 0 + for _ in self.key_format: + create_params += "k{0},".format(str(start)) + start += 1 + create_params += "v),colgroups=(g0)" + return create_params + + def set_bounds(self, cursor, bound_config): + inclusive_config = ",inclusive=false" if self.inclusive == False else "" + return cursor.bound("bound={0}{1}".format(bound_config, inclusive_config)) + + def test_bound_api(self): + uri = self.uri + self.file_name + create_params = 'value_format=S,key_format={}'.format(self.key_format) + if self.use_colgroup: + create_params += self.gen_colgroup_create_param() + self.session.create(uri, create_params) + # Add in column group. + if self.use_colgroup: + create_params = 'columns=(v),' + suburi = 'colgroup:{0}:g0'.format(self.file_name) + self.session.create(suburi, create_params) + + cursor = self.session.open_cursor(uri) + + # Test bound API: Basic usage. + cursor.set_key(self.gen_key(40)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Upper bound < lower bound. + cursor.set_key(self.gen_key(30)) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "upper"), '/Invalid argument/') + + # Test bound API: Lower bound > upper bound. + cursor.set_key(self.gen_key(95)) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "lower"), '/Invalid argument/') + + # Test bound API: Test setting lower bound to 20, which would succeed setting upper + # bound to 30 + cursor.set_key(self.gen_key(20)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(30)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Test setting upper bound to 99, which would succeed setting lower + # bound to 90 + cursor.set_key(self.gen_key(99)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + + # Test bound API: No key set. + cursor.reset() + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "lower"), '/Invalid argument/') + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "upper"), '/Invalid argument/') + + # Test bound API: Test that the key persists after lower bound call. + cursor.set_key(self.gen_key(30)) + cursor.set_value("30") + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.insert() + + # Test bound API: Test that the key persists after upper bound call. + cursor.set_key(self.gen_key(90)) + cursor.set_value("90") + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + cursor.insert() + + # Test bound API: that if lower bound is equal to the upper bound, that both bounds needs to + # have inclusive configured. + cursor.bound("action=clear") + cursor.set_key(self.gen_key(50)) + self.assertEqual(cursor.bound("bound=lower,inclusive=true"), 0) + self.assertEqual(cursor.bound("bound=upper,inclusive=true"), 0) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.bound("bound=lower,inclusive=false"), '/Invalid argument/') + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.bound("bound=upper,inclusive=false"), '/Invalid argument/') + + # Test bound API: Test that only setting one of the bound inclusive config to true, should + # fail too. + cursor.bound("action=clear") + self.assertEqual(cursor.bound("bound=lower,inclusive=false"), 0) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.bound("bound=upper,inclusive=false"), '/Invalid argument/') + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.bound("bound=upper,inclusive=true"), '/Invalid argument/') + + cursor.bound("action=clear") + self.assertEqual(cursor.bound("bound=upper,inclusive=false"), 0) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.bound("bound=lower,inclusive=false"), '/Invalid argument/') + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.bound("bound=lower,inclusive=true"), '/Invalid argument/') + + + def test_bound_api_reset(self): + uri = self.uri + self.file_name + create_params = 'value_format=S,key_format={}'.format(self.key_format) + if self.use_colgroup: + create_params += self.gen_colgroup_create_param() + self.session.create(uri, create_params) + # Add in column group. + if self.use_colgroup: + create_params = 'columns=(v),' + suburi = 'colgroup:{0}:g0'.format(self.file_name) + self.session.create(suburi, create_params) + cursor = self.session.open_cursor(uri) + + cursor.set_key(self.gen_key(30)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Test that cursor reset works on the lower bound. + cursor.set_key(self.gen_key(10)) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "upper"), '/Invalid argument/') + cursor.reset() + cursor.set_key(self.gen_key(10)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Test that cursor reset works on the upper bound. + cursor.set_key(self.gen_key(99)) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "lower"), '/Invalid argument/') + cursor.reset() + cursor.set_key(self.gen_key(99)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + + # Test bound API: Test that cursor reset works the clearing bounds both ways. + cursor.set_key(self.gen_key(50)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.reset() + cursor.set_key(self.gen_key(20)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(99)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + cursor.set_key(self.gen_key(55)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + cursor.reset() + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(99)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Make sure that a clear and reset works sequentially. + cursor.reset() + self.assertEqual(cursor.bound("action=clear"), 0) + + cursor.set_key(self.gen_key(30)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + self.assertEqual(cursor.bound("action=clear"), 0) + cursor.reset() + + # Test bound API: Test that reset works after a reset. + cursor.set_key(self.gen_key(30)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + cursor.reset() + cursor.reset() + + def test_bound_api_clear(self): + uri = self.uri + self.file_name + create_params = 'value_format=S,key_format={}'.format(self.key_format) + if self.use_colgroup: + create_params += self.gen_colgroup_create_param() + self.session.create(uri, create_params) + # Add in column group. + if self.use_colgroup: + create_params = 'columns=(v),' + suburi = 'colgroup:{0}:g0'.format(self.file_name) + self.session.create(suburi, create_params) + cursor = self.session.open_cursor(uri) + + cursor.set_key(self.gen_key(30)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Test that clearing the lower bound works. + cursor.set_key(self.gen_key(10)) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "upper"), '/Invalid argument/') + self.assertEqual(cursor.bound("action=clear,bound=lower"), 0) + cursor.set_key(self.gen_key(10)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Test that clearing the upper bound works. + cursor.set_key(self.gen_key(99)) + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.set_bounds(cursor, "lower"), '/Invalid argument/') + self.assertEqual(cursor.bound("action=clear,bound=upper"), 0) + cursor.set_key(self.gen_key(99)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + + # Test bound API: Test that clearing both of the bounds works. + cursor.reset() + cursor.set_key(self.gen_key(50)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + self.assertEqual(cursor.bound("action=clear"), 0) + cursor.set_key(self.gen_key(90)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(99)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + cursor.reset() + cursor.set_key(self.gen_key(50)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + self.assertEqual(cursor.bound("action=clear"), 0) + cursor.set_key(self.gen_key(20)) + self.assertEqual(self.set_bounds(cursor, "lower"), 0) + cursor.set_key(self.gen_key(99)) + self.assertEqual(self.set_bounds(cursor, "upper"), 0) + + # Test bound API: Test that clear works after a clear. + self.assertEqual(cursor.bound("action=clear"), 0) + self.assertEqual(cursor.bound("action=clear"), 0) + +if __name__ == '__main__': + wttest.run() diff --git a/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp b/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp index 59dfebc19ba..a3461ccd814 100644 --- a/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp +++ b/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp @@ -37,7 +37,7 @@ TEST_CASE("Reconciliation tracking: ovfl_discard_verbose", "[reconciliation]") SECTION("handle null page and tag") { - REQUIRE(__ut_ovfl_discard_verbose(session, nullptr, nullptr, nullptr) == 0); + REQUIRE(__ut_ovfl_discard_verbose(session, nullptr, nullptr, nullptr) == EINVAL); } } diff --git a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp index 81d838d7f3b..0bb79182546 100644 --- a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp +++ b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.cpp @@ -16,7 +16,20 @@ ConnectionWrapper::ConnectionWrapper(const std::string &db_home) : _conn_impl(nullptr), _conn(nullptr), _db_home(db_home) { - utils::throwIfNonZero(mkdir(_db_home.c_str(), 0700)); + struct stat sb; + /* + * Check if the DB Home exists and is a directory, without this the mkdir can fail on some + * platforms (win). + */ + if (stat(_db_home.c_str(), &sb) == 0) { + if (!S_ISDIR(sb.st_mode)) { + std::string errorMessage("Path exists and is not a directory: " + db_home); + throw std::runtime_error(errorMessage); + } + /* We are happy that it is an existing directory. */ + } else { + utils::throwIfNonZero(mkdir(_db_home.c_str(), 0700)); + } utils::throwIfNonZero(wiredtiger_open(_db_home.c_str(), nullptr, "create", &_conn)); } diff --git a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h index 1093e4465d9..c064639a903 100644 --- a/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h +++ b/src/third_party/wiredtiger/test/unittest/tests/wrappers/connection_wrapper.h @@ -13,6 +13,10 @@ #include <string> #include "wt_internal.h" +#ifdef _WIN32 +#include "windows_shim.h" +#endif + /* * Prefer a "real" class over a mock class when you need a fully fleshed-out connection or session. * There's a speed cost to this, since it will write a bunch of files to disk during the test, which diff --git a/src/third_party/wiredtiger/test/windows/windows_shim.h b/src/third_party/wiredtiger/test/windows/windows_shim.h index 15bd2ac19dc..06b60360c69 100644 --- a/src/third_party/wiredtiger/test/windows/windows_shim.h +++ b/src/third_party/wiredtiger/test/windows/windows_shim.h @@ -44,6 +44,7 @@ * Emulate <sys/stat.h> */ #define mkdir(path, mode) _mkdir(path) +#define S_ISDIR(mode) ((mode & _S_IFDIR) == _S_IFDIR) /* * Emulate <sys/time.h> |