diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-06-02 17:07:17 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-02 07:33:11 +0000 |
commit | 2c7af4dc401cc366b796461d4d3a6e2fb269ec9b (patch) | |
tree | b4043b7e93c1f495db0a9f77acb4ac4a0965e58e /src/third_party | |
parent | 88b6242dbcb7815a89fb84cdbce260f18015db92 (diff) | |
download | mongo-2c7af4dc401cc366b796461d4d3a6e2fb269ec9b.tar.gz |
Import wiredtiger: cc2458c2c238b08db817161915d00d7e19c6ba29 from branch mongodb-4.4
ref: 943d9cdd2a..cc2458c2c2
for: 4.5.1
WT-6295 Aggregate time windows in salvage
WT-6297 Increase data size for test_checkpoint04.py
WT-6301 Add shorter running stress jobs
WT-6323 Increase cache size in prepare unit tests to avoid rollback errors
WT-6329 Add stats to track number of entries skipped by cursor next and prev
WT-6332 Don't configure HS cursor walk with test/format in-memory configuration
WT-6333 Fix memory leak in hs_cursor
WT-6334 Coverity: Use return value when closing incremental backup cursor
WT-6335 Formatting cleanups for history-store modify records
WT-6336 Minor cleanup in test/format buffer handling
WT-6337 Temporarily disable format's history store cursor scan
WT-6338 Retrieve at least one key to ensure it's valid for HS cursor scan
WT-6347 Don't reset transaction ids when evicting mixed mode tombstones and clear history store contents for mixed mode updates
WT-6350 Immediately evict the pages that are read by rollback to stable
WT-6352 Remove obsolete options from the wt verify API
Diffstat (limited to 'src/third_party')
33 files changed, 789 insertions, 720 deletions
diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index f75d0bd1d4a..5d092836b29 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -360,7 +360,13 @@ connection_stats = [ CursorStat('cursor_modify_bytes', 'cursor modify key and value bytes affected', 'size'), CursorStat('cursor_modify_bytes_touch', 'cursor modify value bytes modified', 'size'), CursorStat('cursor_next', 'cursor next calls'), + CursorStat('cursor_next_skip_ge_100', 'cursor next calls that skip greater than or equal to 100 entries'), + CursorStat('cursor_next_skip_lt_100', 'cursor next calls that skip less than 100 entries'), + CursorStat('cursor_next_skip_total', 'Total number of entries skipped by cursor next calls'), CursorStat('cursor_prev', 'cursor prev calls'), + CursorStat('cursor_prev_skip_ge_100', 'cursor prev calls that skip greater than or equal to 100 entries'), + CursorStat('cursor_prev_skip_lt_100', 'cursor prev calls that skip less than 100 entries'), + CursorStat('cursor_prev_skip_total', 'Total number of entries skipped by cursor prev calls'), CursorStat('cursor_remove', 'cursor remove calls'), CursorStat('cursor_remove_bytes', 'cursor remove key bytes removed', 'size'), CursorStat('cursor_reopen', 'cursors reused from cache'), @@ -814,7 +820,13 @@ dsrc_stats = [ CursorStat('cursor_modify_bytes', 'modify key and value bytes affected', 'size'), CursorStat('cursor_modify_bytes_touch', 'modify value bytes modified', 'size'), CursorStat('cursor_next', 'next calls'), + CursorStat('cursor_next_skip_ge_100', 'cursor next calls that skip greater than or equal to 100 entries'), + CursorStat('cursor_next_skip_lt_100', 'cursor next calls that skip less than 100 entries'), + CursorStat('cursor_next_skip_total', 'Total number of entries skipped by cursor next calls'), CursorStat('cursor_prev', 'prev calls'), + CursorStat('cursor_prev_skip_ge_100', 'cursor prev calls that skip greater than or equal to 100 entries'), + CursorStat('cursor_prev_skip_lt_100', 'cursor prev calls that skip less than 100 entries'), + CursorStat('cursor_prev_skip_total', 'Total number of entries skipped by cursor prev calls'), CursorStat('cursor_remove', 'remove calls'), CursorStat('cursor_remove_bytes', 'remove key bytes removed', 'size'), CursorStat('cursor_reopen', 'cache cursors reuse count'), diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index dd5170decfd..77a5d85e3d6 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-4.4", - "commit": "943d9cdd2a1cfc4ae357da44ec497b5115ff3139" + "commit": "cc2458c2c238b08db817161915d00d7e19c6ba29" } diff --git a/src/third_party/wiredtiger/src/btree/bt_curnext.c b/src/third_party/wiredtiger/src/btree/bt_curnext.c index febfba92d77..4b20a8fa3a2 100644 --- a/src/third_party/wiredtiger/src/btree/bt_curnext.c +++ b/src/third_party/wiredtiger/src/btree/bt_curnext.c @@ -133,11 +133,12 @@ restart_read: * Return the next variable-length entry on the append list. */ static inline int -__cursor_var_append_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) +__cursor_var_append_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart, size_t *skippedp) { WT_SESSION_IMPL *session; session = CUR2S(cbt); + *skippedp = 0; /* If restarting after a prepare conflict, jump to the right spot. */ if (restart) @@ -158,12 +159,15 @@ new_page: restart_read: WT_RET(__wt_txn_read_upd_list(session, cbt, cbt->ins->upd, NULL)); - if (cbt->upd_value->type == WT_UPDATE_INVALID) + if (cbt->upd_value->type == WT_UPDATE_INVALID) { + ++*skippedp; continue; + } if (cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -176,7 +180,7 @@ restart_read: * Move to the next, variable-length column-store item. */ static inline int -__cursor_var_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) +__cursor_var_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart, size_t *skippedp) { WT_CELL *cell; WT_CELL_UNPACK_KV unpack; @@ -190,6 +194,7 @@ __cursor_var_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) page = cbt->ref->page; rle_start = 0; /* -Werror=maybe-uninitialized */ + *skippedp = 0; /* If restarting after a prepare conflict, jump to the right spot. */ if (restart) @@ -233,6 +238,7 @@ restart_read: if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -247,8 +253,10 @@ restart_read: cell = WT_COL_PTR(page, cip); __wt_cell_unpack_kv(session, page->dsk, cell, &unpack); if (unpack.type == WT_CELL_DEL) { - if ((rle = __wt_cell_rle(&unpack)) == 1) + if ((rle = __wt_cell_rle(&unpack)) == 1) { + ++*skippedp; continue; + } /* * There can be huge gaps in the variable-length column-store name space appearing @@ -272,13 +280,17 @@ restart_read: /* Adjust for the outer loop increment. */ --cbt->recno; + ++*skippedp; continue; } WT_RET(__wt_bt_col_var_cursor_walk_txn_read(session, cbt, page, &unpack, cip)); if (cbt->upd_value->type == WT_UPDATE_INVALID || - cbt->upd_value->type == WT_UPDATE_TOMBSTONE) + cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { + ++*skippedp; continue; + } + return (0); } cbt->iface.value.data = cbt->tmp->data; @@ -293,7 +305,7 @@ restart_read: * Move to the next row-store item. */ static inline int -__cursor_row_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) +__cursor_row_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart, size_t *skippedp) { WT_CELL_UNPACK_KV kpack; WT_INSERT *ins; @@ -306,6 +318,7 @@ __cursor_row_next(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) session = CUR2S(cbt); page = cbt->ref->page; key = &cbt->iface.key; + *skippedp = 0; /* If restarting after a prepare conflict, jump to the right spot. */ if (restart) { @@ -353,12 +366,15 @@ restart_read_insert: key->data = WT_INSERT_KEY(ins); key->size = WT_INSERT_KEY_SIZE(ins); WT_RET(__wt_txn_read_upd_list(session, cbt, ins->upd, NULL)); - if (cbt->upd_value->type == WT_UPDATE_INVALID) + if (cbt->upd_value->type == WT_UPDATE_INVALID) { + ++*skippedp; continue; + } if (cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -388,12 +404,15 @@ restart_read_page: WT_RET(__cursor_row_slot_key_return(cbt, rip, &kpack, &kpack_used)); WT_RET(__wt_txn_read( session, cbt, &cbt->iface.key, WT_RECNO_OOB, WT_ROW_UPDATE(page, rip), NULL)); - if (cbt->upd_value->type == WT_UPDATE_INVALID) + if (cbt->upd_value->type == WT_UPDATE_INVALID) { + ++*skippedp; continue; + } if (cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -608,11 +627,13 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating) WT_DECL_RET; WT_PAGE *page; WT_SESSION_IMPL *session; + size_t total_skipped, skipped; uint32_t flags; bool newpage, restart; cursor = &cbt->iface; session = CUR2S(cbt); + total_skipped = 0; WT_STAT_CONN_INCR(session, cursor_next); WT_STAT_DATA_INCR(session, cursor_next); @@ -646,7 +667,8 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating) ret = __cursor_fix_append_next(cbt, newpage, restart); break; case WT_PAGE_COL_VAR: - ret = __cursor_var_append_next(cbt, newpage, restart); + ret = __cursor_var_append_next(cbt, newpage, restart, &skipped); + total_skipped += skipped; break; default: WT_ERR(__wt_illegal_value(session, page->type)); @@ -662,10 +684,12 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating) ret = __cursor_fix_next(cbt, newpage, restart); break; case WT_PAGE_COL_VAR: - ret = __cursor_var_next(cbt, newpage, restart); + ret = __cursor_var_next(cbt, newpage, restart, &skipped); + total_skipped += skipped; break; case WT_PAGE_ROW_LEAF: - ret = __cursor_row_next(cbt, newpage, restart); + ret = __cursor_row_next(cbt, newpage, restart, &skipped); + total_skipped += skipped; break; default: WT_ERR(__wt_illegal_value(session, page->type)); @@ -708,6 +732,17 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating) } err: + if (total_skipped < 100) { + WT_STAT_CONN_INCR(session, cursor_next_skip_lt_100); + WT_STAT_DATA_INCR(session, cursor_next_skip_lt_100); + } else { + WT_STAT_CONN_INCR(session, cursor_next_skip_ge_100); + WT_STAT_DATA_INCR(session, cursor_next_skip_ge_100); + } + + WT_STAT_CONN_INCRV(session, cursor_next_skip_total, total_skipped); + WT_STAT_DATA_INCRV(session, cursor_next_skip_total, total_skipped); + switch (ret) { case 0: F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT); diff --git a/src/third_party/wiredtiger/src/btree/bt_curprev.c b/src/third_party/wiredtiger/src/btree/bt_curprev.c index 2b934061ab3..f3fcbd24144 100644 --- a/src/third_party/wiredtiger/src/btree/bt_curprev.c +++ b/src/third_party/wiredtiger/src/btree/bt_curprev.c @@ -273,11 +273,12 @@ restart_read: * Return the previous variable-length entry on the append list. */ static inline int -__cursor_var_append_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) +__cursor_var_append_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart, size_t *skippedp) { WT_SESSION_IMPL *session; session = CUR2S(cbt); + *skippedp = 0; /* If restarting after a prepare conflict, jump to the right spot. */ if (restart) @@ -297,12 +298,15 @@ new_page: __cursor_set_recno(cbt, WT_INSERT_RECNO(cbt->ins)); restart_read: WT_RET(__wt_txn_read_upd_list(session, cbt, cbt->ins->upd, NULL)); - if (cbt->upd_value->type == WT_UPDATE_INVALID) + if (cbt->upd_value->type == WT_UPDATE_INVALID) { + ++*skippedp; continue; + } if (cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -315,7 +319,7 @@ restart_read: * Move to the previous, variable-length column-store item. */ static inline int -__cursor_var_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) +__cursor_var_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart, size_t *skippedp) { WT_CELL *cell; WT_CELL_UNPACK_KV unpack; @@ -329,6 +333,7 @@ __cursor_var_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) page = cbt->ref->page; rle_start = 0; /* -Werror=maybe-uninitialized */ + *skippedp = 0; /* If restarting after a prepare conflict, jump to the right spot. */ if (restart) @@ -373,6 +378,7 @@ restart_read: if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -387,8 +393,10 @@ restart_read: cell = WT_COL_PTR(page, cip); __wt_cell_unpack_kv(session, page->dsk, cell, &unpack); if (unpack.type == WT_CELL_DEL) { - if (__wt_cell_rle(&unpack) == 1) + if (__wt_cell_rle(&unpack) == 1) { + ++*skippedp; continue; + } /* * There can be huge gaps in the variable-length column-store name space appearing @@ -412,13 +420,16 @@ restart_read: /* Adjust for the outer loop decrement. */ ++cbt->recno; + ++*skippedp; continue; } WT_RET(__wt_bt_col_var_cursor_walk_txn_read(session, cbt, page, &unpack, cip)); if (cbt->upd_value->type == WT_UPDATE_INVALID || - cbt->upd_value->type == WT_UPDATE_TOMBSTONE) + cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { + ++*skippedp; continue; + } return (0); } cbt->iface.value.data = cbt->tmp->data; @@ -433,7 +444,7 @@ restart_read: * Move to the previous row-store item. */ static inline int -__cursor_row_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) +__cursor_row_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart, size_t *skippedp) { WT_CELL_UNPACK_KV kpack; WT_INSERT *ins; @@ -446,6 +457,7 @@ __cursor_row_prev(WT_CURSOR_BTREE *cbt, bool newpage, bool restart) session = CUR2S(cbt); page = cbt->ref->page; key = &cbt->iface.key; + *skippedp = 0; /* If restarting after a prepare conflict, jump to the right spot. */ if (restart) { @@ -503,12 +515,15 @@ restart_read_insert: key->data = WT_INSERT_KEY(ins); key->size = WT_INSERT_KEY_SIZE(ins); WT_RET(__wt_txn_read_upd_list(session, cbt, ins->upd, NULL)); - if (cbt->upd_value->type == WT_UPDATE_INVALID) + if (cbt->upd_value->type == WT_UPDATE_INVALID) { + ++*skippedp; continue; + } if (cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -540,12 +555,15 @@ restart_read_page: WT_RET(__cursor_row_slot_key_return(cbt, rip, &kpack, &kpack_used)); WT_RET(__wt_txn_read( session, cbt, &cbt->iface.key, WT_RECNO_OOB, WT_ROW_UPDATE(page, rip), NULL)); - if (cbt->upd_value->type == WT_UPDATE_INVALID) + if (cbt->upd_value->type == WT_UPDATE_INVALID) { + ++*skippedp; continue; + } if (cbt->upd_value->type == WT_UPDATE_TOMBSTONE) { if (cbt->upd_value->tw.stop_txn != WT_TXN_NONE && __wt_txn_upd_value_visible_all(session, cbt->upd_value)) ++cbt->page_deleted_count; + ++*skippedp; continue; } return (__wt_value_return(cbt, cbt->upd_value)); @@ -564,11 +582,13 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating) WT_DECL_RET; WT_PAGE *page; WT_SESSION_IMPL *session; + size_t total_skipped, skipped; uint32_t flags; bool newpage, restart; cursor = &cbt->iface; session = CUR2S(cbt); + total_skipped = 0; WT_STAT_CONN_INCR(session, cursor_prev); WT_STAT_DATA_INCR(session, cursor_prev); @@ -611,7 +631,8 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating) ret = __cursor_fix_append_prev(cbt, newpage, restart); break; case WT_PAGE_COL_VAR: - ret = __cursor_var_append_prev(cbt, newpage, restart); + ret = __cursor_var_append_prev(cbt, newpage, restart, &skipped); + total_skipped += skipped; break; default: WT_ERR(__wt_illegal_value(session, page->type)); @@ -629,10 +650,12 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating) ret = __cursor_fix_prev(cbt, newpage, restart); break; case WT_PAGE_COL_VAR: - ret = __cursor_var_prev(cbt, newpage, restart); + ret = __cursor_var_prev(cbt, newpage, restart, &skipped); + total_skipped += skipped; break; case WT_PAGE_ROW_LEAF: - ret = __cursor_row_prev(cbt, newpage, restart); + ret = __cursor_row_prev(cbt, newpage, restart, &skipped); + total_skipped += skipped; break; default: WT_ERR(__wt_illegal_value(session, page->type)); @@ -666,6 +689,17 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating) } err: + if (total_skipped < 100) { + WT_STAT_CONN_INCR(session, cursor_prev_skip_lt_100); + WT_STAT_DATA_INCR(session, cursor_prev_skip_lt_100); + } else { + WT_STAT_CONN_INCR(session, cursor_prev_skip_ge_100); + WT_STAT_DATA_INCR(session, cursor_prev_skip_ge_100); + } + + WT_STAT_CONN_INCRV(session, cursor_prev_skip_total, total_skipped); + WT_STAT_DATA_INCRV(session, cursor_prev_skip_total, total_skipped); + switch (ret) { case 0: F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT); diff --git a/src/third_party/wiredtiger/src/btree/bt_debug.c b/src/third_party/wiredtiger/src/btree/bt_debug.c index 09871831d2b..dff7010448a 100644 --- a/src/third_party/wiredtiger/src/btree/bt_debug.c +++ b/src/third_party/wiredtiger/src/btree/bt_debug.c @@ -44,7 +44,7 @@ static const /* Output separator */ static int __debug_col_skip(WT_DBG *, WT_INSERT_HEAD *, const char *, bool); static int __debug_config(WT_SESSION_IMPL *, WT_DBG *, const char *); -static int __debug_modify(WT_DBG *, const uint8_t *, const char *); +static int __debug_modify(WT_DBG *, const uint8_t *); static int __debug_page(WT_DBG *, WT_REF *, uint32_t); static int __debug_page_col_fix(WT_DBG *, WT_REF *); static int __debug_page_col_int(WT_DBG *, WT_PAGE *, uint32_t); @@ -432,7 +432,9 @@ __debug_hs_cursor(WT_DBG *ds, WT_CURSOR *hs_cursor) "\t" "hs-modify: %s\n", __wt_time_window_to_string(&tw, time_string))); - WT_RET(__debug_modify(ds, ds->hs_value->data, "V")); + WT_RET(ds->f(ds, "\tV ")); + WT_RET(__debug_modify(ds, ds->hs_value->data)); + WT_RET(ds->f(ds, "\n")); break; case WT_UPDATE_STANDARD: WT_RET(ds->f(ds, @@ -1429,7 +1431,7 @@ __debug_row_skip(WT_DBG *ds, WT_INSERT_HEAD *head) * Dump a modify update. */ static int -__debug_modify(WT_DBG *ds, const uint8_t *data, const char *tag) +__debug_modify(WT_DBG *ds, const uint8_t *data) { size_t nentries, data_size, offset, size; const size_t *p; @@ -1438,7 +1440,7 @@ __debug_modify(WT_DBG *ds, const uint8_t *data, const char *tag) memcpy(&nentries, p++, sizeof(size_t)); data += sizeof(size_t) + (nentries * 3 * sizeof(size_t)); - WT_RET(ds->f(ds, "%s%" WT_SIZET_FMT ": ", tag != NULL ? tag : "", nentries)); + WT_RET(ds->f(ds, "%" WT_SIZET_FMT ": ", nentries)); for (; nentries-- > 0; data += data_size) { memcpy(&data_size, p++, sizeof(size_t)); memcpy(&offset, p++, sizeof(size_t)); @@ -1469,7 +1471,7 @@ __debug_update(WT_DBG *ds, WT_UPDATE *upd, bool hexbyte) break; case WT_UPDATE_MODIFY: WT_RET(ds->f(ds, "\tvalue {modify: ")); - WT_RET(__debug_modify(ds, upd->data, NULL)); + WT_RET(__debug_modify(ds, upd->data)); WT_RET(ds->f(ds, "}\n")); break; case WT_UPDATE_RESERVE: diff --git a/src/third_party/wiredtiger/src/btree/bt_slvg.c b/src/third_party/wiredtiger/src/btree/bt_slvg.c index dfd023f7434..a652d68727f 100644 --- a/src/third_party/wiredtiger/src/btree/bt_slvg.c +++ b/src/third_party/wiredtiger/src/btree/bt_slvg.c @@ -53,9 +53,10 @@ struct __wt_track_shared { /* * Physical information about the file block. */ - WT_ADDR addr; /* Page address */ - uint32_t size; /* Page size */ - uint64_t gen; /* Page generation */ + WT_TIME_AGGREGATE ta; /* Timestamp information */ + WT_ADDR addr; /* Page address */ + uint32_t size; /* Page size */ + uint64_t gen; /* Page generation */ /* * Pages that reference overflow pages contain a list of the overflow pages they reference. We @@ -81,6 +82,7 @@ struct __wt_track { #define trk_ovfl_cnt shared->ovfl_cnt #define trk_ovfl_slot shared->ovfl_slot #define trk_size shared->size +#define trk_ta shared->ta WT_TRACK_SHARED *shared; /* Shared information */ WT_STUFF *ss; /* Enclosing stuff */ @@ -186,8 +188,6 @@ __slvg_checkpoint(WT_SESSION_IMPL *session, WT_REF *root) __wt_seconds(session, &ckptbase->sec); WT_ERR(__wt_metadata_search(session, dhandle->name, &config)); WT_ERR(__wt_meta_block_metadata(session, config, ckptbase)); - WT_TIME_AGGREGATE_INIT(&ckptbase->ta); - ckptbase->write_gen = btree->write_gen; F_SET(ckptbase, WT_CKPT_ADD); /* @@ -596,6 +596,8 @@ __slvg_trk_leaf(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, uint8_t *ad trk->col_stop); break; case WT_PAGE_COL_VAR: + WT_TIME_AGGREGATE_INIT_MAX(&trk->trk_ta); + /* * Column-store variable-length format: the start key can be taken from the block's header, * stop key requires walking the page. @@ -603,6 +605,8 @@ __slvg_trk_leaf(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, uint8_t *ad stop_recno = dsk->recno; WT_CELL_FOREACH_KV (session, dsk, unpack) { stop_recno += __wt_cell_rle(&unpack); + + WT_TIME_AGGREGATE_UPDATE(&trk->trk_ta, &unpack.tw); } WT_CELL_FOREACH_END; @@ -617,6 +621,12 @@ __slvg_trk_leaf(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, uint8_t *ad WT_ERR(__slvg_trk_leaf_ovfl(session, dsk, trk)); break; case WT_PAGE_ROW_LEAF: + WT_TIME_AGGREGATE_INIT_MAX(&trk->trk_ta); + WT_CELL_FOREACH_KV (session, dsk, unpack) { + WT_TIME_AGGREGATE_UPDATE(&trk->trk_ta, &unpack.tw); + } + WT_CELL_FOREACH_END; + /* * Row-store format: copy the first and last keys on the page. Keys are prefix-compressed, * the simplest and slowest thing to do is instantiate the in-memory page, then instantiate @@ -1159,12 +1169,8 @@ __slvg_col_build_internal(WT_SESSION_IMPL *session, uint32_t leaf_cnt, WT_STUFF ref->home = page; ref->page = NULL; - /* - * Salvage doesn't read tree internal pages, so all pages are immediately durable, - * regardless of a value's timestamps or transaction IDs. - */ WT_ERR(__wt_calloc_one(session, &addr)); - WT_TIME_AGGREGATE_INIT(&addr->ta); + WT_TIME_AGGREGATE_COPY(&addr->ta, &trk->trk_ta); WT_ERR(__wt_memdup(session, trk->trk_addr, trk->trk_addr_size, &addr->addr)); addr->size = trk->trk_addr_size; addr->type = trk->trk_ovfl_cnt == 0 ? WT_ADDR_LEAF_NO : WT_ADDR_LEAF; @@ -1762,12 +1768,8 @@ __slvg_row_build_internal(WT_SESSION_IMPL *session, uint32_t leaf_cnt, WT_STUFF ref->home = page; ref->page = NULL; - /* - * Salvage doesn't read tree internal pages, so all pages are immediately durable, - * regardless of a value's timestamps or transaction IDs. - */ WT_ERR(__wt_calloc_one(session, &addr)); - WT_TIME_AGGREGATE_INIT(&addr->ta); + WT_TIME_AGGREGATE_COPY(&addr->ta, &trk->trk_ta); WT_ERR(__wt_memdup(session, trk->trk_addr, trk->trk_addr_size, &addr->addr)); addr->size = trk->trk_addr_size; addr->type = trk->trk_ovfl_cnt == 0 ? WT_ADDR_LEAF_NO : WT_ADDR_LEAF; diff --git a/src/third_party/wiredtiger/src/cursor/cur_backup.c b/src/third_party/wiredtiger/src/cursor/cur_backup.c index 01ffa7a9699..77b0cf94268 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_backup.c +++ b/src/third_party/wiredtiger/src/cursor/cur_backup.c @@ -169,7 +169,7 @@ err: * __backup_free -- * Free list resources for a backup cursor. */ -static void +static int __backup_free(WT_SESSION_IMPL *session, WT_CURSOR_BACKUP *cb) { int i; @@ -181,7 +181,8 @@ __backup_free(WT_SESSION_IMPL *session, WT_CURSOR_BACKUP *cb) } if (cb->incr_file != NULL) __wt_free(session, cb->incr_file); - __wt_curbackup_free_incr(session, cb); + + return (__wt_curbackup_free_incr(session, cb)); } /* @@ -213,7 +214,7 @@ err: * cursor is closed), because that cursor will never not be responsible for cleanup. */ if (F_ISSET(cb, WT_CURBACKUP_DUP)) { - __backup_free(session, cb); + WT_TRET(__backup_free(session, cb)); /* Make sure the original backup cursor is still open. */ WT_ASSERT(session, F_ISSET(session, WT_SESSION_BACKUP_CURSOR)); F_CLR(session, WT_SESSION_BACKUP_DUP); @@ -760,7 +761,7 @@ __backup_stop(WT_SESSION_IMPL *session, WT_CURSOR_BACKUP *cb) WT_WITH_HOTBACKUP_WRITE_LOCK(session, conn->hot_backup_list = NULL); if (cb->incr_src != NULL) F_CLR(cb->incr_src, WT_BLKINCR_INUSE); - __backup_free(session, cb); + WT_TRET(__backup_free(session, cb)); /* Remove any backup specific file. */ WT_TRET(__wt_backup_file_remove(session)); 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 90a797ba56e..e3ac1eb723e 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c +++ b/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c @@ -169,13 +169,17 @@ err: * __wt_curbackup_free_incr -- * Free the duplicate backup cursor for a file-based incremental backup. */ -void +int __wt_curbackup_free_incr(WT_SESSION_IMPL *session, WT_CURSOR_BACKUP *cb) { + WT_DECL_RET; + __wt_free(session, cb->incr_file); if (cb->incr_cursor != NULL) - cb->incr_cursor->close(cb->incr_cursor); + ret = cb->incr_cursor->close(cb->incr_cursor); __wt_buf_free(session, &cb->bitstring); + + return (ret); } /* @@ -233,7 +237,7 @@ __wt_curbackup_open_incr(WT_SESSION_IMPL *session, const char *uri, WT_CURSOR *o err: if (ret != 0) - __wt_curbackup_free_incr(session, cb); + WT_TRET(__wt_curbackup_free_incr(session, cb)); __wt_scr_free(session, &open_uri); return (ret); } diff --git a/src/third_party/wiredtiger/src/docs/command-line.dox b/src/third_party/wiredtiger/src/docs/command-line.dox index e11d89567b4..2165b5215a3 100644 --- a/src/third_party/wiredtiger/src/docs/command-line.dox +++ b/src/third_party/wiredtiger/src/docs/command-line.dox @@ -440,7 +440,7 @@ The \c verify command verifies the specified table, exiting success if the data source is correct, and failure if the data source is corrupted. @subsection util_verify_synopsis Synopsis -<code>wt [-RrVv] [-C config] [-E secretkey ] [-h directory] verify [-s] [-d dump_address | dump_blocks | dump_history | dump_layout | dump_offsets=#,# | dump_pages ] [uri]</code> +<code>wt [-RrVv] [-C config] [-E secretkey ] [-h directory] verify [-s] [-d dump_address | dump_blocks | dump_layout | dump_offsets=#,# | dump_pages ] [uri]</code> @subsection util_verify_options Options The following are command-specific options for the \c verify command: diff --git a/src/third_party/wiredtiger/src/history/hs.c b/src/third_party/wiredtiger/src/history/hs.c index b430e9bde5c..6d1c63c5fdf 100644 --- a/src/third_party/wiredtiger/src/history/hs.c +++ b/src/third_party/wiredtiger/src/history/hs.c @@ -609,7 +609,7 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi) uint32_t i; uint8_t *p; int nentries; - bool squashed, track_prepare; + bool squashed, track_prepare, updates_in_hs, updates_older_than_onpage; uint8_t upd_count; btree = S2BT(session); @@ -664,7 +664,7 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi) __wt_free_update_list(session, &upd); upd = list->onpage_upd; second_older_than_prepare = NULL; - track_prepare = false; + track_prepare = updates_in_hs = updates_older_than_onpage = false; upd_count = 0; /* @@ -724,12 +724,15 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi) } } - /* - * If we've reached a full update and its in the history store we don't need to continue - * as anything beyond this point won't help with calculating deltas. - */ - if (upd->type == WT_UPDATE_STANDARD && F_ISSET(upd, WT_UPDATE_HS)) - break; + if (F_ISSET(upd, WT_UPDATE_HS)) { + updates_in_hs = true; + /* + * If we've reached a full update and its in the history store we don't need to + * continue as anything beyond this point won't help with calculating deltas. + */ + if (upd->type == WT_UPDATE_STANDARD) + break; + } } upd = NULL; @@ -739,10 +742,16 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi) __wt_modify_vector_pop(&modifies, &upd); WT_ASSERT(session, upd->type == WT_UPDATE_STANDARD || upd->type == WT_UPDATE_TOMBSTONE); + /* Skip TOMBSTONE at the end of the update chain. */ if (upd->type == WT_UPDATE_TOMBSTONE) { if (modifies.size > 0) { - if (upd->start_ts == WT_TS_NONE) { + /* + * We don't need to delete the history store records if everything is still on the + * insert list and there are no updates moved to the history store by checkpoint or + * a failed eviction. + */ + if ((list->ins == NULL || updates_in_hs) && upd->start_ts == WT_TS_NONE) { /* We can only delete history store entries that have timestamps. */ WT_ERR(__wt_hs_delete_key_from_ts(session, btree->id, key, 1)); WT_STAT_CONN_INCR(session, cache_hs_key_truncate_mix_ts); @@ -768,6 +777,7 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi) tmp = full_value, full_value = prev_full_value, prev_full_value = tmp, upd = prev_upd) { WT_ASSERT(session, upd->type == WT_UPDATE_STANDARD || upd->type == WT_UPDATE_MODIFY); + updates_older_than_onpage = true; __wt_modify_vector_pop(&modifies, &prev_upd); @@ -793,13 +803,24 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi) stop_time_point.txnid = prev_upd->txnid; } + /* + * Delete the history store records if we detect a mixed mode update. We don't need to + * do that if everything is still on the insert list and there are no updates moved to + * the history store by checkpoint or a failed eviction. + * + * Note that if the update is restored from data store or history store, we may have + * cleared its timestamp, remove the history store contents anyway in this case. + */ + if ((list->ins == NULL || updates_in_hs) && prev_upd->start_ts == WT_TS_NONE && + (upd->start_ts != WT_TS_NONE || + F_ISSET(upd, WT_UPDATE_RESTORED_FROM_DS | WT_UPDATE_RESTORED_FROM_HS))) { + /* We can only delete history store entries that have timestamps. */ + WT_ERR(__wt_hs_delete_key_from_ts(session, btree->id, key, 1)); + WT_STAT_CONN_INCR(session, cache_hs_key_truncate_mix_ts); + } + if (prev_upd->type == WT_UPDATE_TOMBSTONE) { WT_ASSERT(session, modifies.size > 0); - if (prev_upd->start_ts == WT_TS_NONE) { - /* We can only delete history store entries that have timestamps. */ - WT_ERR(__wt_hs_delete_key_from_ts(session, btree->id, key, 1)); - WT_STAT_CONN_INCR(session, cache_hs_key_truncate_mix_ts); - } __wt_modify_vector_pop(&modifies, &prev_upd); WT_ASSERT(session, prev_upd->type == WT_UPDATE_STANDARD); prev_full_value->data = prev_upd->data; @@ -853,8 +874,24 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi) squashed = true; } + WT_ASSERT(session, + upd->txnid == list->onpage_upd->txnid && upd->start_ts == list->onpage_upd->start_ts); + if (modifies.size > 0) WT_STAT_CONN_INCR(session, cache_hs_write_squash); + + /* + * Delete the history store records if the onpage update's timestamp is WT_TS_NONE and we + * don't see any update older than it. We don't need to do that if everything is still on + * the insert list and there are no updates moved to the history store by checkpoint or a + * failed eviction. + */ + if (!updates_older_than_onpage && (list->ins == NULL || updates_in_hs) && + upd->start_ts == WT_TS_NONE) { + /* We can only delete history store entries that have timestamps. */ + WT_ERR(__wt_hs_delete_key_from_ts(session, btree->id, key, 1)); + WT_STAT_CONN_INCR(session, cache_hs_key_truncate_mix_ts); + } } WT_ERR(__wt_block_manager_named_size(session, WT_HS_FILE, &hs_size)); diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h index 383ba2eb088..c2be01409f4 100644 --- a/src/third_party/wiredtiger/src/include/extern.h +++ b/src/third_party/wiredtiger/src/include/extern.h @@ -473,6 +473,8 @@ extern int __wt_connection_workers(WT_SESSION_IMPL *session, const char *cfg[]) extern int __wt_copy_and_sync(WT_SESSION *wt_session, const char *from, const char *to) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); +extern int __wt_curbackup_free_incr(WT_SESSION_IMPL *session, WT_CURSOR_BACKUP *cb) + WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_curbackup_open(WT_SESSION_IMPL *session, const char *uri, WT_CURSOR *other, const char *cfg[], WT_CURSOR **cursorp) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_curbackup_open_incr(WT_SESSION_IMPL *session, const char *uri, WT_CURSOR *other, @@ -1035,8 +1037,6 @@ extern int __wt_meta_ckptlist_set(WT_SESSION_IMPL *session, const char *fname, W WT_LSN *ckptlsn) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_meta_ckptlist_to_meta(WT_SESSION_IMPL *session, WT_CKPT *ckptbase, WT_ITEM *buf) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_meta_get_oldest_ckpt_timestamp(WT_SESSION_IMPL *session, const char *fname, - wt_timestamp_t *oldest_ckpt_ts) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_meta_sysinfo_set(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_meta_track_checkpoint(WT_SESSION_IMPL *session) @@ -1624,7 +1624,6 @@ extern void __wt_conn_config_discard(WT_SESSION_IMPL *session); extern void __wt_conn_foc_discard(WT_SESSION_IMPL *session); extern void __wt_conn_stat_init(WT_SESSION_IMPL *session); extern void __wt_connection_destroy(WT_CONNECTION_IMPL *conn); -extern void __wt_curbackup_free_incr(WT_SESSION_IMPL *session, WT_CURSOR_BACKUP *cb); extern void __wt_cursor_close(WT_CURSOR *cursor); extern void __wt_cursor_key_order_reset(WT_CURSOR_BTREE *cbt); extern void __wt_cursor_reopen(WT_CURSOR *cursor, WT_DATA_HANDLE *dhandle); diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index 907e0eac9af..11e59f299ee 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -477,6 +477,8 @@ struct __wt_connection_stats { int64_t fsync_io; int64_t read_io; int64_t write_io; + int64_t cursor_next_skip_total; + int64_t cursor_prev_skip_total; int64_t cursor_cached_count; int64_t cursor_insert_bulk; int64_t cursor_cache; @@ -487,8 +489,12 @@ struct __wt_connection_stats { int64_t cursor_modify_bytes; int64_t cursor_modify_bytes_touch; int64_t cursor_next; + 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_skip_ge_100; + int64_t cursor_prev_skip_lt_100; int64_t cursor_remove; int64_t cursor_remove_bytes; int64_t cursor_reserve; @@ -862,10 +868,16 @@ struct __wt_dsrc_stats { int64_t compress_write; int64_t compress_write_fail; int64_t compress_write_too_small; + int64_t cursor_next_skip_total; + int64_t cursor_prev_skip_total; int64_t cursor_insert_bulk; int64_t cursor_reopen; int64_t cursor_cache; int64_t cursor_create; + int64_t cursor_next_skip_ge_100; + int64_t cursor_next_skip_lt_100; + int64_t cursor_prev_skip_ge_100; + int64_t cursor_prev_skip_lt_100; 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 a3b2d5a79dd..72d79d9622f 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -5337,632 +5337,650 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_READ_IO 1180 /*! connection: total write I/Os */ #define WT_STAT_CONN_WRITE_IO 1181 +/*! cursor: Total number of entries skipped by cursor next calls */ +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_TOTAL 1182 +/*! cursor: Total number of entries skipped by cursor prev calls */ +#define WT_STAT_CONN_CURSOR_PREV_SKIP_TOTAL 1183 /*! cursor: cached cursor count */ -#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1182 +#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1184 /*! cursor: cursor bulk loaded cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT_BULK 1183 +#define WT_STAT_CONN_CURSOR_INSERT_BULK 1185 /*! cursor: cursor close calls that result in cache */ -#define WT_STAT_CONN_CURSOR_CACHE 1184 +#define WT_STAT_CONN_CURSOR_CACHE 1186 /*! cursor: cursor create calls */ -#define WT_STAT_CONN_CURSOR_CREATE 1185 +#define WT_STAT_CONN_CURSOR_CREATE 1187 /*! cursor: cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT 1186 +#define WT_STAT_CONN_CURSOR_INSERT 1188 /*! cursor: cursor insert key and value bytes */ -#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1187 +#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1189 /*! cursor: cursor modify calls */ -#define WT_STAT_CONN_CURSOR_MODIFY 1188 +#define WT_STAT_CONN_CURSOR_MODIFY 1190 /*! cursor: cursor modify key and value bytes affected */ -#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1189 +#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1191 /*! cursor: cursor modify value bytes modified */ -#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1190 +#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1192 /*! cursor: cursor next calls */ -#define WT_STAT_CONN_CURSOR_NEXT 1191 +#define WT_STAT_CONN_CURSOR_NEXT 1193 +/*! + * cursor: cursor next calls that skip greater than or equal to 100 + * entries + */ +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1194 +/*! cursor: cursor next calls that skip less than 100 entries */ +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1195 /*! cursor: cursor operation restarted */ -#define WT_STAT_CONN_CURSOR_RESTART 1192 +#define WT_STAT_CONN_CURSOR_RESTART 1196 /*! cursor: cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV 1193 +#define WT_STAT_CONN_CURSOR_PREV 1197 +/*! + * cursor: cursor prev calls that skip greater than or equal to 100 + * entries + */ +#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1198 +/*! cursor: cursor prev calls that skip less than 100 entries */ +#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1199 /*! cursor: cursor remove calls */ -#define WT_STAT_CONN_CURSOR_REMOVE 1194 +#define WT_STAT_CONN_CURSOR_REMOVE 1200 /*! cursor: cursor remove key bytes removed */ -#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1195 +#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1201 /*! cursor: cursor reserve calls */ -#define WT_STAT_CONN_CURSOR_RESERVE 1196 +#define WT_STAT_CONN_CURSOR_RESERVE 1202 /*! cursor: cursor reset calls */ -#define WT_STAT_CONN_CURSOR_RESET 1197 +#define WT_STAT_CONN_CURSOR_RESET 1203 /*! cursor: cursor search calls */ -#define WT_STAT_CONN_CURSOR_SEARCH 1198 +#define WT_STAT_CONN_CURSOR_SEARCH 1204 /*! cursor: cursor search near calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1199 +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1205 /*! cursor: cursor sweep buckets */ -#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1200 +#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1206 /*! cursor: cursor sweep cursors closed */ -#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1201 +#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1207 /*! cursor: cursor sweep cursors examined */ -#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1202 +#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1208 /*! cursor: cursor sweeps */ -#define WT_STAT_CONN_CURSOR_SWEEP 1203 +#define WT_STAT_CONN_CURSOR_SWEEP 1209 /*! cursor: cursor truncate calls */ -#define WT_STAT_CONN_CURSOR_TRUNCATE 1204 +#define WT_STAT_CONN_CURSOR_TRUNCATE 1210 /*! cursor: cursor update calls */ -#define WT_STAT_CONN_CURSOR_UPDATE 1205 +#define WT_STAT_CONN_CURSOR_UPDATE 1211 /*! cursor: cursor update key and value bytes */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1206 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1212 /*! cursor: cursor update value size change */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1207 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1213 /*! cursor: cursors reused from cache */ -#define WT_STAT_CONN_CURSOR_REOPEN 1208 +#define WT_STAT_CONN_CURSOR_REOPEN 1214 /*! cursor: open cursor count */ -#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1209 +#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1215 /*! data-handle: connection data handle size */ -#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1210 +#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1216 /*! data-handle: connection data handles currently active */ -#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1211 +#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1217 /*! data-handle: connection sweep candidate became referenced */ -#define WT_STAT_CONN_DH_SWEEP_REF 1212 +#define WT_STAT_CONN_DH_SWEEP_REF 1218 /*! data-handle: connection sweep dhandles closed */ -#define WT_STAT_CONN_DH_SWEEP_CLOSE 1213 +#define WT_STAT_CONN_DH_SWEEP_CLOSE 1219 /*! data-handle: connection sweep dhandles removed from hash list */ -#define WT_STAT_CONN_DH_SWEEP_REMOVE 1214 +#define WT_STAT_CONN_DH_SWEEP_REMOVE 1220 /*! data-handle: connection sweep time-of-death sets */ -#define WT_STAT_CONN_DH_SWEEP_TOD 1215 +#define WT_STAT_CONN_DH_SWEEP_TOD 1221 /*! data-handle: connection sweeps */ -#define WT_STAT_CONN_DH_SWEEPS 1216 +#define WT_STAT_CONN_DH_SWEEPS 1222 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1217 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1223 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1218 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1224 /*! history: history pages added for eviction during garbage collection */ -#define WT_STAT_CONN_HS_GC_PAGES_EVICT 1219 +#define WT_STAT_CONN_HS_GC_PAGES_EVICT 1225 /*! history: history pages removed for garbage collection */ -#define WT_STAT_CONN_HS_GC_PAGES_REMOVED 1220 +#define WT_STAT_CONN_HS_GC_PAGES_REMOVED 1226 /*! history: history pages visited for garbage collection */ -#define WT_STAT_CONN_HS_GC_PAGES_VISITED 1221 +#define WT_STAT_CONN_HS_GC_PAGES_VISITED 1227 /*! lock: checkpoint lock acquisitions */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1222 +#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1228 /*! lock: checkpoint lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1223 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1229 /*! lock: checkpoint lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1224 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1230 /*! lock: dhandle lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1225 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1231 /*! lock: dhandle lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1226 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1232 /*! lock: dhandle read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1227 +#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1233 /*! lock: dhandle write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1228 +#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1234 /*! * lock: durable timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1229 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1235 /*! * lock: durable timestamp queue lock internal thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1230 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1236 /*! lock: durable timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1231 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1237 /*! lock: durable timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1232 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1238 /*! lock: metadata lock acquisitions */ -#define WT_STAT_CONN_LOCK_METADATA_COUNT 1233 +#define WT_STAT_CONN_LOCK_METADATA_COUNT 1239 /*! lock: metadata lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1234 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1240 /*! lock: metadata lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1235 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1241 /*! * lock: read timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1236 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1242 /*! lock: read timestamp queue lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1237 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1243 /*! lock: read timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1238 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1244 /*! lock: read timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1239 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1245 /*! lock: schema lock acquisitions */ -#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1240 +#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1246 /*! lock: schema lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1241 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1247 /*! lock: schema lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1242 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1248 /*! * lock: table lock application thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1243 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1249 /*! * lock: table lock internal thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1244 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1250 /*! lock: table read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1245 +#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1251 /*! lock: table write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1246 +#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1252 /*! lock: txn global lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1247 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1253 /*! lock: txn global lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1248 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1254 /*! lock: txn global read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1249 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1255 /*! lock: txn global write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1250 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1256 /*! log: busy returns attempting to switch slots */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1251 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1257 /*! log: force archive time sleeping (usecs) */ -#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1252 +#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1258 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1253 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1259 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1254 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1260 /*! log: log files manually zero-filled */ -#define WT_STAT_CONN_LOG_ZERO_FILLS 1255 +#define WT_STAT_CONN_LOG_ZERO_FILLS 1261 /*! log: log flush operations */ -#define WT_STAT_CONN_LOG_FLUSH 1256 +#define WT_STAT_CONN_LOG_FLUSH 1262 /*! log: log force write operations */ -#define WT_STAT_CONN_LOG_FORCE_WRITE 1257 +#define WT_STAT_CONN_LOG_FORCE_WRITE 1263 /*! log: log force write operations skipped */ -#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1258 +#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1264 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1259 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1265 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1260 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1266 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1261 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1267 /*! log: log release advances write LSN */ -#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1262 +#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1268 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1263 +#define WT_STAT_CONN_LOG_SCANS 1269 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1264 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1270 /*! log: log server thread advances write LSN */ -#define WT_STAT_CONN_LOG_WRITE_LSN 1265 +#define WT_STAT_CONN_LOG_WRITE_LSN 1271 /*! log: log server thread write LSN walk skipped */ -#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1266 +#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1272 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1267 +#define WT_STAT_CONN_LOG_SYNC 1273 /*! log: log sync time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DURATION 1268 +#define WT_STAT_CONN_LOG_SYNC_DURATION 1274 /*! log: log sync_dir operations */ -#define WT_STAT_CONN_LOG_SYNC_DIR 1269 +#define WT_STAT_CONN_LOG_SYNC_DIR 1275 /*! log: log sync_dir time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1270 +#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1276 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1271 +#define WT_STAT_CONN_LOG_WRITES 1277 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1272 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1278 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1273 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1279 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1274 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1280 /*! log: pre-allocated log files not ready and missed */ -#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1275 +#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1281 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1276 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1282 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1277 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1283 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1278 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1284 /*! log: slot close lost race */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1279 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1285 /*! log: slot close unbuffered waits */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1280 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1286 /*! log: slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1281 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1287 /*! log: slot join atomic update races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1282 +#define WT_STAT_CONN_LOG_SLOT_RACES 1288 /*! log: slot join calls atomic updates raced */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1283 +#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1289 /*! log: slot join calls did not yield */ -#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1284 +#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1290 /*! log: slot join calls found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1285 +#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1291 /*! log: slot join calls slept */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1286 +#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1292 /*! log: slot join calls yielded */ -#define WT_STAT_CONN_LOG_SLOT_YIELD 1287 +#define WT_STAT_CONN_LOG_SLOT_YIELD 1293 /*! log: slot join found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1288 +#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1294 /*! log: slot joins yield time (usecs) */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1289 +#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1295 /*! log: slot transitions unable to find free slot */ -#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1290 +#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1296 /*! log: slot unbuffered writes */ -#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1291 +#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1297 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1292 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1298 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1293 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1299 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1294 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1300 /*! log: written slots coalesced */ -#define WT_STAT_CONN_LOG_SLOT_COALESCED 1295 +#define WT_STAT_CONN_LOG_SLOT_COALESCED 1301 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1296 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1302 /*! perf: file system read latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1297 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1303 /*! perf: file system read latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1298 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1304 /*! perf: file system read latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1299 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1305 /*! perf: file system read latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1300 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1306 /*! perf: file system read latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1301 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1307 /*! perf: file system read latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1302 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1308 /*! perf: file system write latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1303 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1309 /*! perf: file system write latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1304 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1310 /*! perf: file system write latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1305 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1311 /*! perf: file system write latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1306 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1312 /*! perf: file system write latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1307 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1313 /*! perf: file system write latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1308 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1314 /*! perf: operation read latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1309 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1315 /*! perf: operation read latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1310 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1316 /*! perf: operation read latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1311 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1317 /*! perf: operation read latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1312 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1318 /*! perf: operation read latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1313 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1319 /*! perf: operation write latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1314 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1320 /*! perf: operation write latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1315 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1321 /*! perf: operation write latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1316 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1322 /*! perf: operation write latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1317 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1323 /*! perf: operation write latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1318 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1324 /*! reconciliation: approximate byte size of timestamps in pages written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1319 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1325 /*! * reconciliation: approximate byte size of transaction IDs in pages * written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1320 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1326 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1321 +#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1327 /*! reconciliation: maximum seconds spent in a reconciliation call */ -#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1322 +#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1328 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1323 +#define WT_STAT_CONN_REC_PAGES 1329 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1324 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1330 /*! * reconciliation: page reconciliation calls that resulted in values with * prepared transaction metadata */ -#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1325 +#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1331 /*! * reconciliation: page reconciliation calls that resulted in values with * timestamps */ -#define WT_STAT_CONN_REC_PAGES_WITH_TS 1326 +#define WT_STAT_CONN_REC_PAGES_WITH_TS 1332 /*! * reconciliation: page reconciliation calls that resulted in values with * transaction ids */ -#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1327 +#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1333 /*! reconciliation: pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE 1328 +#define WT_STAT_CONN_REC_PAGE_DELETE 1334 /*! * reconciliation: pages written including an aggregated newest start * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1329 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1335 /*! * reconciliation: pages written including an aggregated newest stop * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1330 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1336 /*! * reconciliation: pages written including an aggregated newest stop * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1331 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1337 /*! * reconciliation: pages written including an aggregated newest stop * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1332 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1338 /*! * reconciliation: pages written including an aggregated oldest start * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1333 +#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1339 /*! * reconciliation: pages written including an aggregated oldest start * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TXN 1334 +#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TXN 1340 /*! reconciliation: pages written including an aggregated prepare */ -#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1335 +#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1341 /*! reconciliation: pages written including at least one prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1336 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1342 /*! * reconciliation: pages written including at least one start durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1337 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1343 /*! reconciliation: pages written including at least one start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1338 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1344 /*! * reconciliation: pages written including at least one start transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1339 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1345 /*! * reconciliation: pages written including at least one stop durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1340 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1346 /*! reconciliation: pages written including at least one stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1341 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1347 /*! * reconciliation: pages written including at least one stop transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1342 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1348 /*! reconciliation: records written including a prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1343 +#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1349 /*! reconciliation: records written including a start durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1344 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1350 /*! reconciliation: records written including a start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1345 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1351 /*! reconciliation: records written including a start transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1346 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1352 /*! reconciliation: records written including a stop durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1347 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1353 /*! reconciliation: records written including a stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1348 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1354 /*! reconciliation: records written including a stop transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1349 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1355 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1350 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1356 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1351 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1357 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1352 +#define WT_STAT_CONN_SESSION_OPEN 1358 /*! session: session query timestamp calls */ -#define WT_STAT_CONN_SESSION_QUERY_TS 1353 +#define WT_STAT_CONN_SESSION_QUERY_TS 1359 /*! session: table alter failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1354 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1360 /*! session: table alter successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1355 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1361 /*! session: table alter unchanged and skipped */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1356 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1362 /*! session: table compact failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1357 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1363 /*! session: table compact successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1358 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1364 /*! session: table create failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1359 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1365 /*! session: table create successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1360 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1366 /*! session: table drop failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1361 +#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1367 /*! session: table drop successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1362 +#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1368 /*! session: table import failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1363 +#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1369 /*! session: table import successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1364 +#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1370 /*! session: table rebalance failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1365 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1371 /*! session: table rebalance successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1366 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1372 /*! session: table rename failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1367 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1373 /*! session: table rename successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1368 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1374 /*! session: table salvage failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1369 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1375 /*! session: table salvage successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1370 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1376 /*! session: table truncate failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1371 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1377 /*! session: table truncate successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1372 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1378 /*! session: table verify failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1373 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1379 /*! session: table verify successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1374 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1380 /*! thread-state: active filesystem fsync calls */ -#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1375 +#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1381 /*! thread-state: active filesystem read calls */ -#define WT_STAT_CONN_THREAD_READ_ACTIVE 1376 +#define WT_STAT_CONN_THREAD_READ_ACTIVE 1382 /*! thread-state: active filesystem write calls */ -#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1377 +#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1383 /*! thread-yield: application thread time evicting (usecs) */ -#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1378 +#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1384 /*! thread-yield: application thread time waiting for cache (usecs) */ -#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1379 +#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1385 /*! * thread-yield: connection close blocked waiting for transaction state * stabilization */ -#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1380 +#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1386 /*! thread-yield: connection close yielded for lsm manager shutdown */ -#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1381 +#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1387 /*! thread-yield: data handle lock yielded */ -#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1382 +#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1388 /*! * thread-yield: get reference for page index and slot time sleeping * (usecs) */ -#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1383 +#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1389 /*! thread-yield: log server sync yielded for log write */ -#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1384 +#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1390 /*! thread-yield: page access yielded due to prepare state change */ -#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1385 +#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1391 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1386 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1392 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1387 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1393 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1388 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1394 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1389 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1395 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1390 +#define WT_STAT_CONN_PAGE_SLEEP 1396 /*! * thread-yield: page delete rollback time sleeping for state change * (usecs) */ -#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1391 +#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1397 /*! thread-yield: page reconciliation yielded due to child modification */ -#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1392 +#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1398 /*! transaction: Number of prepared updates */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1393 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1399 /*! transaction: durable timestamp queue entries walked */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1394 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1400 /*! transaction: durable timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1395 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1401 /*! transaction: durable timestamp queue inserts to head */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1396 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1402 /*! transaction: durable timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1397 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1403 /*! transaction: durable timestamp queue length */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1398 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1404 /*! transaction: prepared transactions */ -#define WT_STAT_CONN_TXN_PREPARE 1399 +#define WT_STAT_CONN_TXN_PREPARE 1405 /*! transaction: prepared transactions committed */ -#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1400 +#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1406 /*! transaction: prepared transactions currently active */ -#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1401 +#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1407 /*! transaction: prepared transactions rolled back */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1402 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1408 /*! transaction: query timestamp calls */ -#define WT_STAT_CONN_TXN_QUERY_TS 1403 +#define WT_STAT_CONN_TXN_QUERY_TS 1409 /*! transaction: read timestamp queue entries walked */ -#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1404 +#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1410 /*! transaction: read timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1405 +#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1411 /*! transaction: read timestamp queue inserts to head */ -#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1406 +#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1412 /*! transaction: read timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1407 +#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1413 /*! transaction: read timestamp queue length */ -#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1408 +#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1414 /*! transaction: rollback to stable calls */ -#define WT_STAT_CONN_TXN_RTS 1409 +#define WT_STAT_CONN_TXN_RTS 1415 /*! transaction: rollback to stable keys removed */ -#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1410 +#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1416 /*! transaction: rollback to stable keys restored */ -#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1411 +#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1417 /*! transaction: rollback to stable pages visited */ -#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1412 +#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1418 /*! transaction: rollback to stable updates aborted */ -#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1413 +#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1419 /*! transaction: rollback to stable updates removed from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1414 +#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1420 /*! transaction: set timestamp calls */ -#define WT_STAT_CONN_TXN_SET_TS 1415 +#define WT_STAT_CONN_TXN_SET_TS 1421 /*! transaction: set timestamp durable calls */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1416 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1422 /*! transaction: set timestamp durable updates */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1417 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1423 /*! transaction: set timestamp oldest calls */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1418 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1424 /*! transaction: set timestamp oldest updates */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1419 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1425 /*! transaction: set timestamp stable calls */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE 1420 +#define WT_STAT_CONN_TXN_SET_TS_STABLE 1426 /*! transaction: set timestamp stable updates */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1421 +#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1427 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1422 +#define WT_STAT_CONN_TXN_BEGIN 1428 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1423 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1429 /*! transaction: transaction checkpoint generation */ -#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1424 +#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1430 /*! * transaction: transaction checkpoint history store file duration * (usecs) */ -#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1425 +#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1431 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1426 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1432 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1427 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1433 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1428 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1434 /*! transaction: transaction checkpoint prepare currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1429 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1435 /*! transaction: transaction checkpoint prepare max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1430 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1436 /*! transaction: transaction checkpoint prepare min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1431 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1437 /*! transaction: transaction checkpoint prepare most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1432 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1438 /*! transaction: transaction checkpoint prepare total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1433 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1439 /*! transaction: transaction checkpoint scrub dirty target */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1434 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1440 /*! transaction: transaction checkpoint scrub time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1435 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1441 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1436 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1442 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1437 +#define WT_STAT_CONN_TXN_CHECKPOINT 1443 /*! * transaction: transaction checkpoints skipped because database was * clean */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1438 +#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1444 /*! transaction: transaction failures due to history store */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1439 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1445 /*! * transaction: transaction fsync calls for checkpoint after allocating * the transaction ID */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1440 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1446 /*! * transaction: transaction fsync duration for checkpoint after * allocating the transaction ID (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1441 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1447 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1442 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1448 /*! transaction: transaction range of IDs currently pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1443 +#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1449 /*! transaction: transaction range of timestamps currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1444 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1450 /*! transaction: transaction range of timestamps pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1445 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1451 /*! * transaction: transaction range of timestamps pinned by the oldest * active read timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1446 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1452 /*! * transaction: transaction range of timestamps pinned by the oldest * timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1447 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1453 /*! transaction: transaction read timestamp of the oldest active reader */ -#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1448 +#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1454 /*! transaction: transaction sync calls */ -#define WT_STAT_CONN_TXN_SYNC 1449 +#define WT_STAT_CONN_TXN_SYNC 1455 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1450 +#define WT_STAT_CONN_TXN_COMMIT 1456 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1451 +#define WT_STAT_CONN_TXN_ROLLBACK 1457 /*! transaction: update conflicts */ -#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1452 +#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1458 /*! * @} @@ -6296,172 +6314,190 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_DSRC_COMPRESS_WRITE_FAIL 2105 /*! compression: page written was too small to compress */ #define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL 2106 +/*! cursor: Total number of entries skipped by cursor next calls */ +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_TOTAL 2107 +/*! cursor: Total number of entries skipped by cursor prev calls */ +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_TOTAL 2108 /*! cursor: bulk loaded cursor insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2107 +#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2109 /*! cursor: cache cursors reuse count */ -#define WT_STAT_DSRC_CURSOR_REOPEN 2108 +#define WT_STAT_DSRC_CURSOR_REOPEN 2110 /*! cursor: close calls that result in cache */ -#define WT_STAT_DSRC_CURSOR_CACHE 2109 +#define WT_STAT_DSRC_CURSOR_CACHE 2111 /*! cursor: create calls */ -#define WT_STAT_DSRC_CURSOR_CREATE 2110 +#define WT_STAT_DSRC_CURSOR_CREATE 2112 +/*! + * cursor: cursor next calls that skip greater than or equal to 100 + * entries + */ +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100 2113 +/*! cursor: cursor next calls that skip less than 100 entries */ +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100 2114 +/*! + * cursor: cursor prev calls that skip greater than or equal to 100 + * entries + */ +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100 2115 +/*! cursor: cursor prev calls that skip less than 100 entries */ +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100 2116 /*! cursor: insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT 2111 +#define WT_STAT_DSRC_CURSOR_INSERT 2117 /*! cursor: insert key and value bytes */ -#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2112 +#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2118 /*! cursor: modify */ -#define WT_STAT_DSRC_CURSOR_MODIFY 2113 +#define WT_STAT_DSRC_CURSOR_MODIFY 2119 /*! cursor: modify key and value bytes affected */ -#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2114 +#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2120 /*! cursor: modify value bytes modified */ -#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2115 +#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2121 /*! cursor: next calls */ -#define WT_STAT_DSRC_CURSOR_NEXT 2116 +#define WT_STAT_DSRC_CURSOR_NEXT 2122 /*! cursor: open cursor count */ -#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2117 +#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2123 /*! cursor: operation restarted */ -#define WT_STAT_DSRC_CURSOR_RESTART 2118 +#define WT_STAT_DSRC_CURSOR_RESTART 2124 /*! cursor: prev calls */ -#define WT_STAT_DSRC_CURSOR_PREV 2119 +#define WT_STAT_DSRC_CURSOR_PREV 2125 /*! cursor: remove calls */ -#define WT_STAT_DSRC_CURSOR_REMOVE 2120 +#define WT_STAT_DSRC_CURSOR_REMOVE 2126 /*! cursor: remove key bytes removed */ -#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2121 +#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2127 /*! cursor: reserve calls */ -#define WT_STAT_DSRC_CURSOR_RESERVE 2122 +#define WT_STAT_DSRC_CURSOR_RESERVE 2128 /*! cursor: reset calls */ -#define WT_STAT_DSRC_CURSOR_RESET 2123 +#define WT_STAT_DSRC_CURSOR_RESET 2129 /*! cursor: search calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH 2124 +#define WT_STAT_DSRC_CURSOR_SEARCH 2130 /*! cursor: search near calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2125 +#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2131 /*! cursor: truncate calls */ -#define WT_STAT_DSRC_CURSOR_TRUNCATE 2126 +#define WT_STAT_DSRC_CURSOR_TRUNCATE 2132 /*! cursor: update calls */ -#define WT_STAT_DSRC_CURSOR_UPDATE 2127 +#define WT_STAT_DSRC_CURSOR_UPDATE 2133 /*! cursor: update key and value bytes */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2128 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2134 /*! cursor: update value size change */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2129 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2135 /*! history: history pages added for eviction during garbage collection */ -#define WT_STAT_DSRC_HS_GC_PAGES_EVICT 2130 +#define WT_STAT_DSRC_HS_GC_PAGES_EVICT 2136 /*! history: history pages removed for garbage collection */ -#define WT_STAT_DSRC_HS_GC_PAGES_REMOVED 2131 +#define WT_STAT_DSRC_HS_GC_PAGES_REMOVED 2137 /*! history: history pages visited for garbage collection */ -#define WT_STAT_DSRC_HS_GC_PAGES_VISITED 2132 +#define WT_STAT_DSRC_HS_GC_PAGES_VISITED 2138 /*! reconciliation: approximate byte size of timestamps in pages written */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2133 +#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2139 /*! * reconciliation: approximate byte size of transaction IDs in pages * written */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2134 +#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2140 /*! reconciliation: dictionary matches */ -#define WT_STAT_DSRC_REC_DICTIONARY 2135 +#define WT_STAT_DSRC_REC_DICTIONARY 2141 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2136 +#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2142 /*! * reconciliation: internal page key bytes discarded using suffix * compression */ -#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2137 +#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2143 /*! reconciliation: internal page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2138 +#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2144 /*! reconciliation: internal-page overflow keys */ -#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2139 +#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2145 /*! reconciliation: leaf page key bytes discarded using prefix compression */ -#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2140 +#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2146 /*! reconciliation: leaf page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2141 +#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2147 /*! reconciliation: leaf-page overflow keys */ -#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2142 +#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2148 /*! reconciliation: maximum blocks required for a page */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2143 +#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2149 /*! reconciliation: overflow values written */ -#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2144 +#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2150 /*! reconciliation: page checksum matches */ -#define WT_STAT_DSRC_REC_PAGE_MATCH 2145 +#define WT_STAT_DSRC_REC_PAGE_MATCH 2151 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_DSRC_REC_PAGES 2146 +#define WT_STAT_DSRC_REC_PAGES 2152 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_DSRC_REC_PAGES_EVICTION 2147 +#define WT_STAT_DSRC_REC_PAGES_EVICTION 2153 /*! reconciliation: pages deleted */ -#define WT_STAT_DSRC_REC_PAGE_DELETE 2148 +#define WT_STAT_DSRC_REC_PAGE_DELETE 2154 /*! * reconciliation: pages written including an aggregated newest start * durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2149 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2155 /*! * reconciliation: pages written including an aggregated newest stop * durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2150 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2156 /*! * reconciliation: pages written including an aggregated newest stop * timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2151 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2157 /*! * reconciliation: pages written including an aggregated newest stop * transaction ID */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2152 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2158 /*! * reconciliation: pages written including an aggregated oldest start * timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2153 +#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2159 /*! * reconciliation: pages written including an aggregated oldest start * transaction ID */ -#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TXN 2154 +#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TXN 2160 /*! reconciliation: pages written including an aggregated prepare */ -#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2155 +#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2161 /*! reconciliation: pages written including at least one prepare */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2156 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2162 /*! * reconciliation: pages written including at least one start durable * timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2157 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2163 /*! reconciliation: pages written including at least one start timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2158 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2164 /*! * reconciliation: pages written including at least one start transaction * ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2159 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2165 /*! * reconciliation: pages written including at least one stop durable * timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2160 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2166 /*! reconciliation: pages written including at least one stop timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2161 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2167 /*! * reconciliation: pages written including at least one stop transaction * ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2162 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2168 /*! reconciliation: records written including a prepare */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2163 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2169 /*! reconciliation: records written including a start durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2164 +#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2170 /*! reconciliation: records written including a start timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2165 +#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2171 /*! reconciliation: records written including a start transaction ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2166 +#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2172 /*! reconciliation: records written including a stop durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2167 +#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2173 /*! reconciliation: records written including a stop timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2168 +#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2174 /*! reconciliation: records written including a stop transaction ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2169 +#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2175 /*! session: object compaction */ -#define WT_STAT_DSRC_SESSION_COMPACT 2170 +#define WT_STAT_DSRC_SESSION_COMPACT 2176 /*! transaction: update conflicts */ -#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2171 +#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2177 /*! * @} diff --git a/src/third_party/wiredtiger/src/meta/meta_ckpt.c b/src/third_party/wiredtiger/src/meta/meta_ckpt.c index c5b3c9d7924..d435e37d80d 100644 --- a/src/third_party/wiredtiger/src/meta/meta_ckpt.c +++ b/src/third_party/wiredtiger/src/meta/meta_ckpt.c @@ -451,46 +451,6 @@ __ckpt_valid_blk_mods(WT_SESSION_IMPL *session, WT_CKPT *ckpt) } /* - * __wt_meta_get_oldest_ckpt_timestamp -- - * Get the oldest timestamp over all checkpoints. - */ -int -__wt_meta_get_oldest_ckpt_timestamp( - WT_SESSION_IMPL *session, const char *fname, wt_timestamp_t *oldest_ckpt_ts) -{ - WT_CONFIG ckptconf; - WT_CONFIG_ITEM a, k, v; - WT_DECL_RET; - wt_timestamp_t ts; - char *config; - - ts = WT_TS_MAX; - config = NULL; - - /* Retrieve the metadata information for the file. */ - WT_ERR(__wt_metadata_search(session, fname, &config)); - - /* Load any existing checkpoints into the array. */ - if ((ret = __wt_config_getones(session, config, "checkpoint", &v)) == 0) { - __wt_config_subinit(session, &ckptconf, &v); - /* - * There may be multiple checkpoints for the file. Loop through to find the minimum oldest - * start timestamp over all of them. - */ - for (; (ret = __wt_config_next(&ckptconf, &k, &v)) == 0;) { - if (__wt_config_subgets(session, &v, "oldest_start_ts", &a) == 0 && a.len != 0 && - a.val != WT_TS_NONE && ts > (uint64_t)a.val) - ts = (uint64_t)a.val; - } - } - -err: - *oldest_ckpt_ts = ts != WT_TS_MAX ? ts : WT_TS_NONE; - __wt_free(session, config); - return (ret); -} - -/* * __wt_meta_ckptlist_get -- * Load all available checkpoint information for a file. */ diff --git a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c index b4a054a95b1..54d281e06b9 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c @@ -140,9 +140,6 @@ __rec_append_orig_value( * timestamped globally visible tombstone because even if its timestamp is smaller than * the entries in the history store, we can't change the history store entries. This is * not correct but we hope we can get away with it. - * - * FIXME-WT-6171: remove this once we get rid of out of order timestamps and mixed mode - * transactions. */ if (unpack->tw.durable_stop_ts != WT_TS_NONE && tombstone_globally_visible) return (0); @@ -489,7 +486,6 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, v select_tw->durable_start_ts = select_tw->durable_stop_ts; select_tw->start_ts = select_tw->stop_ts; - select_tw->start_txn = select_tw->stop_txn; } /* @@ -548,9 +544,12 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, v * part of the page, and they are physically removed by checkpoint writing this page, that is, * the checkpoint doesn't include the overflow blocks so they're removed and future readers of * this page won't be able to find them. + * + * There is no need to append the original value for in memory databases as the onpage value + * should be already on the update chain and there is no history store. */ - if (upd_select->upd != NULL && vpack != NULL && vpack->type != WT_CELL_DEL && - (upd_saved || F_ISSET(vpack, WT_CELL_UNPACK_OVERFLOW))) + if (!F_ISSET(S2C(session), WT_CONN_IN_MEMORY) && upd_select->upd != NULL && vpack != NULL && + vpack->type != WT_CELL_DEL && (upd_saved || F_ISSET(vpack, WT_CELL_UNPACK_OVERFLOW))) WT_ERR(__rec_append_orig_value(session, page, upd_select->upd, vpack)); __wt_time_window_clear_obsolete( diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index 704c26c40dc..250cb9234fe 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -72,15 +72,22 @@ static const char *const __stats_dsrc_desc[] = { "compression: compressed page maximum leaf page size prior to compression ", "compression: compressed pages read", "compression: compressed pages written", "compression: page written failed to compress", - "compression: page written was too small to compress", "cursor: bulk loaded cursor insert calls", - "cursor: cache cursors reuse count", "cursor: close calls that result in cache", - "cursor: create calls", "cursor: insert calls", "cursor: insert key and value bytes", - "cursor: modify", "cursor: modify key and value bytes affected", - "cursor: modify value bytes modified", "cursor: next calls", "cursor: open cursor count", - "cursor: operation restarted", "cursor: prev calls", "cursor: remove calls", - "cursor: remove key bytes removed", "cursor: reserve calls", "cursor: reset calls", - "cursor: search calls", "cursor: search near calls", "cursor: truncate calls", - "cursor: update calls", "cursor: update key and value bytes", "cursor: update value size change", + "compression: page written was too small to compress", + "cursor: Total number of entries skipped by cursor next calls", + "cursor: Total number of entries skipped by cursor prev calls", + "cursor: bulk loaded cursor insert calls", "cursor: cache cursors reuse count", + "cursor: close calls that result in cache", "cursor: create calls", + "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 skip greater than or equal to 100 entries", + "cursor: cursor prev calls that skip less than 100 entries", "cursor: insert calls", + "cursor: insert key and value bytes", "cursor: modify", + "cursor: modify key and value bytes affected", "cursor: modify value bytes modified", + "cursor: next calls", "cursor: open cursor count", "cursor: operation restarted", + "cursor: prev calls", "cursor: remove calls", "cursor: remove key bytes removed", + "cursor: reserve calls", "cursor: reset calls", "cursor: search calls", + "cursor: search near calls", "cursor: truncate calls", "cursor: update calls", + "cursor: update key and value bytes", "cursor: update value size change", "history: history pages added for eviction during garbage collection", "history: history pages removed for garbage collection", "history: history pages visited for garbage collection", @@ -263,10 +270,16 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->compress_write = 0; stats->compress_write_fail = 0; stats->compress_write_too_small = 0; + stats->cursor_next_skip_total = 0; + stats->cursor_prev_skip_total = 0; stats->cursor_insert_bulk = 0; stats->cursor_reopen = 0; stats->cursor_cache = 0; stats->cursor_create = 0; + stats->cursor_next_skip_ge_100 = 0; + stats->cursor_next_skip_lt_100 = 0; + stats->cursor_prev_skip_ge_100 = 0; + stats->cursor_prev_skip_lt_100 = 0; stats->cursor_insert = 0; stats->cursor_insert_bytes = 0; stats->cursor_modify = 0; @@ -461,10 +474,16 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->compress_write += from->compress_write; to->compress_write_fail += from->compress_write_fail; to->compress_write_too_small += from->compress_write_too_small; + to->cursor_next_skip_total += from->cursor_next_skip_total; + to->cursor_prev_skip_total += from->cursor_prev_skip_total; to->cursor_insert_bulk += from->cursor_insert_bulk; to->cursor_reopen += from->cursor_reopen; to->cursor_cache += from->cursor_cache; to->cursor_create += from->cursor_create; + 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_skip_ge_100 += from->cursor_prev_skip_ge_100; + to->cursor_prev_skip_lt_100 += from->cursor_prev_skip_lt_100; to->cursor_insert += from->cursor_insert; to->cursor_insert_bytes += from->cursor_insert_bytes; to->cursor_modify += from->cursor_modify; @@ -657,10 +676,16 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) to->compress_write += WT_STAT_READ(from, compress_write); to->compress_write_fail += WT_STAT_READ(from, compress_write_fail); to->compress_write_too_small += WT_STAT_READ(from, compress_write_too_small); + to->cursor_next_skip_total += WT_STAT_READ(from, cursor_next_skip_total); + to->cursor_prev_skip_total += WT_STAT_READ(from, cursor_prev_skip_total); to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk); 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_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_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_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); @@ -857,13 +882,19 @@ static const char *const __stats_connection_desc[] = { "connection: pthread mutex condition wait calls", "connection: pthread mutex shared lock read-lock calls", "connection: pthread mutex shared lock write-lock calls", "connection: total fsync I/Os", - "connection: total read I/Os", "connection: total write I/Os", "cursor: cached cursor count", + "connection: total read I/Os", "connection: total write I/Os", + "cursor: Total number of entries skipped by cursor next calls", + "cursor: Total number of entries skipped by cursor prev calls", "cursor: cached cursor count", "cursor: cursor bulk loaded cursor insert calls", "cursor: cursor close calls that result in cache", "cursor: cursor create calls", "cursor: cursor insert calls", "cursor: cursor insert key and value bytes", "cursor: cursor modify calls", "cursor: cursor modify key and value bytes affected", "cursor: cursor modify value bytes modified", "cursor: cursor next calls", - "cursor: cursor operation restarted", "cursor: cursor prev calls", "cursor: cursor remove calls", + "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 skip greater than or equal to 100 entries", + "cursor: cursor prev calls that skip less than 100 entries", "cursor: cursor remove calls", "cursor: cursor remove key bytes removed", "cursor: cursor reserve calls", "cursor: cursor reset calls", "cursor: cursor search calls", "cursor: cursor search near calls", "cursor: cursor sweep buckets", "cursor: cursor sweep cursors closed", @@ -1278,6 +1309,8 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->fsync_io = 0; stats->read_io = 0; stats->write_io = 0; + stats->cursor_next_skip_total = 0; + stats->cursor_prev_skip_total = 0; /* not clearing cursor_cached_count */ stats->cursor_insert_bulk = 0; stats->cursor_cache = 0; @@ -1288,8 +1321,12 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cursor_modify_bytes = 0; stats->cursor_modify_bytes_touch = 0; stats->cursor_next = 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_skip_ge_100 = 0; + stats->cursor_prev_skip_lt_100 = 0; stats->cursor_remove = 0; stats->cursor_remove_bytes = 0; stats->cursor_reserve = 0; @@ -1766,6 +1803,8 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->fsync_io += WT_STAT_READ(from, fsync_io); to->read_io += WT_STAT_READ(from, read_io); to->write_io += WT_STAT_READ(from, write_io); + to->cursor_next_skip_total += WT_STAT_READ(from, cursor_next_skip_total); + to->cursor_prev_skip_total += WT_STAT_READ(from, cursor_prev_skip_total); to->cursor_cached_count += WT_STAT_READ(from, cursor_cached_count); to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk); to->cursor_cache += WT_STAT_READ(from, cursor_cache); @@ -1776,8 +1815,12 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * 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_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_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_remove += WT_STAT_READ(from, cursor_remove); to->cursor_remove_bytes += WT_STAT_READ(from, cursor_remove_bytes); to->cursor_reserve += WT_STAT_READ(from, cursor_reserve); diff --git a/src/third_party/wiredtiger/src/txn/txn_recover.c b/src/third_party/wiredtiger/src/txn/txn_recover.c index 709ff2732a8..0779bad0839 100644 --- a/src/third_party/wiredtiger/src/txn/txn_recover.c +++ b/src/third_party/wiredtiger/src/txn/txn_recover.c @@ -588,8 +588,6 @@ __wt_txn_recover(WT_SESSION_IMPL *session, const char *cfg[]) WT_DECL_RET; WT_RECOVERY r; WT_RECOVERY_FILE *metafile; - wt_timestamp_t oldest_ckpt_hs_ts; - char *config; char ts_string[2][WT_TS_INT_STRING_SIZE]; bool do_checkpoint, eviction_started, hs_exists, needs_rec, was_backup; @@ -600,7 +598,6 @@ __wt_txn_recover(WT_SESSION_IMPL *session, const char *cfg[]) config = NULL; do_checkpoint = hs_exists = true; eviction_started = false; - oldest_ckpt_hs_ts = WT_TS_NONE; was_backup = F_ISSET(conn, WT_CONN_WAS_BACKUP); /* We need a real session for recovery. */ @@ -695,17 +692,6 @@ __wt_txn_recover(WT_SESSION_IMPL *session, const char *cfg[]) /* Check whether the history store exists. */ WT_ERR(__hs_exists(session, metac, cfg, &hs_exists)); - /* - * If found, save the oldest start timestamp in the checkpoint list of the history store. This - * will be the minimum valid oldest timestamp at restart. - */ - if (hs_exists) { - WT_ERR_NOTFOUND_OK( - __wt_meta_get_oldest_ckpt_timestamp(session, WT_HS_URI, &oldest_ckpt_hs_ts), false); - conn->txn_global.oldest_timestamp = oldest_ckpt_hs_ts; - conn->txn_global.has_oldest_timestamp = oldest_ckpt_hs_ts != WT_TS_NONE; - } - /* Scan the metadata to find the live files and their IDs. */ WT_ERR(__recovery_file_scan(&r)); /* @@ -804,6 +790,8 @@ done: WT_ASSERT(session, conn->txn_global.has_stable_timestamp == false && conn->txn_global.stable_timestamp == WT_TS_NONE); + WT_ASSERT(session, conn->txn_global.has_oldest_timestamp == false && + conn->txn_global.oldest_timestamp == WT_TS_NONE); /* * Set the stable timestamp from recovery timestamp and process the trees for rollback to @@ -813,13 +801,11 @@ done: conn->txn_global.has_stable_timestamp = true; /* - * The oldest timestamp is set to the oldest history store checkpoint timestamp (which may - * be WT_TS_NONE) to make sure we didn't remove any history window as part of rollback to - * stable operation. + * Set the oldest timestamp to WT_TS_NONE to make sure that we didn't remove any history + * window as part of rollback to stable operation. */ - conn->txn_global.oldest_timestamp = oldest_ckpt_hs_ts; + conn->txn_global.oldest_timestamp = WT_TS_NONE; conn->txn_global.has_oldest_timestamp = true; - __wt_verbose(session, WT_VERB_RTS, "Performing recovery rollback_to_stable with stable timestamp: %s and oldest timestamp: " "%s", @@ -828,9 +814,9 @@ done: WT_ERR(__wt_rollback_to_stable(session, NULL, false)); - /* Reset the oldest timestamp flag. */ - conn->txn_global.has_oldest_timestamp = oldest_ckpt_hs_ts != WT_TS_NONE; - + /* Reset the oldest timestamp. */ + conn->txn_global.oldest_timestamp = WT_TS_NONE; + conn->txn_global.has_oldest_timestamp = false; } else if (do_checkpoint) /* * Forcibly log a checkpoint so the next open is fast and keep the metadata up to date with diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c index bb14f58d593..e546d8401e8 100644 --- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c +++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c @@ -754,7 +754,7 @@ __rollback_abort_newer_updates( WT_RET(__wt_page_in(session, ref, 0)); if (ref->page->type == WT_PAGE_ROW_LEAF) __rollback_verify_ondisk_page(session, ref->page, rollback_timestamp); - WT_TRET(__wt_page_release(session, ref, 0)); + WT_TRET_BUSY_OK(__wt_page_release_evict(session, ref, 0)); } #endif return (0); @@ -795,7 +795,7 @@ __rollback_abort_newer_updates( err: if (local_read) - WT_TRET(__wt_page_release(session, ref, 0)); + WT_TRET_BUSY_OK(__wt_page_release_evict(session, ref, 0)); return (ret); } diff --git a/src/third_party/wiredtiger/src/utilities/util_verify.c b/src/third_party/wiredtiger/src/utilities/util_verify.c index dcdab59e142..34bd4f22fb8 100644 --- a/src/third_party/wiredtiger/src/utilities/util_verify.c +++ b/src/third_party/wiredtiger/src/utilities/util_verify.c @@ -11,13 +11,13 @@ static int usage(void) { - static const char *options[] = {"-a", "verify the history store", "-d config", + static const char *options[] = {"-d config", "display underlying information during verification", "-s", "verify against the specified timestamp", NULL, NULL}; util_usage( - "verify [-as] [-d dump_address | dump_blocks | dump_history | dump_layout | dump_offsets=#,# " - "| dump_pages] [uri]", + "verify [-s] [-d dump_address | dump_blocks | dump_layout | dump_offsets=#,# | dump_pages] " + "[uri]", "options:", options); return (1); @@ -30,9 +30,9 @@ util_verify(WT_SESSION *session, int argc, char *argv[]) size_t size; int ch; char *config, *dump_offsets, *uri; - bool dump_address, dump_blocks, dump_layout, dump_pages, dump_history, stable_timestamp; + bool dump_address, dump_blocks, dump_layout, dump_pages, stable_timestamp; - dump_address = dump_blocks = dump_history = dump_layout = dump_pages = stable_timestamp = false; + dump_address = dump_blocks = dump_layout = dump_pages = stable_timestamp = false; config = dump_offsets = uri = NULL; while ((ch = __wt_getopt(progname, argc, argv, "d:s")) != EOF) switch (ch) { @@ -41,8 +41,6 @@ util_verify(WT_SESSION *session, int argc, char *argv[]) dump_address = true; else if (strcmp(__wt_optarg, "dump_blocks") == 0) dump_blocks = true; - else if (strcmp(__wt_optarg, "dump_history") == 0) - dump_history = true; else if (strcmp(__wt_optarg, "dump_layout") == 0) dump_layout = true; else if (WT_PREFIX_MATCH(__wt_optarg, "dump_offsets=")) { @@ -78,20 +76,19 @@ util_verify(WT_SESSION *session, int argc, char *argv[]) if ((uri = util_uri(session, *argv, "table")) == NULL) return (1); - if (dump_address || dump_blocks || dump_history || dump_layout || dump_offsets != NULL || - dump_pages || stable_timestamp) { - size = strlen("dump_address,") + strlen("dump_blocks,") + strlen("dump_history") + - strlen("dump_layout,") + strlen("dump_pages,") + strlen("dump_offsets[],") + + if (dump_address || dump_blocks || dump_layout || dump_offsets != NULL || dump_pages || + stable_timestamp) { + size = strlen("dump_address,") + strlen("dump_blocks,") + strlen("dump_layout,") + + strlen("dump_pages,") + strlen("dump_offsets[],") + (dump_offsets == NULL ? 0 : strlen(dump_offsets)) + strlen("history_store") + strlen("stable_timestamp,") + 20; if ((config = malloc(size)) == NULL) { ret = util_err(session, errno, NULL); goto err; } - if ((ret = __wt_snprintf(config, size, "%s%s%s%s%s%s%s%s%s", + if ((ret = __wt_snprintf(config, size, "%s%s%s%s%s%s%s%s", dump_address ? "dump_address," : "", dump_blocks ? "dump_blocks," : "", - dump_history ? "dump_history," : "", dump_layout ? "dump_layout," : "", - dump_offsets != NULL ? "dump_offsets=[" : "", + dump_layout ? "dump_layout," : "", dump_offsets != NULL ? "dump_offsets=[" : "", dump_offsets != NULL ? dump_offsets : "", dump_offsets != NULL ? "]," : "", dump_pages ? "dump_pages," : "", stable_timestamp ? "stable_timestamp," : "")) != 0) { diff --git a/src/third_party/wiredtiger/test/format/config.c b/src/third_party/wiredtiger/test/format/config.c index b48bc0e18a2..dffde8eb25a 100644 --- a/src/third_party/wiredtiger/test/format/config.c +++ b/src/third_party/wiredtiger/test/format/config.c @@ -656,6 +656,8 @@ config_in_memory(void) return; if (config_is_perm("logging")) return; + if (config_is_perm("ops.hs_cursor")) + return; if (config_is_perm("ops.rebalance")) return; if (config_is_perm("ops.salvage")) @@ -685,6 +687,8 @@ config_in_memory_reset(void) config_single("checkpoint=off", false); if (!config_is_perm("btree.compression")) config_single("btree.compression=none", false); + if (!config_is_perm("ops.hs_cursor")) + config_single("ops.hs_cursor=off", false); if (!config_is_perm("logging")) config_single("logging=off", false); if (!config_is_perm("ops.rebalance")) diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h index 3ad4571d41f..80d2ab99cd4 100644 --- a/src/third_party/wiredtiger/test/format/config.h +++ b/src/third_party/wiredtiger/test/format/config.h @@ -228,8 +228,8 @@ static CONFIG c[] = { {"ops.compaction", "if compaction is running", C_BOOL, 10, 0, 0, &g.c_compact, NULL}, /* 50% */ - {"ops.history_store", "if history store cursor reads configured", C_BOOL, 50, 0, 0, - &g.c_hs_cursor, NULL}, + {"ops.hs_cursor", "if history store cursor reads configured", C_BOOL, 50, 0, 0, &g.c_hs_cursor, + NULL}, {"ops.pct.delete", "percent operations that are deletes", C_IGNORE, 0, 0, 100, &g.c_delete_pct, NULL}, diff --git a/src/third_party/wiredtiger/test/format/format.h b/src/third_party/wiredtiger/test/format/format.h index 93e3ab54003..c8bafaaafd8 100644 --- a/src/third_party/wiredtiger/test/format/format.h +++ b/src/third_party/wiredtiger/test/format/format.h @@ -340,8 +340,6 @@ typedef struct { uint64_t insert_list[256]; /* column-store inserted records */ u_int insert_list_cnt; - WT_ITEM *tbuf, _tbuf; /* temporary buffer */ - #define TINFO_RUNNING 1 /* Running */ #define TINFO_COMPLETE 2 /* Finished */ #define TINFO_JOINED 3 /* Resolved */ @@ -403,6 +401,6 @@ void wts_rebalance(void); void wts_reopen(void); void wts_salvage(void); void wts_stats(void); -void wts_verify(const char *); +void wts_verify(WT_CONNECTION *, const char *); #include "format.i" diff --git a/src/third_party/wiredtiger/test/format/hs.c b/src/third_party/wiredtiger/test/format/hs.c index e5d40e6256b..55b298f20e7 100644 --- a/src/third_party/wiredtiger/test/format/hs.c +++ b/src/third_party/wiredtiger/test/format/hs.c @@ -38,7 +38,7 @@ hs_cursor(void *arg) WT_CONNECTION *conn; WT_CURSOR *cursor; WT_DECL_RET; - WT_ITEM hs_key, hs_value; + WT_ITEM hs_key, hs_value, key; WT_SESSION *session; wt_timestamp_t hs_durable_timestamp, hs_start_ts, hs_stop_durable_ts; uint64_t hs_counter, hs_upd_type; @@ -61,6 +61,7 @@ hs_cursor(void *arg) memset(&hs_key, 0, sizeof(hs_key)); memset(&hs_value, 0, sizeof(hs_value)); + memset(&key, 0, sizeof(key)); hs_start_ts = 0; /* [-Wconditional-uninitialized] */ hs_counter = 0; /* [-Wconditional-uninitialized] */ hs_btree_id = 0; /* [-Wconditional-uninitialized] */ @@ -81,13 +82,16 @@ hs_cursor(void *arg) /* Search to the last-known location. */ if (!restart) { - cursor->set_key(cursor, hs_btree_id, &hs_key, hs_start_ts, hs_counter); + cursor->set_key(cursor, hs_btree_id, &key, hs_start_ts, hs_counter); ret = cursor->search_near(cursor, &exact); testutil_assert(ret == 0 || ret == WT_NOTFOUND); } - /* Get some more key/value pairs. */ - for (i = mmrand(NULL, 0, 1000); i > 0; --i) { + /* + * Get some more key/value pairs. Always retrieve at least one key, that ensures we have a + * valid key when we copy it to start the next run. + */ + for (i = mmrand(NULL, 1, 1000); i > 0; --i) { if ((ret = cursor->next(cursor)) == 0) { testutil_check( cursor->get_key(cursor, &hs_btree_id, &hs_key, &hs_start_ts, &hs_counter)); @@ -104,7 +108,7 @@ hs_cursor(void *arg) * Otherwise, reset so we'll start over. */ if (ret == 0) { - testutil_check(__wt_buf_grow(CUR2S(cursor), &hs_key, hs_key.size)); + testutil_check(__wt_buf_set(CUR2S(cursor), &key, hs_key.data, hs_key.size)); restart = false; } else restart = true; @@ -118,6 +122,7 @@ hs_cursor(void *arg) break; } + __wt_buf_free(CUR2S(cursor), &key); testutil_check(session->close(session, NULL)); return (WT_THREAD_RET_VALUE); diff --git a/src/third_party/wiredtiger/test/format/ops.c b/src/third_party/wiredtiger/test/format/ops.c index ac77565170e..82aa22d5f40 100644 --- a/src/third_party/wiredtiger/test/format/ops.c +++ b/src/third_party/wiredtiger/test/format/ops.c @@ -628,7 +628,6 @@ ops(void *arg) val_gen_init(tinfo->value); tinfo->lastkey = &tinfo->_lastkey; key_gen_init(tinfo->lastkey); - tinfo->tbuf = &tinfo->_tbuf; /* Set the first operation where we'll create sessions and cursors. */ cursor = NULL; @@ -1008,7 +1007,6 @@ rollback: key_gen_teardown(tinfo->key); val_gen_teardown(tinfo->value); key_gen_teardown(tinfo->lastkey); - free(tinfo->tbuf->mem); tinfo->state = TINFO_COMPLETE; return (WT_THREAD_RET_VALUE); @@ -1249,16 +1247,13 @@ order_error_col: goto order_error_row; if (!record_gaps) { /* - * Convert the keys to record numbers and then compare less-than-or-equal. (Not + * Convert the keys to record numbers and then compare less-than-or-equal. (It's not * less-than, row-store inserts new rows in-between rows by appending a new suffix - * to the row's key.) + * to the row's key.) Keys are strings with terminating '/' values, so absent key + * corruption, we can simply do the underlying string conversion on the key string. */ - testutil_check(__wt_buf_fmt(CUR2S(cursor), tinfo->tbuf, "%.*s", - (int)tinfo->key->size, (char *)tinfo->key->data)); - keyno_prev = strtoul(tinfo->tbuf->data, NULL, 10); - testutil_check(__wt_buf_fmt( - CUR2S(cursor), tinfo->tbuf, "%.*s", (int)key.size, (char *)key.data)); - keyno = strtoul(tinfo->tbuf->data, NULL, 10); + keyno_prev = strtoul(tinfo->key->data, NULL, 10); + keyno = strtoul(key.data, NULL, 10); if (incrementing) { if (keyno_prev != keyno && keyno_prev + 1 != keyno) goto order_error_row; diff --git a/src/third_party/wiredtiger/test/format/salvage.c b/src/third_party/wiredtiger/test/format/salvage.c index 8f8d3c12786..0e922a71627 100644 --- a/src/third_party/wiredtiger/test/format/salvage.c +++ b/src/third_party/wiredtiger/test/format/salvage.c @@ -139,16 +139,14 @@ wts_salvage(void) /* Salvage, then verify. */ wts_open(g.home, &conn, &session, true); testutil_check(session->salvage(session, g.uri, "force=true")); - -#if 0 - wts_verify("post-salvage verify"); -#endif + wts_verify(conn, "post-salvage verify"); wts_close(&conn, &session); /* Corrupt the file randomly, salvage, then verify. */ if (corrupt()) { wts_open(g.home, &conn, &session, false); testutil_check(session->salvage(session, g.uri, "force=true")); + wts_verify(conn, "post-corrupt-salvage verify"); wts_close(&conn, &session); } } diff --git a/src/third_party/wiredtiger/test/format/smoke.sh b/src/third_party/wiredtiger/test/format/smoke.sh index 067ef8e2589..de46580c078 100755 --- a/src/third_party/wiredtiger/test/format/smoke.sh +++ b/src/third_party/wiredtiger/test/format/smoke.sh @@ -3,7 +3,6 @@ set -e # Smoke-test format as part of running "make check". -args="-1 -c . " args="$args btree.compression=none " args="$args logging_compression=none" args="$args runs.ops=50000 " @@ -11,11 +10,18 @@ args="$args runs.rows=10000 " args="$args runs.source=table " args="$args runs.threads=4 " +# Locate format.sh from home directory. +FORMAT_SCRIPT=$(git rev-parse --show-toplevel)/test/format/format.sh + # Temporarily disabled -# $TEST_WRAPPER ./t $args runs.type=fix -# $TEST_WRAPPER ./t $args runs.type=row runs.source=lsm -# $TEST_WRAPPER ./t $args runs.type=var +# $FORMAT_SCRIPT -t 2 $args runs.type=fix +# $FORMAT_SCRIPT -t 2 $args runs.type=row runs.source=lsm +# $FORMAT_SCRIPT -t 2 $args runs.type=var + +# Run the format script for 10 minutues, distribute it across the number +# of different test arguments. + +# This will run the test/format binary for 5 minutes each. +$FORMAT_SCRIPT -t 5 $args runs.type=row -$TEST_WRAPPER ./t $args runs.type=row -# Force a rebalance to occur with statistics logging to test the utility -$TEST_WRAPPER ./t $args runs.type=row statistics.server=1 ops.rebalance=1 +$FORMAT_SCRIPT -t 5 $args runs.type=row statistics.server=1 ops.rebalance=1 diff --git a/src/third_party/wiredtiger/test/format/t.c b/src/third_party/wiredtiger/test/format/t.c index d363c037ae7..de329749335 100644 --- a/src/third_party/wiredtiger/test/format/t.c +++ b/src/third_party/wiredtiger/test/format/t.c @@ -274,7 +274,7 @@ main(int argc, char *argv[]) trace_init(); TIMED_MAJOR_OP(wts_load()); /* Load and verify initial records */ - TIMED_MAJOR_OP(wts_verify("post-bulk verify")); + TIMED_MAJOR_OP(wts_verify(g.wts_conn, "post-bulk verify")); } TIMED_MAJOR_OP(wts_read_scan()); @@ -292,7 +292,7 @@ main(int argc, char *argv[]) * Verify the objects. Verify closes the underlying handle and discards the statistics, read * them first. */ - TIMED_MAJOR_OP(wts_verify("post-ops verify")); + TIMED_MAJOR_OP(wts_verify(g.wts_conn, "post-ops verify")); track("shutting down", 0ULL, NULL); wts_close(&g.wts_conn, NULL); diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c index 91b8c5051aa..f822a6e8bea 100644 --- a/src/third_party/wiredtiger/test/format/wts.c +++ b/src/third_party/wiredtiger/test/format/wts.c @@ -487,16 +487,14 @@ wts_close(WT_CONNECTION **connp, WT_SESSION **sessionp) } void -wts_verify(const char *tag) +wts_verify(WT_CONNECTION *conn, const char *tag) { - WT_CONNECTION *conn; WT_DECL_RET; WT_SESSION *session; if (g.c_verify == 0) return; - conn = g.wts_conn; track("verify", 0ULL, NULL); testutil_check(conn->open_session(conn, NULL, NULL, &session)); diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint04.py b/src/third_party/wiredtiger/test/suite/test_checkpoint04.py index b2af62ce4a1..710025067f7 100755 --- a/src/third_party/wiredtiger/test/suite/test_checkpoint04.py +++ b/src/third_party/wiredtiger/test/suite/test_checkpoint04.py @@ -68,63 +68,72 @@ class test_checkpoint04(wttest.WiredTigerTestCase): def test_checkpoint_stats(self): nrows = 100 - ntables = 5 - - # Create many tables and perform many updates so our checkpoint stats are populated. - value = "wired" * 100 - tables = self.create_tables(ntables) - for uri, ds in tables.items(): - self.add_updates(uri, ds, value, nrows) - - # Perform a checkpoint. - self.session.checkpoint() - - # Update the tables. - value = "tiger" * 100 - tables = self.create_tables(ntables) - for uri, ds in tables.items(): - self.add_updates(uri, ds, value, nrows) - - # Perform a checkpoint. - self.session.checkpoint() - - # Check the statistics. - # Set them into a variable so that we can print them all out. We've had a failure - # on Windows that is very difficult to reproduce so collect what info we can. - num_ckpt = self.get_stat(stat.conn.txn_checkpoint) - self.pr('txn_checkpoint, number of checkpoints ' + str(num_ckpt)) - running = self.get_stat(stat.conn.txn_checkpoint_running) - self.pr('txn_checkpoint_running ' + str(running)) - prep_running = self.get_stat(stat.conn.txn_checkpoint_prep_running) - self.pr('txn_checkpoint_prep_running ' + str(prep_running)) - - prep_min = self.get_stat(stat.conn.txn_checkpoint_prep_min) - self.pr('txn_checkpoint_prep_min ' + str(prep_min)) - time_min = self.get_stat(stat.conn.txn_checkpoint_time_min) - self.pr('txn_checkpoint_time_min ' + str(time_min)) - - prep_max = self.get_stat(stat.conn.txn_checkpoint_prep_max) - self.pr('txn_checkpoint_prep_max ' + str(prep_max)) - time_max = self.get_stat(stat.conn.txn_checkpoint_time_max) - self.pr('txn_checkpoint_time_max ' + str(time_max)) - - prep_recent = self.get_stat(stat.conn.txn_checkpoint_prep_recent) - self.pr('txn_checkpoint_prep_recent ' + str(prep_recent)) - time_recent = self.get_stat(stat.conn.txn_checkpoint_time_recent) - self.pr('txn_checkpoint_time_recent ' + str(time_recent)) - - prep_total = self.get_stat(stat.conn.txn_checkpoint_prep_total) - self.pr('txn_checkpoint_prep_total ' + str(prep_total)) - time_total = self.get_stat(stat.conn.txn_checkpoint_time_total) - self.pr('txn_checkpoint_time_total ' + str(time_total)) - - self.assertEqual(num_ckpt, 2) - self.assertEqual(running, 0) - self.assertEqual(prep_running, 0) - self.assertLess(prep_min, time_min) - self.assertLess(prep_max, time_max) - self.assertLess(prep_recent, time_recent) - self.assertLess(prep_total, time_total) + ntables = 10 + multiplier = 1 + + # Run the loop and increase the value size with each iteration until + # the test passes. + while True: + # Create many tables and perform many updates so our checkpoint stats are populated. + value = "wired" * 100 * multiplier + tables = self.create_tables(ntables) + for uri, ds in tables.items(): + self.add_updates(uri, ds, value, nrows) + + # Perform a checkpoint. + self.session.checkpoint() + + # Update the tables. + value = "tiger" * 100 * multiplier + tables = self.create_tables(ntables) + for uri, ds in tables.items(): + self.add_updates(uri, ds, value, nrows) + + # Perform a checkpoint. + self.session.checkpoint() + + # Check the statistics. + # Set them into a variable so that we can print them all out. We've had a failure + # on Windows that is very difficult to reproduce so collect what info we can. + num_ckpt = self.get_stat(stat.conn.txn_checkpoint) + self.pr('txn_checkpoint, number of checkpoints ' + str(num_ckpt)) + running = self.get_stat(stat.conn.txn_checkpoint_running) + self.pr('txn_checkpoint_running ' + str(running)) + prep_running = self.get_stat(stat.conn.txn_checkpoint_prep_running) + self.pr('txn_checkpoint_prep_running ' + str(prep_running)) + + prep_min = self.get_stat(stat.conn.txn_checkpoint_prep_min) + self.pr('txn_checkpoint_prep_min ' + str(prep_min)) + time_min = self.get_stat(stat.conn.txn_checkpoint_time_min) + self.pr('txn_checkpoint_time_min ' + str(time_min)) + + prep_max = self.get_stat(stat.conn.txn_checkpoint_prep_max) + self.pr('txn_checkpoint_prep_max ' + str(prep_max)) + time_max = self.get_stat(stat.conn.txn_checkpoint_time_max) + self.pr('txn_checkpoint_time_max ' + str(time_max)) + + prep_recent = self.get_stat(stat.conn.txn_checkpoint_prep_recent) + self.pr('txn_checkpoint_prep_recent ' + str(prep_recent)) + time_recent = self.get_stat(stat.conn.txn_checkpoint_time_recent) + self.pr('txn_checkpoint_time_recent ' + str(time_recent)) + + prep_total = self.get_stat(stat.conn.txn_checkpoint_prep_total) + self.pr('txn_checkpoint_prep_total ' + str(prep_total)) + time_total = self.get_stat(stat.conn.txn_checkpoint_time_total) + self.pr('txn_checkpoint_time_total ' + str(time_total)) + + self.assertEqual(num_ckpt, 2 * multiplier) + self.assertEqual(running, 0) + self.assertEqual(prep_running, 0) + # Assert if this loop continues for more than 100 iterations. + self.assertLess(multiplier, 100) + + # This condition is mainly to confirm that prep's stats time are always less than time's stats time. + # Run the loop again if any of the below condition fails and exit if the test passes. + if prep_min < time_min and prep_max < time_max and prep_recent < time_recent and prep_total < time_total: + break + else: + multiplier += 1 if __name__ == '__main__': wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_hs11.py b/src/third_party/wiredtiger/test/suite/test_hs11.py index efc9d02401c..f7d31c6796f 100644 --- a/src/third_party/wiredtiger/test/suite/test_hs11.py +++ b/src/third_party/wiredtiger/test/suite/test_hs11.py @@ -32,13 +32,12 @@ def timestamp_str(t): return '%x' % t # test_hs11.py -# Ensure that when we delete a key due to a tombstone being globally visible, we delete its -# associated history store content. +# Ensure that mixed mode updates clear the history store records. class test_hs11(wttest.WiredTigerTestCase): conn_config = 'cache_size=50MB' session_config = 'isolation=snapshot' - def test_key_deletion_clears_hs(self): + def run_test(self, update_type): uri = 'table:test_hs11' create_params = 'key_format=S,value_format=S' self.session.create(uri, create_params) @@ -58,14 +57,16 @@ class test_hs11(wttest.WiredTigerTestCase): # Reconcile and flush versions 1-3 to the history store. self.session.checkpoint() - # Apply a non-timestamped tombstone. When the pages get evicted, the keys will get deleted - # since the tombstone is globally visible. + # Apply a mixed mode update. for i in range(1, 10000): if i % 2 == 0: - cursor.set_key(str(i)) - cursor.remove() + if update_type == 'deletion': + cursor.set_key(str(i)) + cursor.remove() + else: + cursor[str(i)] = value2 - # Now apply an update at timestamp 10 to recreate each key. + # Now apply an update at timestamp 10. for i in range(1, 10000): self.session.begin_transaction() cursor[str(i)] = value2 @@ -76,8 +77,17 @@ class test_hs11(wttest.WiredTigerTestCase): self.session.begin_transaction('read_timestamp=' + timestamp_str(ts)) for i in range(1, 10000): if i % 2 == 0: - cursor.set_key(str(i)) - self.assertEqual(cursor.search(), wiredtiger.WT_NOTFOUND) + if update_type == 'deletion': + cursor.set_key(str(i)) + self.assertEqual(cursor.search(), wiredtiger.WT_NOTFOUND) + else: + self.assertEqual(cursor[str(i)], value2) else: self.assertEqual(cursor[str(i)], value1) self.session.rollback_transaction() + + def test_key_deletion_clears_hs(self): + self.run_test('deletion') + + def test_key_update_clears_hs(self): + self.run_test('update') diff --git a/src/third_party/wiredtiger/test/suite/test_prepare08.py b/src/third_party/wiredtiger/test/suite/test_prepare08.py index 0ebcec952ce..f3eb9d12881 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare08.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare08.py @@ -37,9 +37,9 @@ def timestamp_str(t): # test_prepare07.py # Test to ensure prepared tombstones are properly aborted even when they are written # to the data store. -class test_prepare07(wttest.WiredTigerTestCase): +class test_prepare08(wttest.WiredTigerTestCase): # Force a small cache. - conn_config = 'cache_size=1MB' + conn_config = 'cache_size=2MB' def updates(self, ds, uri, nrows, value, ts): cursor = self.session.open_cursor(uri) diff --git a/src/third_party/wiredtiger/test/suite/test_prepare10.py b/src/third_party/wiredtiger/test/suite/test_prepare10.py index 7df96ffd2c0..ba1a29718ed 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare10.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare10.py @@ -34,12 +34,12 @@ from wtdataset import SimpleDataSet def timestamp_str(t): return '%x' % t -# test_prepare07.py +# test_prepare10.py # Test to ensure prepared tombstones are properly aborted even when they are written # to the data store. -class test_prepare07(wttest.WiredTigerTestCase): +class test_prepare10(wttest.WiredTigerTestCase): # Force a small cache. - conn_config = 'cache_size=1MB' + conn_config = 'cache_size=2MB' session_config = 'isolation=snapshot' def updates(self, ds, uri, nrows, value, ts): diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp19.py b/src/third_party/wiredtiger/test/suite/test_timestamp19.py deleted file mode 100755 index bb28dce6703..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_timestamp19.py +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-2020 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. -# -# test_timestamp19.py -# Use the oldest checkpoint timestamp in the history store as the minimum valid oldest -# timestamp on restart. -# - -import wiredtiger, wttest -from wtdataset import SimpleDataSet - -def timestamp_str(t): - return '%x' % t - -class test_timestamp19(wttest.WiredTigerTestCase): - conn_config = 'cache_size=50MB,log=(enabled),statistics=(all)' - session_config = 'isolation=snapshot' - - def updates(self, uri, value, ds, nrows, commit_ts): - session = self.session - cursor = session.open_cursor(uri) - for i in range(0, nrows): - session.begin_transaction() - cursor[ds.key(i)] = value - session.commit_transaction('commit_timestamp=' + timestamp_str(commit_ts)) - cursor.close() - - def test_timestamp(self): - uri = "table:test_timestamp19" - create_params = 'value_format=S,key_format=i' - self.session.create(uri, create_params) - - ds = SimpleDataSet( - self, uri, 0, key_format="i", value_format="S", config='log=(enabled=false)') - ds.populate() - - nrows = 1000 - value_x = 'x' * 1000 - value_y = 'y' * 1000 - value_z = 'z' * 1000 - - # Set the oldest and stable timestamps to 10. - self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(10) + - ', stable_timestamp=' + timestamp_str(10)) - - # Insert values with varying timestamps. - self.updates(uri, value_x, ds, nrows, 20) - self.updates(uri, value_y, ds, nrows, 30) - self.updates(uri, value_z, ds, nrows, 40) - - # Perform a checkpoint. - self.session.checkpoint('use_timestamp=true') - - # Move the oldest and stable timestamps to 40. - self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(40) + - ', stable_timestamp=' + timestamp_str(40)) - - # Update values. - self.updates(uri, value_z, ds, nrows, 50) - self.updates(uri, value_x, ds, nrows, 60) - self.updates(uri, value_y, ds, nrows, 70) - - # Perform a checkpoint. - self.session.checkpoint('use_timestamp=true') - - # Close and reopen the connection. - self.close_conn() - self.conn = self.setUpConnectionOpen('.') - self.session = self.setUpSessionOpen(self.conn) - - # The oldest timestamp on recovery is 40. Trying to set it earlier is a no-op. - self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(10)) - self.assertTimestampsEqual(self.conn.query_timestamp('get=oldest'), timestamp_str(40)) - - # Trying to set an earlier stable timestamp is an error. - self.assertRaisesWithMessage(wiredtiger.WiredTigerError, - lambda: self.conn.set_timestamp('stable_timestamp=' + timestamp_str(10)), - '/oldest timestamp \(0, 40\) must not be later than stable timestamp \(0, 10\)/') - self.assertTimestampsEqual(self.conn.query_timestamp('get=stable'), timestamp_str(40)) - - # Move the oldest and stable timestamps to 70. - self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(70) + - ', stable_timestamp=' + timestamp_str(70)) - self.assertTimestampsEqual(self.conn.query_timestamp('get=oldest'), timestamp_str(70)) - self.assertTimestampsEqual(self.conn.query_timestamp('get=stable'), timestamp_str(70)) - -if __name__ == '__main__': - wttest.run() |