diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-09-16 17:12:34 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-16 07:41:33 +0000 |
commit | cb3d67879708a44c8ec77247017e6e1b9b14dec6 (patch) | |
tree | 391c4375f96ab7580720bc393f55858d7a5c30c5 /src | |
parent | ae6edba8f9e2864f42ce6384ac504959544239bb (diff) | |
download | mongo-cb3d67879708a44c8ec77247017e6e1b9b14dec6.tar.gz |
Import wiredtiger: 484916b2c8d3f6975aebefea8d17b97c3184f706 from branch mongodb-4.6
ref: 56492ae3bc..484916b2c8
for: 4.8.0
WT-6263 Reenable history store verification
WT-6277 Compatibility tests verify failure in timestamp validation
WT-6427 Always set stable timestamp when setting oldest timestamp
WT-6467 Fix history store verification
WT-6583 Only clear the read timestamp when releasing the transaction
WT-6680 Temporarily disable history store verification
Diffstat (limited to 'src')
29 files changed, 827 insertions, 542 deletions
diff --git a/src/third_party/wiredtiger/dist/s_void b/src/third_party/wiredtiger/dist/s_void index cbff017ebf9..aa1b7fa39b7 100755 --- a/src/third_party/wiredtiger/dist/s_void +++ b/src/third_party/wiredtiger/dist/s_void @@ -48,10 +48,13 @@ func_ok() -e '/int __page_write_gen_wrapped_check$/d' \ -e '/int __posix_terminate$/d' \ -e '/int __rec_destroy_session$/d' \ + -e '/int __time_aggregate_validate_parent$/d' \ + -e '/int __time_aggregate_validate_parent_stable$/d' \ + -e '/int __time_value_validate_parent$/d' \ + -e '/int __time_value_validate_parent_stable$/d' \ -e '/int __tree_walk_skip_count_callback$/d' \ -e '/int __txn_rollback_to_stable_custom_skip$/d' \ -e '/int __win_terminate$/d' \ - -e '/int wiredtiger_calc_modify/d' \ -e '/int __wt_block_compact_end$/d' \ -e '/int __wt_block_compact_start$/d' \ -e '/int __wt_block_manager_size$/d' \ @@ -122,6 +125,7 @@ func_ok() -e '/int uri2name$/d' \ -e '/int usage$/d' \ -e '/int util_err$/d' \ + -e '/int wiredtiger_calc_modify/d' \ -e '/int wiredtiger_extension_init$/d' \ -e '/int wiredtiger_extension_terminate$/d' \ -e '/int wiredtiger_pack_close$/d' \ diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index 84d2bb1fec2..03a04bca589 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -370,6 +370,8 @@ 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_hs_tombstone', 'cursor next calls that skip due to a globally visible history store tombstone'), + CursorStat('cursor_next_hs_tombstone_rts', 'cursor next calls that skip due to a globally visible history store tombstone in rollback to stable'), 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'), diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 6ca2ec664e9..5ca1b3b065f 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.6", - "commit": "56492ae3bc3b021c8ead883d4f841db7cf6b3ded" + "commit": "484916b2c8d3f6975aebefea8d17b97c3184f706" } diff --git a/src/third_party/wiredtiger/src/btree/bt_slvg.c b/src/third_party/wiredtiger/src/btree/bt_slvg.c index 0dd24eee0f8..8800f2ae6e6 100644 --- a/src/third_party/wiredtiger/src/btree/bt_slvg.c +++ b/src/third_party/wiredtiger/src/btree/bt_slvg.c @@ -595,7 +595,7 @@ __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); + WT_TIME_AGGREGATE_INIT_MERGE(&trk->trk_ta); /* * Column-store variable-length format: the start key can be taken from the block's header, @@ -605,7 +605,7 @@ __slvg_trk_leaf(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, uint8_t *ad WT_CELL_FOREACH_KV (session, dsk, unpack) { stop_recno += __wt_cell_rle(&unpack); - WT_TIME_AGGREGATE_UPDATE(&trk->trk_ta, &unpack.tw); + WT_TIME_AGGREGATE_UPDATE(session, &trk->trk_ta, &unpack.tw); } WT_CELL_FOREACH_END; @@ -620,9 +620,9 @@ __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_TIME_AGGREGATE_INIT_MERGE(&trk->trk_ta); WT_CELL_FOREACH_KV (session, dsk, unpack) { - WT_TIME_AGGREGATE_UPDATE(&trk->trk_ta, &unpack.tw); + WT_TIME_AGGREGATE_UPDATE(session, &trk->trk_ta, &unpack.tw); } WT_CELL_FOREACH_END; diff --git a/src/third_party/wiredtiger/src/btree/bt_vrfy.c b/src/third_party/wiredtiger/src/btree/bt_vrfy.c index 626f916cdd8..16a1e0c6ff8 100644 --- a/src/third_party/wiredtiger/src/btree/bt_vrfy.c +++ b/src/third_party/wiredtiger/src/btree/bt_vrfy.c @@ -171,7 +171,7 @@ __wt_verify(WT_SESSION_IMPL *session, const char *cfg[]) bool bm_start, quit; #if 0 - /* FIXME-WT-6263: Temporarily disable history store verification. */ + /* FIXME-WT-6682: temporarily disable history store verification. */ bool skip_hs; #endif @@ -182,9 +182,9 @@ __wt_verify(WT_SESSION_IMPL *session, const char *cfg[]) bm_start = false; #if 0 - /* FIXME-WT-6263: Temporarily disable history store verification. */ - /* + * FIXME-WT-6682: temporarily disable history store verification. + * * Skip the history store explicit call if we're performing a metadata verification. The * metadata file is verified before we verify the history store, and it makes no sense to verify * the history store against itself. @@ -273,6 +273,8 @@ __wt_verify(WT_SESSION_IMPL *session, const char *cfg[]) #if 0 /* + * FIXME-WT-6682: temporarily disable history store verification. + * * The checkpoints are in time-order, so the last one in the list is the most recent. If * this is the most recent checkpoint, verify the history store against it. * @@ -280,9 +282,9 @@ __wt_verify(WT_SESSION_IMPL *session, const char *cfg[]) */ if (ret == 0 && (ckpt + 1)->name == NULL && !skip_hs) { /* Open a history store cursor. */ - WT_ERR(__wt_hs_cursor_open(session); + WT_ERR(__wt_hs_cursor_open(session)); WT_TRET(__wt_history_store_verify_one(session)); - WT_TRET(__wt_hs_cursor_close(session); + WT_TRET(__wt_hs_cursor_close(session)); /* * We cannot error out here. If we got an error verifying the history store, we need * to follow through with reacquiring the exclusive call below. We'll error out diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c index 7caef79173d..38bce98ca93 100644 --- a/src/third_party/wiredtiger/src/conn/conn_api.c +++ b/src/third_party/wiredtiger/src/conn/conn_api.c @@ -2807,7 +2807,7 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *c * If the user wants to verify WiredTiger metadata, verify the history store now that the * metadata table may have been salvaged and eviction has been started and recovery run. * - * FIXME-WT-6263: Temporarily disable history store verification. + * FIXME-WT-6682: temporarily disable history store verification. */ if (verify_meta) { WT_ERR(__wt_open_internal_session(conn, "verify hs", false, 0, &verify_session)); diff --git a/src/third_party/wiredtiger/src/history/hs.c b/src/third_party/wiredtiger/src/history/hs.c index f47305d341c..a7ac8003228 100644 --- a/src/third_party/wiredtiger/src/history/hs.c +++ b/src/third_party/wiredtiger/src/history/hs.c @@ -1575,7 +1575,7 @@ __hs_fixup_out_of_order_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, * we can skip it. */ if (__wt_txn_tw_stop_visible_all(session, &hs_cbt->upd_value->tw)) { - WT_STAT_CONN_INCR(session, cursor_prev_hs_tombstone); + WT_STAT_CONN_INCR(session, cursor_next_hs_tombstone); continue; } /* @@ -1692,7 +1692,7 @@ __hs_delete_key_from_pos( * we can skip it. */ if (__wt_txn_tw_stop_visible_all(session, &hs_cbt->upd_value->tw)) { - WT_STAT_CONN_INCR(session, cursor_prev_hs_tombstone); + WT_STAT_CONN_INCR(session, cursor_next_hs_tombstone); continue; } /* @@ -1725,31 +1725,31 @@ err: * store. */ static int -__verify_history_store_id(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, uint32_t this_btree_id) +__verify_history_store_id(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *ds_cbt, uint32_t this_btree_id) { WT_CURSOR *hs_cursor; - WT_DECL_ITEM(prev_hs_key); + WT_CURSOR_BTREE *hs_cbt; + WT_DECL_ITEM(prev_key); WT_DECL_RET; - WT_ITEM hs_key; + WT_ITEM key; wt_timestamp_t hs_start_ts; uint64_t hs_counter; uint32_t btree_id; int cmp; - bool found; hs_cursor = session->hs_cursor; - WT_CLEAR(hs_key); + hs_cbt = (WT_CURSOR_BTREE *)hs_cursor; + WT_CLEAR(key); - WT_ERR(__wt_scr_alloc(session, 0, &prev_hs_key)); + WT_ERR(__wt_scr_alloc(session, 0, &prev_key)); /* - * We need to be able to iterate over the history store content for another table. In order to - * do this, we must ignore non-globally visible tombstones in the history store since every - * history store record is succeeded with a tombstone. We also need to skip the non-globally - * visible tombstones in the data table to verify the corresponding entries in the history store - * are too present in the data store. + * If using standard cursors, we need to skip the non-globally visible tombstones in the data + * table to verify the corresponding entries in the history store are too present in the data + * store. Though this is not required currently as we are directly searching btree cursors, + * leave it here in case we switch to standard cursors. */ - F_SET(&cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE); + F_SET(&ds_cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE); /* * The caller is responsible for positioning the history store cursor at the first record to @@ -1757,7 +1757,7 @@ __verify_history_store_id(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, uint32 * cursor there or deciding they're done. */ for (; ret == 0; ret = __wt_hs_cursor_next(session, hs_cursor)) { - WT_ERR(hs_cursor->get_key(hs_cursor, &btree_id, &hs_key, &hs_start_ts, &hs_counter)); + WT_ERR(hs_cursor->get_key(hs_cursor, &btree_id, &key, &hs_start_ts, &hs_counter)); /* * If the btree id does not match the preview one, we're done. It is up to the caller to set @@ -1770,37 +1770,46 @@ __verify_history_store_id(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, uint32 break; /* + * If the stop time pair on the tombstone in the history store is already globally visible + * we can skip it. + */ + if (__wt_txn_tw_stop_visible_all(session, &hs_cbt->upd_value->tw)) { + WT_STAT_CONN_INCR(session, cursor_next_hs_tombstone); + continue; + } + + /* * If we have already checked against this key, keep going to the next key. We only need to * check the key once. */ - WT_ERR(__wt_compare(session, NULL, &hs_key, prev_hs_key, &cmp)); + WT_ERR(__wt_compare(session, NULL, &key, prev_key, &cmp)); if (cmp == 0) continue; - WT_WITH_PAGE_INDEX(session, ret = __hs_row_search(cbt, &hs_key, false)); - WT_ERR(ret); - found = cbt->compare == 0; - WT_ERR(__cursor_reset(cbt)); + WT_WITH_PAGE_INDEX(session, ret = __wt_row_search(ds_cbt, &key, false, NULL, false, NULL)); + WT_ERR(ret); - if (!found) { + if (ds_cbt->compare != 0) { F_SET(S2C(session), WT_CONN_DATA_CORRUPTION); WT_ERR_PANIC(session, WT_PANIC, "the associated history store key %s was not found in the data store %s", - __wt_buf_set_printable(session, hs_key.data, hs_key.size, prev_hs_key), + __wt_buf_set_printable(session, key.data, key.size, prev_key), session->dhandle->name); } + WT_ERR(__cursor_reset(ds_cbt)); + /* * Copy the key memory into our scratch buffer. The key will get invalidated on our next * cursor iteration. */ - WT_ERR(__wt_buf_set(session, prev_hs_key, hs_key.data, hs_key.size)); + WT_ERR(__wt_buf_set(session, prev_key, key.data, key.size)); } WT_ERR_NOTFOUND_OK(ret, true); err: - F_CLR(&cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE); - WT_ASSERT(session, hs_key.mem == NULL && hs_key.memsize == 0); - __wt_scr_free(session, &prev_hs_key); + F_CLR(&ds_cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE); + WT_ASSERT(session, key.mem == NULL && key.memsize == 0); + __wt_scr_free(session, &prev_key); return (ret); } @@ -1812,14 +1821,14 @@ err: int __wt_history_store_verify_one(WT_SESSION_IMPL *session) { - WT_CURSOR *cursor; - WT_CURSOR_BTREE cbt; + WT_CURSOR *hs_cursor; + WT_CURSOR_BTREE ds_cbt; WT_DECL_RET; WT_ITEM hs_key; uint32_t btree_id; int exact; - cursor = session->hs_cursor; + hs_cursor = session->hs_cursor; btree_id = S2BT(session)->id; /* @@ -1827,17 +1836,23 @@ __wt_history_store_verify_one(WT_SESSION_IMPL *session) * in the history store. */ memset(&hs_key, 0, sizeof(hs_key)); - cursor->set_key(cursor, btree_id, &hs_key, 0, 0); - ret = __wt_hs_cursor_search_near(session, cursor, &exact); + hs_cursor->set_key(hs_cursor, btree_id, &hs_key, 0, 0); + ret = __wt_hs_cursor_search_near(session, hs_cursor, &exact); if (ret == 0 && exact < 0) - ret = __wt_hs_cursor_next(session, cursor); + ret = __wt_hs_cursor_next(session, hs_cursor); - /* If we positioned the cursor there is something to verify. */ + /* + * If we positioned the cursor there is something to verify. + * + * We are in verify and we are not able to open a standard cursor because the btree is flagged + * as WT_BTREE_VERIFY. However, we have exclusive access to the btree so we can directly open + * the btree cursor to work around it. + */ if (ret == 0) { - __wt_btcur_init(session, &cbt); - __wt_btcur_open(&cbt); - ret = __verify_history_store_id(session, &cbt, btree_id); - WT_TRET(__wt_btcur_close(&cbt, false)); + __wt_btcur_init(session, &ds_cbt); + __wt_btcur_open(&ds_cbt); + ret = __verify_history_store_id(session, &ds_cbt, btree_id); + WT_TRET(__wt_btcur_close(&ds_cbt, false)); } return (ret == WT_NOTFOUND ? 0 : ret); } @@ -1850,10 +1865,10 @@ __wt_history_store_verify_one(WT_SESSION_IMPL *session) int __wt_history_store_verify(WT_SESSION_IMPL *session) { - WT_CURSOR *cursor, *data_cursor; + WT_CURSOR *ds_cursor, *hs_cursor; WT_DECL_ITEM(buf); WT_DECL_RET; - WT_ITEM hs_key; + WT_ITEM key; wt_timestamp_t hs_start_ts; uint64_t hs_counter; uint32_t btree_id; @@ -1863,15 +1878,15 @@ __wt_history_store_verify(WT_SESSION_IMPL *session) /* We should never reach here if working in context of the default session. */ WT_ASSERT(session, S2C(session)->default_session != session); - cursor = data_cursor = NULL; - WT_CLEAR(hs_key); + ds_cursor = hs_cursor = NULL; + WT_CLEAR(key); btree_id = WT_BTREE_ID_INVALID; uri_data = NULL; WT_ERR(__wt_scr_alloc(session, 0, &buf)); WT_ERR(__wt_hs_cursor_open(session)); - cursor = session->hs_cursor; - WT_ERR_NOTFOUND_OK(__wt_hs_cursor_next(session, cursor), true); + hs_cursor = session->hs_cursor; + WT_ERR_NOTFOUND_OK(__wt_hs_cursor_next(session, hs_cursor), true); stop = ret == WT_NOTFOUND ? true : false; ret = 0; @@ -1884,27 +1899,26 @@ __wt_history_store_verify(WT_SESSION_IMPL *session) * The cursor is positioned either from above or left over from the internal call on the * first key of a new btree id. */ - WT_ERR(cursor->get_key(cursor, &btree_id, &hs_key, &hs_start_ts, &hs_counter)); + WT_ERR(hs_cursor->get_key(hs_cursor, &btree_id, &key, &hs_start_ts, &hs_counter)); if ((ret = __wt_metadata_btree_id_to_uri(session, btree_id, &uri_data)) != 0) { F_SET(S2C(session), WT_CONN_DATA_CORRUPTION); WT_ERR_PANIC(session, WT_PANIC, - "Unable to find btree id %" PRIu32 - " in the metadata file for the associated history store key %s", - btree_id, __wt_buf_set_printable(session, hs_key.data, hs_key.size, buf)); + "Unable to find btree id %" PRIu32 " in the metadata file for the associated key %s", + btree_id, __wt_buf_set_printable(session, key.data, key.size, buf)); } - WT_ERR(__wt_open_cursor(session, uri_data, NULL, NULL, &data_cursor)); - F_SET(data_cursor, WT_CURSOR_RAW_OK); - ret = __verify_history_store_id(session, (WT_CURSOR_BTREE *)data_cursor, btree_id); + WT_ERR(__wt_open_cursor(session, uri_data, NULL, NULL, &ds_cursor)); + F_SET(ds_cursor, WT_CURSOR_RAW_OK); + ret = __verify_history_store_id(session, (WT_CURSOR_BTREE *)ds_cursor, btree_id); if (ret == WT_NOTFOUND) stop = true; - WT_TRET(data_cursor->close(data_cursor)); + WT_TRET(ds_cursor->close(ds_cursor)); WT_ERR_NOTFOUND_OK(ret, false); } err: WT_TRET(__wt_hs_cursor_close(session)); __wt_scr_free(session, &buf); - WT_ASSERT(session, hs_key.mem == NULL && hs_key.memsize == 0); + WT_ASSERT(session, key.mem == NULL && key.memsize == 0); __wt_free(session, uri_data); return (ret); } diff --git a/src/third_party/wiredtiger/src/include/reconcile.i b/src/third_party/wiredtiger/src/include/reconcile.i index a6c01d20c45..f9d76a4477d 100644 --- a/src/third_party/wiredtiger/src/include/reconcile.i +++ b/src/third_party/wiredtiger/src/include/reconcile.i @@ -244,7 +244,7 @@ __wt_rec_addr_ts_init(WT_RECONCILE *r, WT_TIME_AGGREGATE *ta) if (r->page->type == WT_PAGE_COL_FIX) WT_TIME_AGGREGATE_INIT(ta); else - WT_TIME_AGGREGATE_INIT_MAX(ta); + WT_TIME_AGGREGATE_INIT_MERGE(ta); } /* diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index 6e070b9c1c6..9217a31c310 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -504,6 +504,8 @@ struct __wt_connection_stats { int64_t cursor_modify_bytes; int64_t cursor_modify_bytes_touch; int64_t cursor_next; + int64_t cursor_next_hs_tombstone; + int64_t cursor_next_hs_tombstone_rts; int64_t cursor_next_skip_ge_100; int64_t cursor_next_skip_lt_100; int64_t cursor_restart; diff --git a/src/third_party/wiredtiger/src/include/timestamp.h b/src/third_party/wiredtiger/src/include/timestamp.h index 0c589abb733..b33a2da512c 100644 --- a/src/third_party/wiredtiger/src/include/timestamp.h +++ b/src/third_party/wiredtiger/src/include/timestamp.h @@ -51,4 +51,6 @@ struct __wt_time_aggregate { uint64_t newest_stop_txn; /* default value: WT_TXN_MAX */ uint8_t prepare; + + uint8_t init_merge; /* Initialized for aggregation and merge */ }; diff --git a/src/third_party/wiredtiger/src/include/timestamp.i b/src/third_party/wiredtiger/src/include/timestamp.i index 0291147ed62..ee229fe0eb8 100644 --- a/src/third_party/wiredtiger/src/include/timestamp.i +++ b/src/third_party/wiredtiger/src/include/timestamp.i @@ -18,18 +18,6 @@ (tw)->prepare = 0; \ } while (0) -/* Initialize the fields in a time window to values that force an override. */ -#define WT_TIME_WINDOW_INIT_MAX(tw) \ - do { \ - (tw)->durable_start_ts = WT_TS_MAX; \ - (tw)->start_ts = WT_TS_MAX; \ - (tw)->start_txn = WT_TXN_MAX; \ - (tw)->durable_stop_ts = WT_TS_MAX; \ - (tw)->stop_ts = WT_TS_NONE; \ - (tw)->stop_txn = WT_TXN_NONE; \ - (tw)->prepare = 0; \ - } while (0) - /* Copy the values from one time window structure to another. */ #define WT_TIME_WINDOW_COPY(dest, source) (*(dest) = *(source)) @@ -88,6 +76,7 @@ (ta)->newest_stop_ts = WT_TS_MAX; \ (ta)->newest_stop_txn = WT_TXN_MAX; \ (ta)->prepare = 0; \ + (ta)->init_merge = 0; \ } while (0) /* @@ -98,7 +87,7 @@ * aggregated max values are used for rollback to stable operation to find out whether the page has * any timestamp updates more than stable timestamp. */ -#define WT_TIME_AGGREGATE_INIT_MAX(ta) \ +#define WT_TIME_AGGREGATE_INIT_MERGE(ta) \ do { \ (ta)->newest_start_durable_ts = WT_TS_NONE; \ (ta)->newest_stop_durable_ts = WT_TS_NONE; \ @@ -107,21 +96,28 @@ (ta)->newest_stop_ts = WT_TS_NONE; \ (ta)->newest_stop_txn = WT_TXN_NONE; \ (ta)->prepare = 0; \ + (ta)->init_merge = 1; \ } while (0) -/* Return true if the time aggregate is equivalent to the default time aggregate. */ -#define WT_TIME_AGGREGATE_IS_EMPTY(ta) \ - ((ta)->newest_start_durable_ts == WT_TS_NONE && (ta)->newest_stop_durable_ts == WT_TS_NONE && \ - (ta)->oldest_start_ts == WT_TS_MAX && (ta)->oldest_start_txn == WT_TXN_MAX && \ - (ta)->newest_stop_ts == WT_TS_NONE && (ta)->newest_stop_txn == WT_TXN_NONE && \ - (ta)->prepare == 0) +/* Return true if the time aggregate is equivalent to the initialized time aggregate. */ +#define WT_TIME_AGGREGATE_IS_EMPTY(ta) \ + ((ta)->init_merge == 0 ? \ + ((ta)->newest_start_durable_ts == WT_TS_NONE && \ + (ta)->newest_stop_durable_ts == WT_TS_NONE && (ta)->oldest_start_ts == WT_TS_NONE && \ + (ta)->oldest_start_txn == WT_TXN_NONE && (ta)->newest_stop_ts == WT_TS_MAX && \ + (ta)->newest_stop_txn == WT_TXN_MAX && (ta)->prepare == 0) : \ + ((ta)->newest_start_durable_ts == WT_TS_NONE && \ + (ta)->newest_stop_durable_ts == WT_TS_NONE && (ta)->oldest_start_ts == WT_TS_MAX && \ + (ta)->oldest_start_txn == WT_TXN_MAX && (ta)->newest_stop_ts == WT_TS_NONE && \ + (ta)->newest_stop_txn == WT_TXN_NONE && (ta)->prepare == 0)) /* Copy the values from one time aggregate structure to another. */ #define WT_TIME_AGGREGATE_COPY(dest, source) (*(dest) = *(source)) /* Update the aggregated window to reflect for a new time window. */ -#define WT_TIME_AGGREGATE_UPDATE(ta, tw) \ +#define WT_TIME_AGGREGATE_UPDATE(session, ta, tw) \ do { \ + WT_ASSERT(session, (ta)->init_merge == 1); \ (ta)->newest_start_durable_ts = \ WT_MAX((tw)->durable_start_ts, (ta)->newest_start_durable_ts); \ (ta)->newest_stop_durable_ts = \ @@ -135,8 +131,9 @@ } while (0) /* Merge an aggregated time window into another - choosing the most conservative value from each. */ -#define WT_TIME_AGGREGATE_MERGE(dest, source) \ +#define WT_TIME_AGGREGATE_MERGE(session, dest, source) \ do { \ + WT_ASSERT(session, (dest)->init_merge == 1); \ (dest)->newest_start_durable_ts = \ WT_MAX((dest)->newest_start_durable_ts, (source)->newest_start_durable_ts); \ (dest)->newest_stop_durable_ts = \ diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index f65dbc350b0..c3e7a0e9dc9 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -5453,665 +5453,675 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); /*! cursor: cursor next calls */ #define WT_STAT_CONN_CURSOR_NEXT 1208 /*! + * cursor: cursor next calls that skip due to a globally visible history + * store tombstone + */ +#define WT_STAT_CONN_CURSOR_NEXT_HS_TOMBSTONE 1209 +/*! + * cursor: cursor next calls that skip due to a globally visible history + * store tombstone in rollback to stable + */ +#define WT_STAT_CONN_CURSOR_NEXT_HS_TOMBSTONE_RTS 1210 +/*! * cursor: cursor next calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1209 +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1211 /*! cursor: cursor next calls that skip less than 100 entries */ -#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1210 +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1212 /*! cursor: cursor operation restarted */ -#define WT_STAT_CONN_CURSOR_RESTART 1211 +#define WT_STAT_CONN_CURSOR_RESTART 1213 /*! cursor: cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV 1212 +#define WT_STAT_CONN_CURSOR_PREV 1214 /*! * cursor: cursor prev calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE 1213 +#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE 1215 /*! * cursor: cursor prev calls that skip due to a globally visible history * store tombstone in rollback to stable */ -#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE_RTS 1214 +#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE_RTS 1216 /*! * cursor: cursor prev calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1215 +#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1217 /*! cursor: cursor prev calls that skip less than 100 entries */ -#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1216 +#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1218 /*! cursor: cursor remove calls */ -#define WT_STAT_CONN_CURSOR_REMOVE 1217 +#define WT_STAT_CONN_CURSOR_REMOVE 1219 /*! cursor: cursor remove key bytes removed */ -#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1218 +#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1220 /*! cursor: cursor reserve calls */ -#define WT_STAT_CONN_CURSOR_RESERVE 1219 +#define WT_STAT_CONN_CURSOR_RESERVE 1221 /*! cursor: cursor reset calls */ -#define WT_STAT_CONN_CURSOR_RESET 1220 +#define WT_STAT_CONN_CURSOR_RESET 1222 /*! cursor: cursor search calls */ -#define WT_STAT_CONN_CURSOR_SEARCH 1221 +#define WT_STAT_CONN_CURSOR_SEARCH 1223 /*! cursor: cursor search history store calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_HS 1222 +#define WT_STAT_CONN_CURSOR_SEARCH_HS 1224 /*! cursor: cursor search near calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1223 +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1225 /*! cursor: cursor sweep buckets */ -#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1224 +#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1226 /*! cursor: cursor sweep cursors closed */ -#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1225 +#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1227 /*! cursor: cursor sweep cursors examined */ -#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1226 +#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1228 /*! cursor: cursor sweeps */ -#define WT_STAT_CONN_CURSOR_SWEEP 1227 +#define WT_STAT_CONN_CURSOR_SWEEP 1229 /*! cursor: cursor truncate calls */ -#define WT_STAT_CONN_CURSOR_TRUNCATE 1228 +#define WT_STAT_CONN_CURSOR_TRUNCATE 1230 /*! cursor: cursor update calls */ -#define WT_STAT_CONN_CURSOR_UPDATE 1229 +#define WT_STAT_CONN_CURSOR_UPDATE 1231 /*! cursor: cursor update key and value bytes */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1230 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1232 /*! cursor: cursor update value size change */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1231 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1233 /*! cursor: cursors reused from cache */ -#define WT_STAT_CONN_CURSOR_REOPEN 1232 +#define WT_STAT_CONN_CURSOR_REOPEN 1234 /*! cursor: open cursor count */ -#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1233 +#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1235 /*! data-handle: connection data handle size */ -#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1234 +#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1236 /*! data-handle: connection data handles currently active */ -#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1235 +#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1237 /*! data-handle: connection sweep candidate became referenced */ -#define WT_STAT_CONN_DH_SWEEP_REF 1236 +#define WT_STAT_CONN_DH_SWEEP_REF 1238 /*! data-handle: connection sweep dhandles closed */ -#define WT_STAT_CONN_DH_SWEEP_CLOSE 1237 +#define WT_STAT_CONN_DH_SWEEP_CLOSE 1239 /*! data-handle: connection sweep dhandles removed from hash list */ -#define WT_STAT_CONN_DH_SWEEP_REMOVE 1238 +#define WT_STAT_CONN_DH_SWEEP_REMOVE 1240 /*! data-handle: connection sweep time-of-death sets */ -#define WT_STAT_CONN_DH_SWEEP_TOD 1239 +#define WT_STAT_CONN_DH_SWEEP_TOD 1241 /*! data-handle: connection sweeps */ -#define WT_STAT_CONN_DH_SWEEPS 1240 +#define WT_STAT_CONN_DH_SWEEPS 1242 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1241 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1243 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1242 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1244 /*! lock: checkpoint lock acquisitions */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1243 +#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1245 /*! lock: checkpoint lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1244 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1246 /*! lock: checkpoint lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1245 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1247 /*! lock: dhandle lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1246 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1248 /*! lock: dhandle lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1247 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1249 /*! lock: dhandle read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1248 +#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1250 /*! lock: dhandle write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1249 +#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1251 /*! * lock: durable timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1250 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1252 /*! * lock: durable timestamp queue lock internal thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1251 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1253 /*! lock: durable timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1252 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1254 /*! lock: durable timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1253 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1255 /*! lock: metadata lock acquisitions */ -#define WT_STAT_CONN_LOCK_METADATA_COUNT 1254 +#define WT_STAT_CONN_LOCK_METADATA_COUNT 1256 /*! lock: metadata lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1255 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1257 /*! lock: metadata lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1256 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1258 /*! * lock: read timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1257 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1259 /*! lock: read timestamp queue lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1258 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1260 /*! lock: read timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1259 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1261 /*! lock: read timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1260 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1262 /*! lock: schema lock acquisitions */ -#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1261 +#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1263 /*! lock: schema lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1262 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1264 /*! lock: schema lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1263 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1265 /*! * lock: table lock application thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1264 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1266 /*! * lock: table lock internal thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1265 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1267 /*! lock: table read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1266 +#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1268 /*! lock: table write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1267 +#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1269 /*! lock: txn global lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1268 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1270 /*! lock: txn global lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1269 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1271 /*! lock: txn global read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1270 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1272 /*! lock: txn global write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1271 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1273 /*! log: busy returns attempting to switch slots */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1272 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1274 /*! log: force archive time sleeping (usecs) */ -#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1273 +#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1275 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1274 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1276 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1275 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1277 /*! log: log files manually zero-filled */ -#define WT_STAT_CONN_LOG_ZERO_FILLS 1276 +#define WT_STAT_CONN_LOG_ZERO_FILLS 1278 /*! log: log flush operations */ -#define WT_STAT_CONN_LOG_FLUSH 1277 +#define WT_STAT_CONN_LOG_FLUSH 1279 /*! log: log force write operations */ -#define WT_STAT_CONN_LOG_FORCE_WRITE 1278 +#define WT_STAT_CONN_LOG_FORCE_WRITE 1280 /*! log: log force write operations skipped */ -#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1279 +#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1281 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1280 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1282 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1281 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1283 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1282 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1284 /*! log: log release advances write LSN */ -#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1283 +#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1285 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1284 +#define WT_STAT_CONN_LOG_SCANS 1286 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1285 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1287 /*! log: log server thread advances write LSN */ -#define WT_STAT_CONN_LOG_WRITE_LSN 1286 +#define WT_STAT_CONN_LOG_WRITE_LSN 1288 /*! log: log server thread write LSN walk skipped */ -#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1287 +#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1289 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1288 +#define WT_STAT_CONN_LOG_SYNC 1290 /*! log: log sync time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DURATION 1289 +#define WT_STAT_CONN_LOG_SYNC_DURATION 1291 /*! log: log sync_dir operations */ -#define WT_STAT_CONN_LOG_SYNC_DIR 1290 +#define WT_STAT_CONN_LOG_SYNC_DIR 1292 /*! log: log sync_dir time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1291 +#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1293 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1292 +#define WT_STAT_CONN_LOG_WRITES 1294 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1293 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1295 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1294 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1296 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1295 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1297 /*! log: pre-allocated log files not ready and missed */ -#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1296 +#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1298 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1297 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1299 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1298 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1300 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1299 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1301 /*! log: slot close lost race */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1300 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1302 /*! log: slot close unbuffered waits */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1301 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1303 /*! log: slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1302 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1304 /*! log: slot join atomic update races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1303 +#define WT_STAT_CONN_LOG_SLOT_RACES 1305 /*! log: slot join calls atomic updates raced */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1304 +#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1306 /*! log: slot join calls did not yield */ -#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1305 +#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1307 /*! log: slot join calls found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1306 +#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1308 /*! log: slot join calls slept */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1307 +#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1309 /*! log: slot join calls yielded */ -#define WT_STAT_CONN_LOG_SLOT_YIELD 1308 +#define WT_STAT_CONN_LOG_SLOT_YIELD 1310 /*! log: slot join found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1309 +#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1311 /*! log: slot joins yield time (usecs) */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1310 +#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1312 /*! log: slot transitions unable to find free slot */ -#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1311 +#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1313 /*! log: slot unbuffered writes */ -#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1312 +#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1314 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1313 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1315 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1314 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1316 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1315 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1317 /*! log: written slots coalesced */ -#define WT_STAT_CONN_LOG_SLOT_COALESCED 1316 +#define WT_STAT_CONN_LOG_SLOT_COALESCED 1318 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1317 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1319 /*! perf: file system read latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1318 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1320 /*! perf: file system read latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1319 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1321 /*! perf: file system read latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1320 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1322 /*! perf: file system read latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1321 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1323 /*! perf: file system read latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1322 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1324 /*! perf: file system read latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1323 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1325 /*! perf: file system write latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1324 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1326 /*! perf: file system write latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1325 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1327 /*! perf: file system write latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1326 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1328 /*! perf: file system write latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1327 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1329 /*! perf: file system write latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1328 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1330 /*! perf: file system write latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1329 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1331 /*! perf: operation read latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1330 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1332 /*! perf: operation read latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1331 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1333 /*! perf: operation read latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1332 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1334 /*! perf: operation read latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1333 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1335 /*! perf: operation read latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1334 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1336 /*! perf: operation write latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1335 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1337 /*! perf: operation write latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1336 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1338 /*! perf: operation write latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1337 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1339 /*! perf: operation write latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1338 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1340 /*! perf: operation write latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1339 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1341 /*! reconciliation: approximate byte size of timestamps in pages written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1340 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1342 /*! * reconciliation: approximate byte size of transaction IDs in pages * written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1341 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1343 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1342 +#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1344 /*! reconciliation: maximum seconds spent in a reconciliation call */ -#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1343 +#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1345 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1344 +#define WT_STAT_CONN_REC_PAGES 1346 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1345 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1347 /*! * reconciliation: page reconciliation calls that resulted in values with * prepared transaction metadata */ -#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1346 +#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1348 /*! * reconciliation: page reconciliation calls that resulted in values with * timestamps */ -#define WT_STAT_CONN_REC_PAGES_WITH_TS 1347 +#define WT_STAT_CONN_REC_PAGES_WITH_TS 1349 /*! * reconciliation: page reconciliation calls that resulted in values with * transaction ids */ -#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1348 +#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1350 /*! reconciliation: pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE 1349 +#define WT_STAT_CONN_REC_PAGE_DELETE 1351 /*! * reconciliation: pages written including an aggregated newest start * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1350 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1352 /*! * reconciliation: pages written including an aggregated newest stop * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1351 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1353 /*! * reconciliation: pages written including an aggregated newest stop * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1352 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1354 /*! * reconciliation: pages written including an aggregated newest stop * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1353 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1355 /*! * reconciliation: pages written including an aggregated oldest start * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1354 +#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1356 /*! * reconciliation: pages written including an aggregated oldest start * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TXN 1355 +#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TXN 1357 /*! reconciliation: pages written including an aggregated prepare */ -#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1356 +#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1358 /*! reconciliation: pages written including at least one prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1357 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1359 /*! * reconciliation: pages written including at least one start durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1358 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1360 /*! reconciliation: pages written including at least one start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1359 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1361 /*! * reconciliation: pages written including at least one start transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1360 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1362 /*! * reconciliation: pages written including at least one stop durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1361 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1363 /*! reconciliation: pages written including at least one stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1362 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1364 /*! * reconciliation: pages written including at least one stop transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1363 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1365 /*! reconciliation: records written including a prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1364 +#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1366 /*! reconciliation: records written including a start durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1365 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1367 /*! reconciliation: records written including a start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1366 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1368 /*! reconciliation: records written including a start transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1367 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1369 /*! reconciliation: records written including a stop durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1368 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1370 /*! reconciliation: records written including a stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1369 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1371 /*! reconciliation: records written including a stop transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1370 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1372 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1371 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1373 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1372 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1374 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1373 +#define WT_STAT_CONN_SESSION_OPEN 1375 /*! session: session query timestamp calls */ -#define WT_STAT_CONN_SESSION_QUERY_TS 1374 +#define WT_STAT_CONN_SESSION_QUERY_TS 1376 /*! session: table alter failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1375 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1377 /*! session: table alter successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1376 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1378 /*! session: table alter unchanged and skipped */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1377 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1379 /*! session: table compact failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1378 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1380 /*! session: table compact successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1379 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1381 /*! session: table create failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1380 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1382 /*! session: table create successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1381 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1383 /*! session: table drop failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1382 +#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1384 /*! session: table drop successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1383 +#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1385 /*! session: table import failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1384 +#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1386 /*! session: table import successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1385 +#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1387 /*! session: table rebalance failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1386 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1388 /*! session: table rebalance successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1387 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1389 /*! session: table rename failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1388 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1390 /*! session: table rename successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1389 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1391 /*! session: table salvage failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1390 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1392 /*! session: table salvage successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1391 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1393 /*! session: table truncate failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1392 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1394 /*! session: table truncate successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1393 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1395 /*! session: table verify failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1394 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1396 /*! session: table verify successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1395 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1397 /*! thread-state: active filesystem fsync calls */ -#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1396 +#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1398 /*! thread-state: active filesystem read calls */ -#define WT_STAT_CONN_THREAD_READ_ACTIVE 1397 +#define WT_STAT_CONN_THREAD_READ_ACTIVE 1399 /*! thread-state: active filesystem write calls */ -#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1398 +#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1400 /*! thread-yield: application thread time evicting (usecs) */ -#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1399 +#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1401 /*! thread-yield: application thread time waiting for cache (usecs) */ -#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1400 +#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1402 /*! * thread-yield: connection close blocked waiting for transaction state * stabilization */ -#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1401 +#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1403 /*! thread-yield: connection close yielded for lsm manager shutdown */ -#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1402 +#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1404 /*! thread-yield: data handle lock yielded */ -#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1403 +#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1405 /*! * thread-yield: get reference for page index and slot time sleeping * (usecs) */ -#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1404 +#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1406 /*! thread-yield: log server sync yielded for log write */ -#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1405 +#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1407 /*! thread-yield: page access yielded due to prepare state change */ -#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1406 +#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1408 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1407 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1409 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1408 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1410 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1409 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1411 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1410 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1412 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1411 +#define WT_STAT_CONN_PAGE_SLEEP 1413 /*! * thread-yield: page delete rollback time sleeping for state change * (usecs) */ -#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1412 +#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1414 /*! thread-yield: page reconciliation yielded due to child modification */ -#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1413 +#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1415 /*! transaction: Number of prepared updates */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1414 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1416 /*! transaction: durable timestamp queue entries walked */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1415 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1417 /*! transaction: durable timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1416 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1418 /*! transaction: durable timestamp queue inserts to head */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1417 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1419 /*! transaction: durable timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1418 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1420 /*! transaction: durable timestamp queue length */ -#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1419 +#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1421 /*! transaction: prepared transactions */ -#define WT_STAT_CONN_TXN_PREPARE 1420 +#define WT_STAT_CONN_TXN_PREPARE 1422 /*! transaction: prepared transactions committed */ -#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1421 +#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1423 /*! transaction: prepared transactions currently active */ -#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1422 +#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1424 /*! transaction: prepared transactions rolled back */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1423 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1425 /*! transaction: query timestamp calls */ -#define WT_STAT_CONN_TXN_QUERY_TS 1424 +#define WT_STAT_CONN_TXN_QUERY_TS 1426 /*! transaction: race to read prepared update retry */ -#define WT_STAT_CONN_TXN_READ_RACE_PREPARE_UPDATE 1425 +#define WT_STAT_CONN_TXN_READ_RACE_PREPARE_UPDATE 1427 /*! transaction: read timestamp queue entries walked */ -#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1426 +#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1428 /*! transaction: read timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1427 +#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1429 /*! transaction: read timestamp queue inserts to head */ -#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1428 +#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1430 /*! transaction: read timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1429 +#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1431 /*! transaction: read timestamp queue length */ -#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1430 +#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1432 /*! transaction: rollback to stable calls */ -#define WT_STAT_CONN_TXN_RTS 1431 +#define WT_STAT_CONN_TXN_RTS 1433 /*! * transaction: rollback to stable hs records with stop timestamps older * than newer records */ -#define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1432 +#define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1434 /*! transaction: rollback to stable keys removed */ -#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1433 +#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1435 /*! transaction: rollback to stable keys restored */ -#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1434 +#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1436 /*! transaction: rollback to stable pages visited */ -#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1435 +#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1437 /*! transaction: rollback to stable restored tombstones from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1436 +#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1438 /*! transaction: rollback to stable sweeping history store keys */ -#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1437 +#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1439 /*! transaction: rollback to stable tree walk skipping pages */ -#define WT_STAT_CONN_TXN_RTS_TREE_WALK_SKIP_PAGES 1438 +#define WT_STAT_CONN_TXN_RTS_TREE_WALK_SKIP_PAGES 1440 /*! transaction: rollback to stable updates aborted */ -#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1439 +#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1441 /*! transaction: rollback to stable updates removed from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1440 +#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1442 /*! transaction: set timestamp calls */ -#define WT_STAT_CONN_TXN_SET_TS 1441 +#define WT_STAT_CONN_TXN_SET_TS 1443 /*! transaction: set timestamp durable calls */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1442 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1444 /*! transaction: set timestamp durable updates */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1443 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1445 /*! transaction: set timestamp oldest calls */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1444 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1446 /*! transaction: set timestamp oldest updates */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1445 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1447 /*! transaction: set timestamp stable calls */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE 1446 +#define WT_STAT_CONN_TXN_SET_TS_STABLE 1448 /*! transaction: set timestamp stable updates */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1447 +#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1449 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1448 +#define WT_STAT_CONN_TXN_BEGIN 1450 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1449 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1451 /*! transaction: transaction checkpoint generation */ -#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1450 +#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1452 /*! * transaction: transaction checkpoint history store file duration * (usecs) */ -#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1451 +#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1453 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1452 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1454 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1453 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1455 /*! * transaction: transaction checkpoint most recent duration for gathering * all handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1454 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1456 /*! * transaction: transaction checkpoint most recent duration for gathering * applied handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1455 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1457 /*! * transaction: transaction checkpoint most recent duration for gathering * skipped handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1456 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1458 /*! transaction: transaction checkpoint most recent handles applied */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1457 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1459 /*! transaction: transaction checkpoint most recent handles skipped */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1458 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1460 /*! transaction: transaction checkpoint most recent handles walked */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1459 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1461 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1460 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1462 /*! transaction: transaction checkpoint prepare currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1461 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1463 /*! transaction: transaction checkpoint prepare max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1462 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1464 /*! transaction: transaction checkpoint prepare min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1463 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1465 /*! transaction: transaction checkpoint prepare most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1464 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1466 /*! transaction: transaction checkpoint prepare total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1465 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1467 /*! transaction: transaction checkpoint scrub dirty target */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1466 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1468 /*! transaction: transaction checkpoint scrub time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1467 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1469 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1468 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1470 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1469 +#define WT_STAT_CONN_TXN_CHECKPOINT 1471 /*! * transaction: transaction checkpoints skipped because database was * clean */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1470 +#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1472 /*! transaction: transaction failures due to history store */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1471 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1473 /*! * transaction: transaction fsync calls for checkpoint after allocating * the transaction ID */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1472 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1474 /*! * transaction: transaction fsync duration for checkpoint after * allocating the transaction ID (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1473 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1475 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1474 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1476 /*! transaction: transaction range of IDs currently pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1475 +#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1477 /*! transaction: transaction range of timestamps currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1476 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1478 /*! transaction: transaction range of timestamps pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1477 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1479 /*! * transaction: transaction range of timestamps pinned by the oldest * active read timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1478 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1480 /*! * transaction: transaction range of timestamps pinned by the oldest * timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1479 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1481 /*! transaction: transaction read timestamp of the oldest active reader */ -#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1480 +#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1482 /*! transaction: transaction sync calls */ -#define WT_STAT_CONN_TXN_SYNC 1481 +#define WT_STAT_CONN_TXN_SYNC 1483 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1482 +#define WT_STAT_CONN_TXN_COMMIT 1484 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1483 +#define WT_STAT_CONN_TXN_ROLLBACK 1485 /*! transaction: update conflicts */ -#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1484 +#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1486 /*! * @} diff --git a/src/third_party/wiredtiger/src/reconcile/rec_col.c b/src/third_party/wiredtiger/src/reconcile/rec_col.c index a9eb3443fe0..4663062d222 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_col.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_col.c @@ -138,7 +138,7 @@ __wt_bulk_insert_var(WT_SESSION_IMPL *session, WT_CURSOR_BULK *cbulk, bool delet if (btree->dictionary) WT_RET(__wt_rec_dict_replace(session, r, &tw, cbulk->rle, val)); __wt_rec_image_copy(session, r, val); - WT_TIME_AGGREGATE_UPDATE(&r->cur_ptr->ta, &tw); + WT_TIME_AGGREGATE_UPDATE(session, &r->cur_ptr->ta, &tw); /* Update the starting record number in case we split. */ r->recno += cbulk->rle; @@ -178,7 +178,7 @@ __rec_col_merge(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) /* Copy the value onto the page. */ __wt_rec_image_copy(session, r, val); - WT_TIME_AGGREGATE_MERGE(&r->cur_ptr->ta, &addr->ta); + WT_TIME_AGGREGATE_MERGE(session, &r->cur_ptr->ta, &addr->ta); } return (0); } @@ -293,7 +293,7 @@ __wt_rec_col_int(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_REF *pageref) /* Copy the value onto the page. */ __wt_rec_image_copy(session, r, val); - WT_TIME_AGGREGATE_MERGE(&r->cur_ptr->ta, &ta); + WT_TIME_AGGREGATE_MERGE(session, &r->cur_ptr->ta, &ta); } WT_INTL_FOREACH_END; @@ -547,7 +547,7 @@ __rec_col_var_helper(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_SALVAGE_COOKI if (!deleted && !overflow_type && btree->dictionary) WT_RET(__wt_rec_dict_replace(session, r, tw, rle, val)); __wt_rec_image_copy(session, r, val); - WT_TIME_AGGREGATE_UPDATE(&r->cur_ptr->ta, tw); + WT_TIME_AGGREGATE_UPDATE(session, &r->cur_ptr->ta, tw); /* Update the starting record number in case we split. */ r->recno += rle; @@ -599,7 +599,7 @@ __wt_rec_col_var( /* Set the "last" values to cause failure if they're not set. */ last.value = r->last; - WT_TIME_WINDOW_INIT_MAX(&last.tw); + WT_TIME_WINDOW_INIT(&last.tw); last.deleted = false; /* @@ -607,7 +607,7 @@ __wt_rec_col_var( * [-Werror=maybe-uninitialized] */ /* NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores) */ - WT_TIME_WINDOW_INIT_MAX(&tw); + WT_TIME_WINDOW_INIT(&tw); WT_RET(__wt_rec_split_init(session, r, page, pageref->ref_recno, btree->maxleafpage_precomp)); diff --git a/src/third_party/wiredtiger/src/reconcile/rec_row.c b/src/third_party/wiredtiger/src/reconcile/rec_row.c index 1e185469c99..c658377e51f 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_row.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_row.c @@ -235,7 +235,7 @@ __wt_bulk_insert_row(WT_SESSION_IMPL *session, WT_CURSOR_BULK *cbulk) WT_RET(__wt_rec_dict_replace(session, r, &tw, 0, val)); __wt_rec_image_copy(session, r, val); } - WT_TIME_AGGREGATE_UPDATE(&r->cur_ptr->ta, &tw); + WT_TIME_AGGREGATE_UPDATE(session, &r->cur_ptr->ta, &tw); /* Update compression state. */ __rec_key_state_update(r, ovfl_key); @@ -279,7 +279,7 @@ __rec_row_merge(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) /* Copy the key and value onto the page. */ __wt_rec_image_copy(session, r, key); __wt_rec_image_copy(session, r, val); - WT_TIME_AGGREGATE_MERGE(&r->cur_ptr->ta, &addr->ta); + WT_TIME_AGGREGATE_MERGE(session, &r->cur_ptr->ta, &addr->ta); /* Update compression state. */ __rec_key_state_update(r, ovfl_key); @@ -509,7 +509,7 @@ __wt_rec_row_int(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) /* Copy the key and value onto the page. */ __wt_rec_image_copy(session, r, key); __wt_rec_image_copy(session, r, val); - WT_TIME_AGGREGATE_MERGE(&r->cur_ptr->ta, &ta); + WT_TIME_AGGREGATE_MERGE(session, &r->cur_ptr->ta, &ta); /* Update compression state. */ __rec_key_state_update(r, ovfl_key); @@ -655,7 +655,7 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) WT_RET(__wt_rec_dict_replace(session, r, &tw, 0, val)); __wt_rec_image_copy(session, r, val); } - WT_TIME_AGGREGATE_UPDATE(&r->cur_ptr->ta, &tw); + WT_TIME_AGGREGATE_UPDATE(session, &r->cur_ptr->ta, &tw); /* Update compression state. */ __rec_key_state_update(r, ovfl_key); @@ -1023,7 +1023,7 @@ build: WT_ERR(__wt_rec_dict_replace(session, r, &tw, 0, val)); __wt_rec_image_copy(session, r, val); } - WT_TIME_AGGREGATE_UPDATE(&r->cur_ptr->ta, &tw); + WT_TIME_AGGREGATE_UPDATE(session, &r->cur_ptr->ta, &tw); /* Update compression state. */ __rec_key_state_update(r, ovfl_key); diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c index 929728740dc..5121aa7e228 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_write.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c @@ -1307,7 +1307,7 @@ __rec_split_finish_process_prev(WT_SESSION_IMPL *session, WT_RECONCILE *r) * boundaries and create a single chunk. */ prev_ptr->entries += cur_ptr->entries; - WT_TIME_AGGREGATE_MERGE(&prev_ptr->ta, &cur_ptr->ta); + WT_TIME_AGGREGATE_MERGE(session, &prev_ptr->ta, &cur_ptr->ta); dsk = r->cur_ptr->image.mem; memcpy((uint8_t *)r->prev_ptr->image.mem + prev_ptr->image.size, WT_PAGE_HEADER_BYTE(btree, dsk), cur_ptr->image.size - WT_PAGE_HEADER_BYTE_SIZE(btree)); @@ -1350,7 +1350,7 @@ __rec_split_finish_process_prev(WT_SESSION_IMPL *session, WT_RECONCILE *r) cur_ptr->recno = prev_ptr->min_recno; WT_RET( __wt_buf_set(session, &cur_ptr->key, prev_ptr->min_key.data, prev_ptr->min_key.size)); - WT_TIME_AGGREGATE_MERGE(&cur_ptr->ta, &prev_ptr->ta); + WT_TIME_AGGREGATE_MERGE(session, &cur_ptr->ta, &prev_ptr->ta); cur_ptr->image.size += len_to_move; prev_ptr->entries = prev_ptr->min_entries; diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index a893ccc3865..2520fdfc4ef 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -1051,6 +1051,9 @@ static const char *const __stats_connection_desc[] = { "cursor: cursor modify key and value bytes affected", "cursor: cursor modify value bytes modified", "cursor: cursor next calls", + "cursor: cursor next calls that skip due to a globally visible history store tombstone", + "cursor: cursor next calls that skip due to a globally visible history store tombstone in " + "rollback to stable", "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", @@ -1579,6 +1582,8 @@ __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_hs_tombstone = 0; + stats->cursor_next_hs_tombstone_rts = 0; stats->cursor_next_skip_ge_100 = 0; stats->cursor_next_skip_lt_100 = 0; stats->cursor_restart = 0; @@ -2101,6 +2106,8 @@ __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_hs_tombstone += WT_STAT_READ(from, cursor_next_hs_tombstone); + to->cursor_next_hs_tombstone_rts += WT_STAT_READ(from, cursor_next_hs_tombstone_rts); 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); diff --git a/src/third_party/wiredtiger/src/support/timestamp.c b/src/third_party/wiredtiger/src/support/timestamp.c index b3785a855f1..0bfc405395c 100644 --- a/src/third_party/wiredtiger/src/support/timestamp.c +++ b/src/third_party/wiredtiger/src/support/timestamp.c @@ -127,63 +127,62 @@ __wt_verbose_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t ts, const char * } while (0) /* - * __wt_time_aggregate_validate -- - * Do a aggregated time window validation. + * __time_stable -- + * Return the stable timestamp for the system. */ -int -__wt_time_aggregate_validate( - WT_SESSION_IMPL *session, WT_TIME_AGGREGATE *ta, WT_TIME_AGGREGATE *parent, bool silent) +static wt_timestamp_t +__time_stable(WT_SESSION_IMPL *session) { - char time_string[2][WT_TIME_STRING_SIZE]; + WT_TXN_GLOBAL *txn_global; - if (ta->oldest_start_ts > ta->newest_stop_ts) - WT_TIME_VALIDATE_RET(session, - "aggregate time window has an oldest start time after its newest stop time; time " - "aggregate %s", - __wt_time_aggregate_to_string(ta, time_string[0])); + txn_global = &S2C(session)->txn_global; - if (ta->oldest_start_txn > ta->newest_stop_txn) - WT_TIME_VALIDATE_RET(session, - "aggregate time window has an oldest start transaction after its newest stop " - "transaction; time aggregate %s", - __wt_time_aggregate_to_string(ta, time_string[0])); + return (txn_global->has_stable_timestamp ? txn_global->stable_timestamp : + txn_global->recovery_timestamp); +} - if (ta->oldest_start_ts > ta->newest_start_durable_ts) - WT_TIME_VALIDATE_RET(session, - "aggregate time window has an oldest start time after its newest start durable time; " - "time aggregate %s", - __wt_time_aggregate_to_string(ta, time_string[0])); +#undef WT_TIME_ERROR +#define WT_TIME_ERROR(tag) \ + WT_TIME_VALIDATE_RET(session, \ + "aggregate time window has " tag \ + " the stable point with an empty parent aggregate time window; " \ + "stable time %s, time window %s", \ + __wt_timestamp_to_string(stable, ts_string), __wt_time_aggregate_to_string(ta, time_string)) - if (ta->newest_stop_ts != WT_TS_MAX && ta->newest_stop_ts > ta->newest_stop_durable_ts) - WT_TIME_VALIDATE_RET(session, - "aggregate time window has a newest stop time after its newest stop durable time; time " - "aggregate %s", - __wt_time_aggregate_to_string(ta, time_string[0])); +/* + * __time_aggregate_validate_parent_stable -- + * Aggregated time window validation against a stable point. + */ +static int +__time_aggregate_validate_parent_stable( + WT_SESSION_IMPL *session, WT_TIME_AGGREGATE *ta, bool silent) +{ + wt_timestamp_t stable; + char time_string[WT_TIME_STRING_SIZE], ts_string[WT_TS_INT_STRING_SIZE]; - /* - * In the case of out of order timestamps, we assign the start point to the stop point and - * newest start durable timestamp may be larger than newest stop timestamp. Check whether start - * and stop are equal first. - */ - if (ta->newest_start_durable_ts != ta->newest_stop_durable_ts && - ta->newest_start_durable_ts > ta->newest_stop_ts) - WT_TIME_VALIDATE_RET(session, - "aggregate time window has a newest stop durable time after its newest stop time; time " - "aggregate %s", - __wt_time_aggregate_to_string(ta, time_string[0])); + stable = __time_stable(session); - if (ta->newest_stop_durable_ts != WT_TS_NONE && - ta->newest_stop_durable_ts < ta->oldest_start_ts) - WT_TIME_VALIDATE_RET(session, - "aggregate time window has a newest stop durable time before its oldest start time; time " - "aggregate %s", - __wt_time_aggregate_to_string(ta, time_string[0])); + if (ta->newest_start_durable_ts > stable) + WT_TIME_ERROR("a newest start durable time after"); + if (ta->newest_stop_durable_ts > stable) + WT_TIME_ERROR("a newest stop durable time after"); + if (ta->oldest_start_ts > stable) + WT_TIME_ERROR("an oldest start time after"); + if (ta->newest_stop_ts != WT_TS_MAX && ta->newest_stop_ts > stable) + WT_TIME_ERROR("a newest stop time after"); - /* - * Optionally validate the time window against a parent's time window. - */ - if (parent == NULL) - return (0); + return (0); +} + +/* + * __time_aggregate_validate_parent -- + * Aggregated time window validation against a parent. + */ +static int +__time_aggregate_validate_parent( + WT_SESSION_IMPL *session, WT_TIME_AGGREGATE *ta, WT_TIME_AGGREGATE *parent, bool silent) +{ + char time_string[2][WT_TIME_STRING_SIZE]; if (ta->newest_start_durable_ts > parent->newest_start_durable_ts) WT_TIME_VALIDATE_RET(session, @@ -237,55 +236,114 @@ __wt_time_aggregate_validate( } /* - * __wt_time_value_validate -- - * Do a value time window validation. + * __wt_time_aggregate_validate -- + * Aggregated time window validation. */ int -__wt_time_value_validate( - WT_SESSION_IMPL *session, WT_TIME_WINDOW *tw, WT_TIME_AGGREGATE *parent, bool silent) +__wt_time_aggregate_validate( + WT_SESSION_IMPL *session, WT_TIME_AGGREGATE *ta, WT_TIME_AGGREGATE *parent, bool silent) { char time_string[2][WT_TIME_STRING_SIZE]; - if (tw->start_ts > tw->stop_ts) + if (ta->oldest_start_ts > ta->newest_stop_ts) WT_TIME_VALIDATE_RET(session, - "value time window has a start time after its stop time; time window %s", - __wt_time_window_to_string(tw, time_string[0])); + "aggregate time window has an oldest start time after its newest stop time; time " + "aggregate %s", + __wt_time_aggregate_to_string(ta, time_string[0])); - if (tw->start_txn > tw->stop_txn) + if (ta->oldest_start_txn > ta->newest_stop_txn) WT_TIME_VALIDATE_RET(session, - "value time window has a start transaction after its stop transaction; time window %s", - __wt_time_window_to_string(tw, time_string[0])); + "aggregate time window has an oldest start transaction after its newest stop " + "transaction; time aggregate %s", + __wt_time_aggregate_to_string(ta, time_string[0])); - if (tw->start_ts > tw->durable_start_ts) + if (ta->oldest_start_ts > ta->newest_start_durable_ts) WT_TIME_VALIDATE_RET(session, - "value time window has a start time after its durable start time; time window %s", - __wt_time_window_to_string(tw, time_string[0])); + "aggregate time window has an oldest start time after its newest start durable time; " + "time aggregate %s", + __wt_time_aggregate_to_string(ta, time_string[0])); - if (tw->stop_ts != WT_TS_MAX && tw->stop_ts > tw->durable_stop_ts) + if (ta->newest_stop_ts != WT_TS_MAX && ta->newest_stop_ts > ta->newest_stop_durable_ts) WT_TIME_VALIDATE_RET(session, - "value time window has a stop time after its durable stop time; time window %s", - __wt_time_window_to_string(tw, time_string[0])); + "aggregate time window has a newest stop time after its newest stop durable time; time " + "aggregate %s", + __wt_time_aggregate_to_string(ta, time_string[0])); /* - * In the case of out of order timestamps, we assign start time point to the stop point and - * durable start timestamp may be larger than stop timestamp. Check whether start and stop are - * equal first. + * In the case of out of order timestamps, we assign the start point to the stop point and + * newest start durable timestamp may be larger than newest stop timestamp. Check whether start + * and stop are equal first. */ - if (tw->durable_start_ts != tw->durable_stop_ts && tw->durable_start_ts > tw->stop_ts) + if (ta->newest_start_durable_ts != ta->newest_stop_durable_ts && + ta->newest_start_durable_ts > ta->newest_stop_ts) WT_TIME_VALIDATE_RET(session, - "value time window has a durable start time after its stop time; time window %s", - __wt_time_window_to_string(tw, time_string[0])); + "aggregate time window has a newest stop durable time after its newest stop time; time " + "aggregate %s", + __wt_time_aggregate_to_string(ta, time_string[0])); - if (tw->durable_stop_ts != WT_TS_NONE && tw->durable_start_ts > tw->durable_stop_ts) + if (ta->newest_stop_durable_ts != WT_TS_NONE && + ta->newest_stop_durable_ts < ta->oldest_start_ts) WT_TIME_VALIDATE_RET(session, - "value time window has a durable start time after its durable stop time; time window %s", - __wt_time_window_to_string(tw, time_string[0])); + "aggregate time window has a newest stop durable time before its oldest start time; time " + "aggregate %s", + __wt_time_aggregate_to_string(ta, time_string[0])); /* * Optionally validate the time window against a parent's time window. + * + * If no aggregated time window is set, it can be for one of two reasons: there really isn't any + * time window information, or there was a downgrade/upgrade to a previous release which doesn't + * write time window information. We can't tell the difference, but in either case, everything + * should be stable. */ - if (parent == NULL) + if (parent == NULL || WT_IS_METADATA(session->dhandle)) return (0); + return (WT_TIME_AGGREGATE_IS_EMPTY(parent) ? + __time_aggregate_validate_parent_stable(session, ta, silent) : + __time_aggregate_validate_parent(session, ta, parent, silent)); +} + +#undef WT_TIME_ERROR +#define WT_TIME_ERROR(tag) \ + WT_TIME_VALIDATE_RET(session, \ + "time window has " tag \ + " the stable point with an empty parent aggregate time window; " \ + "stable time %s, time window %s", \ + __wt_timestamp_to_string(stable, ts_string), __wt_time_window_to_string(tw, time_string)) + +/* + * __time_value_validate_parent_stable -- + * Value time window validation against a stable point. + */ +static int +__time_value_validate_parent_stable(WT_SESSION_IMPL *session, WT_TIME_WINDOW *tw, bool silent) +{ + wt_timestamp_t stable; + char time_string[WT_TIME_STRING_SIZE], ts_string[WT_TS_INT_STRING_SIZE]; + + stable = __time_stable(session); + + if (tw->durable_start_ts > stable) + WT_TIME_ERROR("a durable start time after"); + if (tw->start_ts > stable) + WT_TIME_ERROR("a start time after"); + if (tw->durable_stop_ts > stable) + WT_TIME_ERROR("a durable stop time after"); + if (tw->stop_ts != WT_TS_MAX && tw->stop_ts > stable) + WT_TIME_ERROR("a stop time after"); + + return (0); +} + +/* + * __time_value_validate_parent -- + * Value time window validation against a parent. + */ +static int +__time_value_validate_parent( + WT_SESSION_IMPL *session, WT_TIME_WINDOW *tw, WT_TIME_AGGREGATE *parent, bool silent) +{ + char time_string[2][WT_TIME_STRING_SIZE]; if (parent->newest_start_durable_ts != WT_TS_NONE && tw->durable_start_ts > parent->newest_start_durable_ts) @@ -339,3 +397,63 @@ __wt_time_value_validate( return (0); } + +/* + * __wt_time_value_validate -- + * Value time window validation. + */ +int +__wt_time_value_validate( + WT_SESSION_IMPL *session, WT_TIME_WINDOW *tw, WT_TIME_AGGREGATE *parent, bool silent) +{ + char time_string[2][WT_TIME_STRING_SIZE]; + + if (tw->start_ts > tw->stop_ts) + WT_TIME_VALIDATE_RET(session, + "value time window has a start time after its stop time; time window %s", + __wt_time_window_to_string(tw, time_string[0])); + + if (tw->start_txn > tw->stop_txn) + WT_TIME_VALIDATE_RET(session, + "value time window has a start transaction after its stop transaction; time window %s", + __wt_time_window_to_string(tw, time_string[0])); + + if (tw->start_ts > tw->durable_start_ts) + WT_TIME_VALIDATE_RET(session, + "value time window has a start time after its durable start time; time window %s", + __wt_time_window_to_string(tw, time_string[0])); + + if (tw->stop_ts != WT_TS_MAX && tw->stop_ts > tw->durable_stop_ts) + WT_TIME_VALIDATE_RET(session, + "value time window has a stop time after its durable stop time; time window %s", + __wt_time_window_to_string(tw, time_string[0])); + + /* + * In the case of out of order timestamps, we assign start time point to the stop point and + * durable start timestamp may be larger than stop timestamp. Check whether start and stop are + * equal first. + */ + if (tw->durable_start_ts != tw->durable_stop_ts && tw->durable_start_ts > tw->stop_ts) + WT_TIME_VALIDATE_RET(session, + "value time window has a durable start time after its stop time; time window %s", + __wt_time_window_to_string(tw, time_string[0])); + + if (tw->durable_stop_ts != WT_TS_NONE && tw->durable_start_ts > tw->durable_stop_ts) + WT_TIME_VALIDATE_RET(session, + "value time window has a durable start time after its durable stop time; time window %s", + __wt_time_window_to_string(tw, time_string[0])); + + /* + * Optionally validate the time window against a parent's time window. + * + * If no aggregated time window is set, it can be for one of two reasons: there really isn't any + * time window information, or there was a downgrade/upgrade to a previous release which doesn't + * write time window information. We can't tell the difference, but in either case, everything + * should be stable. + */ + if (parent == NULL || WT_IS_METADATA(session->dhandle)) + return (0); + return (WT_TIME_AGGREGATE_IS_EMPTY(parent) ? + __time_value_validate_parent_stable(session, tw, silent) : + __time_value_validate_parent(session, tw, parent, silent)); +} diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c index 553ba394660..8d8d3431219 100644 --- a/src/third_party/wiredtiger/src/txn/txn.c +++ b/src/third_party/wiredtiger/src/txn/txn.c @@ -136,8 +136,6 @@ __wt_txn_release_snapshot(WT_SESSION_IMPL *session) txn_global->checkpoint_txn_shared.pinned_id = WT_TXN_NONE; txn_global->checkpoint_timestamp = WT_TS_NONE; } - - __wt_txn_clear_read_timestamp(session); } /* @@ -638,6 +636,8 @@ __wt_txn_release(WT_SESSION_IMPL *session) * Reset the transaction state to not running and release the snapshot. */ __wt_txn_release_snapshot(session); + /* Clear the read timestamp. */ + __wt_txn_clear_read_timestamp(session); txn->isolation = session->isolation; txn->rollback_reason = NULL; diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c index 987c50430be..54a13cedff0 100644 --- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c +++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c @@ -911,9 +911,8 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) */ session->dhandle = NULL; /* We have to set the system information before we release the snapshot. */ - if (full) { + if (full) WT_ERR(__wt_meta_sysinfo_set(session)); - } /* Release the snapshot so we aren't pinning updates in cache. */ __wt_txn_release_snapshot(session); 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 65ae870b8fe..479bedc84d2 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 @@ -1049,7 +1049,7 @@ __rollback_to_stable_btree_hs_truncate(WT_SESSION_IMPL *session, uint32_t btree_ * we can skip it. */ if (__wt_txn_tw_stop_visible_all(session, &cbt->upd_value->tw)) { - WT_STAT_CONN_INCR(session, cursor_prev_hs_tombstone_rts); + WT_STAT_CONN_INCR(session, cursor_next_hs_tombstone_rts); continue; } diff --git a/src/third_party/wiredtiger/test/format/bulk.c b/src/third_party/wiredtiger/test/format/bulk.c index bfbddaffaa5..aae3042c6f4 100644 --- a/src/third_party/wiredtiger/test/format/bulk.c +++ b/src/third_party/wiredtiger/test/format/bulk.c @@ -59,7 +59,7 @@ bulk_commit_transaction(WT_SESSION *session) testutil_check(session->commit_transaction(session, buf)); /* Update the oldest timestamp, otherwise updates are pinned in memory. */ - timestamp_once(session, false); + timestamp_once(false, false); } /* diff --git a/src/third_party/wiredtiger/test/format/config.c b/src/third_party/wiredtiger/test/format/config.c index a6eb4c5f898..d19f5cd447d 100644 --- a/src/third_party/wiredtiger/test/format/config.c +++ b/src/third_party/wiredtiger/test/format/config.c @@ -926,12 +926,20 @@ config_transaction(void) if (g.c_txn_freq != 100 && config_is_perm("transaction.frequency")) testutil_die(EINVAL, "timestamps require transaction frequency set to 100"); } + /* FIXME-WT-6410: temporarily disable rebalance with timestamps. */ if (g.c_txn_timestamps && g.c_rebalance) { if (config_is_perm("ops.rebalance")) testutil_die(EINVAL, "rebalance cannot run with timestamps"); config_single("ops.rebalance=off", false); } + /* FIXME-WT-6431: temporarily disable salvage with timestamps. */ + if (g.c_txn_timestamps && g.c_salvage) { + if (config_is_perm("ops.salvage")) + testutil_die(EINVAL, "salvage cannot run with timestamps"); + config_single("ops.salvage=off", false); + } + if (g.c_isolation_flag == ISOLATION_SNAPSHOT && config_is_perm("transaction.isolation")) { if (!g.c_txn_timestamps && config_is_perm("transaction.timestamps")) testutil_die(EINVAL, "snapshot isolation requires timestamps"); diff --git a/src/third_party/wiredtiger/test/format/format.h b/src/third_party/wiredtiger/test/format/format.h index 442af25f133..c6045c291b3 100644 --- a/src/third_party/wiredtiger/test/format/format.h +++ b/src/third_party/wiredtiger/test/format/format.h @@ -276,6 +276,8 @@ typedef struct { #define ISOLATION_SNAPSHOT 4 u_int c_isolation_flag; /* Isolation flag value */ +/* The page must be a multiple of the allocation size, and 512 always works. */ +#define BLOCK_ALLOCATION_SIZE 512 uint32_t intl_page_max; /* Maximum page sizes */ uint32_t leaf_page_max; @@ -414,7 +416,9 @@ void snap_repeat_single(WT_CURSOR *, TINFO *); int snap_repeat_txn(WT_CURSOR *, TINFO *); void snap_repeat_update(TINFO *, bool); void snap_track(TINFO *, thread_op); -void timestamp_once(WT_SESSION *, bool); +void timestamp_init(void); +void timestamp_once(bool, bool); +void timestamp_teardown(void); int trace_config(const char *); void trace_init(void); void trace_ops_init(TINFO *); @@ -437,4 +441,8 @@ void wts_salvage(void); void wts_stats(void); void wts_verify(WT_CONNECTION *, const char *); +#if !defined(CUR2S) +#define CUR2S(c) ((WT_SESSION_IMPL *)((WT_CURSOR *)c)->session) +#endif + #include "format.i" diff --git a/src/third_party/wiredtiger/test/format/hs.c b/src/third_party/wiredtiger/test/format/hs.c index 0cb0cf352aa..4bb29325faa 100644 --- a/src/third_party/wiredtiger/test/format/hs.c +++ b/src/third_party/wiredtiger/test/format/hs.c @@ -35,6 +35,9 @@ WT_THREAD_RET hs_cursor(void *arg) { +#if WIREDTIGER_VERSION_MAJOR < 10 + WT_UNUSED(arg); +#else WT_CONNECTION *conn; WT_CURSOR *cursor; WT_DECL_RET; @@ -129,6 +132,7 @@ hs_cursor(void *arg) __wt_buf_free(CUR2S(cursor), &key); testutil_check(session->close(session, NULL)); +#endif 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 38c9a5b5690..7a91de6d10d 100644 --- a/src/third_party/wiredtiger/test/format/ops.c +++ b/src/third_party/wiredtiger/test/format/ops.c @@ -400,10 +400,12 @@ operations(u_int ops_seconds, bool lastrun) if (g.c_txn_rollback_to_stable) tinfo_rollback_to_stable_and_check(session); - testutil_check(session->close(session, NULL)); - - if (lastrun) + if (lastrun) { tinfo_teardown(); + timestamp_teardown(); + } + + testutil_check(session->close(session, NULL)); } /* diff --git a/src/third_party/wiredtiger/test/format/t.c b/src/third_party/wiredtiger/test/format/t.c index fadbb1c79c9..8a447b806c3 100644 --- a/src/third_party/wiredtiger/test/format/t.c +++ b/src/third_party/wiredtiger/test/format/t.c @@ -269,17 +269,20 @@ main(int argc, char *argv[]) if (g.reopen) { config_final(); wts_open(g.home, &g.wts_conn, &g.wts_session, true); + timestamp_init(); set_oldest_timestamp(); } else { wts_create(g.home); config_final(); wts_open(g.home, &g.wts_conn, &g.wts_session, true); + timestamp_init(); + trace_init(); TIMED_MAJOR_OP(wts_load()); /* Load and verify initial records */ - TIMED_MAJOR_OP(wts_verify(g.wts_conn, "post-bulk verify")); } + TIMED_MAJOR_OP(wts_verify(g.wts_conn, "verify")); TIMED_MAJOR_OP(wts_read_scan()); wts_checkpoints(); diff --git a/src/third_party/wiredtiger/test/format/util.c b/src/third_party/wiredtiger/test/format/util.c index cc10d93c159..c0a31f45ee3 100644 --- a/src/third_party/wiredtiger/test/format/util.c +++ b/src/third_party/wiredtiger/test/format/util.c @@ -101,20 +101,13 @@ track(const char *tag, uint64_t cnt, TINFO *tinfo) last_cur = cur_ts; } - if (g.c_txn_rollback_to_stable) - testutil_check(__wt_snprintf(ts_msg, sizeof(ts_msg), - " old%s" - "stb%s%s" - "ts%s%s", - track_ts_dots(old_dot_cnt), track_ts_diff(old_ts, stable_ts), - track_ts_dots(stable_dot_cnt), track_ts_diff(stable_ts, cur_ts), - track_ts_dots(cur_dot_cnt))); - else - testutil_check(__wt_snprintf(ts_msg, sizeof(ts_msg), - " old%s" - "ts%s%s", - track_ts_dots(old_dot_cnt), track_ts_diff(old_ts, cur_ts), - track_ts_dots(cur_dot_cnt))); + testutil_check(__wt_snprintf(ts_msg, sizeof(ts_msg), + " old%s" + "stb%s%s" + "ts%s%s", + track_ts_dots(old_dot_cnt), track_ts_diff(old_ts, stable_ts), + track_ts_dots(stable_dot_cnt), track_ts_diff(stable_ts, cur_ts), + track_ts_dots(cur_dot_cnt))); } testutil_check( __wt_snprintf_len_set(msg, sizeof(msg), &len, @@ -232,67 +225,78 @@ fclose_and_clear(FILE **fpp) } /* + * timestamp_parse -- + * Parse a timestamp to an integral value. + */ +static void +timestamp_parse(const char *p, uint64_t *tsp) +{ + char *endptr; + + errno = 0; + *tsp = __wt_strtouq(p, &endptr, 16); + testutil_assert(errno == 0 && endptr[0] == '\0'); +} + +/* + * timestamp_stable -- + * Set the stable timestamp on open. + */ +void +timestamp_init(void) +{ + WT_CONNECTION *conn; + char timestamp_buf[2 * sizeof(uint64_t) + 1]; + + conn = g.wts_conn; + + testutil_check(conn->query_timestamp(conn, timestamp_buf, "get=recovery")); + timestamp_parse(timestamp_buf, &g.timestamp); +} + +/* * timestamp_once -- * Update the timestamp once. */ void -timestamp_once(WT_SESSION *session, bool allow_lag) +timestamp_once(bool allow_lag, bool final) { static const char *oldest_timestamp_str = "oldest_timestamp="; static const char *stable_timestamp_str = "stable_timestamp="; WT_CONNECTION *conn; WT_DECL_RET; - size_t len; - uint64_t all_durable, stable; - char buf[WT_TS_HEX_STRING_SIZE * 2 + 64], tsbuf[WT_TS_HEX_STRING_SIZE]; + uint64_t all_durable; + char buf[WT_TS_HEX_STRING_SIZE * 2 + 64]; conn = g.wts_conn; - stable = 0ULL; - - /* - * Lock out transaction timestamp operations. The lock acts as a barrier ensuring we've checked - * if the workers have finished, we don't want that line reordered. We can also be called from - * places, such as bulk load, where we are single-threaded and the locks haven't been - * initialized. - */ - if (LOCK_INITIALIZED(&g.ts_lock)) - lock_writelock(session, &g.ts_lock); - if ((ret = conn->query_timestamp(conn, tsbuf, "get=all_durable")) == 0) { - testutil_timestamp_parse(tsbuf, &all_durable); + if (final) + g.oldest_timestamp = g.stable_timestamp = ++g.timestamp; + else { + if ((ret = conn->query_timestamp(conn, buf, "get=all_durable")) == 0) + testutil_timestamp_parse(buf, &all_durable); + else { + testutil_assert(ret == WT_NOTFOUND); + return; + } /* * If a lag is permitted, move the oldest timestamp half the way to the current - * "all_durable" timestamp. + * "all_durable" timestamp. Move the stable timestamp to "all_durable". */ if (allow_lag) g.oldest_timestamp = (all_durable + g.oldest_timestamp) / 2; else g.oldest_timestamp = all_durable; - testutil_check( - __wt_snprintf(buf, sizeof(buf), "%s%" PRIx64, oldest_timestamp_str, g.oldest_timestamp)); - - /* - * When we're doing rollback to stable operations, we'll advance the stable timestamp to the - * current timestamp value. - */ - if (g.c_txn_rollback_to_stable) { - stable = g.timestamp; - len = strlen(buf); - WT_ASSERT((WT_SESSION_IMPL *)session, len < sizeof(buf)); - testutil_check(__wt_snprintf( - buf + len, sizeof(buf) - len, ",%s%" PRIx64, stable_timestamp_str, stable)); - } - testutil_check(conn->set_timestamp(conn, buf)); - trace_msg("%-10s oldest=%" PRIu64 ", stable=%" PRIu64, "setts", g.oldest_timestamp, stable); - if (g.c_txn_rollback_to_stable) - g.stable_timestamp = stable; + g.stable_timestamp = all_durable; + } - } else - testutil_assert(ret == WT_NOTFOUND); + testutil_check(__wt_snprintf(buf, sizeof(buf), "%s%" PRIx64 ",%s%" PRIx64, oldest_timestamp_str, + g.oldest_timestamp, stable_timestamp_str, g.stable_timestamp)); - if (LOCK_INITIALIZED(&g.ts_lock)) - lock_writeunlock(session, &g.ts_lock); + testutil_check(conn->set_timestamp(conn, buf)); + trace_msg( + "%-10s oldest=%" PRIu64 ", stable=%" PRIu64, "setts", g.oldest_timestamp, g.stable_timestamp); } /* @@ -304,7 +308,6 @@ timestamp(void *arg) { WT_CONNECTION *conn; WT_SESSION *session; - bool done; (void)(arg); conn = g.wts_conn; @@ -312,39 +315,34 @@ timestamp(void *arg) /* Locks need session */ testutil_check(conn->open_session(conn, NULL, NULL, &session)); - /* Update the oldest timestamp at least once every 15 seconds. */ - done = false; - do { + /* Update the oldest and stable timestamps at least once every 15 seconds. */ + while (!g.workers_finished) { random_sleep(&g.rnd, 15); - /* - * If running without rollback_to_stable, do a final bump of the oldest timestamp as part of - * shutting down the worker threads, otherwise recent operations can prevent verify from - * running. - * - * With rollback_to_stable configured, don't do a bump at the end of the run. We need the - * worker threads to have time to see any changes in the stable timestamp, so they can stash - * their stable state - if we bump they will have no time to do that. And when we rollback, - * we'd like to see a reasonable amount of data changed. So we don't bump the stable - * timestamp, and we can't bump the oldest timestamp as well, as it would get ahead of the - * stable timestamp, which is not allowed. - */ - if (g.workers_finished) - done = true; - - if (!done || !g.c_txn_rollback_to_stable) { - timestamp_once(session, true); - if (done) - timestamp_once(session, true); - } - - } while (!done); + lock_writelock(session, &g.ts_lock); /* Lock out transaction timestamp operations. */ + timestamp_once(true, false); + lock_writeunlock(session, &g.ts_lock); + } testutil_check(session->close(session, NULL)); return (WT_THREAD_RET_VALUE); } /* + * timestamp_teardown -- + * Wrap up timestamp operations. + */ +void +timestamp_teardown(void) +{ + /* + * Do a final bump of the oldest and stable timestamps, otherwise recent operations can prevent + * verify from running. + */ + timestamp_once(false, true); +} + +/* * set_oldest_timestamp -- * Query the oldest timestamp from wiredtiger and set it as our global oldest timestamp. This * should only be called on runs for pre existing databases. diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c index 3d605d45617..c55721afc25 100644 --- a/src/third_party/wiredtiger/test/format/wts.c +++ b/src/third_party/wiredtiger/test/format/wts.c @@ -292,10 +292,11 @@ create_object(WT_CONNECTION *conn) max = sizeof(config); CONFIG_APPEND(p, - "key_format=%s,allocation_size=512,%s,internal_page_max=%" PRIu32 ",leaf_page_max=%" PRIu32 + "key_format=%s,allocation_size=%d,%s,internal_page_max=%" PRIu32 ",leaf_page_max=%" PRIu32 ",memory_page_max=%" PRIu32, - (g.type == ROW) ? "u" : "r", g.c_firstfit ? "block_allocation=first" : "", g.intl_page_max, - g.leaf_page_max, MEGABYTE(g.c_memory_page_max)); + (g.type == ROW) ? "u" : "r", BLOCK_ALLOCATION_SIZE, + g.c_firstfit ? "block_allocation=first" : "", g.intl_page_max, g.leaf_page_max, + MEGABYTE(g.c_memory_page_max)); /* * Configure the maximum key/value sizes, but leave it as the default if we come up with diff --git a/src/third_party/wiredtiger/test/suite/test_txn23.py b/src/third_party/wiredtiger/test/suite/test_txn23.py new file mode 100644 index 00000000000..fdca3d2d0c6 --- /dev/null +++ b/src/third_party/wiredtiger/test/suite/test_txn23.py @@ -0,0 +1,104 @@ +#!/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_txn23.py +# Transactions: ensure read timestamp is not cleared under cache pressure +# + +import wiredtiger, wttest +from wtdataset import SimpleDataSet + +def timestamp_str(t): + return '%x' % t + +class test_txn23(wttest.WiredTigerTestCase): + session_config = 'isolation=snapshot' + conn_config = 'cache_size=5MB' + + def large_updates(self, uri, value, ds, nrows, commit_ts): + # Update a large number of records. + cursor = self.session.open_cursor(uri) + for i in range(0, nrows): + self.session.begin_transaction() + cursor[ds.key(i)] = value + self.session.commit_transaction('commit_timestamp=' + timestamp_str(commit_ts)) + cursor.close() + + def check(self, check_value, uri, ds, nrows, read_ts): + for i in range(0, nrows): + self.session.begin_transaction('read_timestamp=' + timestamp_str(read_ts)) + cursor = self.session.open_cursor(uri) + self.assertEqual(cursor[ds.key(i)], check_value) + cursor.close() + self.session.commit_transaction() + + def test_txn(self): + nrows = 2000 + + # Create a table. + uri_1 = "table:txn23_1" + ds_1 = SimpleDataSet( + self, uri_1, 0, key_format="i", value_format="S") + ds_1.populate() + + # Create another table. + uri_2 = "table:txn23_2" + ds_2 = SimpleDataSet( + self, uri_2, 0, key_format="i", value_format="S") + ds_2.populate() + + # Pin oldest and stable to timestamp 10. + self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(10) + + ',stable_timestamp=' + timestamp_str(10)) + + value_a = "aaaaa" * 100 + value_b = "bbbbb" * 100 + value_c = "ccccc" * 100 + value_d = "ddddd" * 100 + + # Perform several updates. + self.large_updates(uri_1, value_d, ds_1, nrows, 20) + self.large_updates(uri_1, value_c, ds_1, nrows, 30) + self.large_updates(uri_1, value_b, ds_1, nrows, 40) + self.large_updates(uri_1, value_a, ds_1, nrows, 50) + + self.large_updates(uri_2, value_d, ds_2, nrows, 20) + self.large_updates(uri_2, value_c, ds_2, nrows, 30) + self.large_updates(uri_2, value_b, ds_2, nrows, 40) + self.large_updates(uri_2, value_a, ds_2, nrows, 50) + + # Verify data is visible and correct. + self.check(value_d, uri_1, ds_1, nrows, 20) + self.check(value_c, uri_1, ds_1, nrows, 30) + self.check(value_b, uri_1, ds_1, nrows, 40) + self.check(value_a, uri_1, ds_1, nrows, 50) + + self.check(value_d, uri_2, ds_2, nrows, 20) + self.check(value_c, uri_2, ds_2, nrows, 30) + self.check(value_b, uri_2, ds_2, nrows, 40) + self.check(value_a, uri_2, ds_2, nrows, 50) |