summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-06-19 17:39:55 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-19 08:07:24 +0000
commitc940cf76a67b4fa511515e97ebc3a7588be08b4f (patch)
treec197775901871607672476671d749c59e1523a23
parenta10fe7ccfd6f11a90df725c60ceea6bcb4762a59 (diff)
downloadmongo-c940cf76a67b4fa511515e97ebc3a7588be08b4f.tar.gz
Import wiredtiger: 3b4a927265fc81dc4ab8895c5451a7ec9582c1d3 from branch mongodb-4.4
ref: 3998a1f701..3b4a927265 for: 4.4.0-rc11 WT-6349 Don't clean the globally visible on-disk tombstones as part of checkpoint WT-6351 Fix race between threads to update condition variable's previous wait value WT-6388 Fix-up out-of-order updates in the history store WT-6397 Reduce visibility restrictions for reading tombstone information from history store's update list WT-6428 Fixes for checkpoint retention WT-6429 Fix memory leak in rollback to stable WT-6438 Fix rollback error due to cache pressure WT-6441 Add stats to indicate how many times the history store is search happened during a normal search call
-rw-r--r--src/third_party/wiredtiger/dist/stat_data.py4
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_sync.c2
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c41
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_log.c16
-rw-r--r--src/third_party/wiredtiger/src/cursor/cur_std.c8
-rw-r--r--src/third_party/wiredtiger/src/history/hs.c288
-rw-r--r--src/third_party/wiredtiger/src/include/connection.h61
-rw-r--r--src/third_party/wiredtiger/src/include/cursor.i2
-rw-r--r--src/third_party/wiredtiger/src/include/extern.h3
-rw-r--r--src/third_party/wiredtiger/src/include/misc.h13
-rw-r--r--src/third_party/wiredtiger/src/include/stat.h4
-rw-r--r--src/third_party/wiredtiger/src/include/txn.i31
-rw-r--r--src/third_party/wiredtiger/src/include/wiredtiger.in710
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_row.c6
-rw-r--r--src/third_party/wiredtiger/src/support/cond_auto.c12
-rw-r--r--src/third_party/wiredtiger/src/support/stat.c23
-rw-r--r--src/third_party/wiredtiger/src/txn/txn.c5
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c24
-rw-r--r--src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c17
-rw-r--r--src/third_party/wiredtiger/test/suite/test_debug_mode02.py32
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare_hs03.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp04.py9
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp20.py88
24 files changed, 898 insertions, 506 deletions
diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py
index d9f476d14bc..10e3fa0e7a5 100644
--- a/src/third_party/wiredtiger/dist/stat_data.py
+++ b/src/third_party/wiredtiger/dist/stat_data.py
@@ -375,7 +375,9 @@ connection_stats = [
CursorStat('cursor_reset', 'cursor reset calls'),
CursorStat('cursor_restart', 'cursor operation restarted'),
CursorStat('cursor_search', 'cursor search calls'),
+ CursorStat('cursor_search_hs', 'cursor search history store calls'),
CursorStat('cursor_search_near', 'cursor search near calls'),
+ CursorStat('cursor_skip_hs_cur_position', 'Total number of entries skipped to position the history store cursor'),
CursorStat('cursor_truncate', 'cursor truncate calls'),
CursorStat('cursor_update', 'cursor update calls'),
CursorStat('cursor_update_bytes', 'cursor update key and value bytes', 'size'),
@@ -839,7 +841,9 @@ dsrc_stats = [
CursorStat('cursor_reset', 'reset calls'),
CursorStat('cursor_restart', 'operation restarted'),
CursorStat('cursor_search', 'search calls'),
+ CursorStat('cursor_search_hs', 'search history store calls'),
CursorStat('cursor_search_near', 'search near calls'),
+ CursorStat('cursor_skip_hs_cur_position', 'Total number of entries skipped to position the history store cursor'),
CursorStat('cursor_truncate', 'truncate calls'),
CursorStat('cursor_update', 'update calls'),
CursorStat('cursor_update_bytes', 'update key and value bytes', 'size'),
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index eb8474c7ca6..94fa358c34f 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-4.4",
- "commit": "3998a1f701bfc67afeceeef68624fbeb58daa468"
+ "commit": "3b4a927265fc81dc4ab8895c5451a7ec9582c1d3"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c
index b52fe65ffd7..bf2ebd1372b 100644
--- a/src/third_party/wiredtiger/src/btree/bt_sync.c
+++ b/src/third_party/wiredtiger/src/btree/bt_sync.c
@@ -555,7 +555,7 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
internal_bytes += page->memory_footprint;
++internal_pages;
/* Slow down checkpoints. */
- if (F_ISSET(conn, WT_CONN_DEBUG_SLOW_CKPT))
+ if (FLD_ISSET(conn->debug_flags, WT_CONN_DEBUG_SLOW_CKPT))
__wt_sleep(0, 10000);
} else {
leaf_bytes += page->memory_footprint;
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index 4596f0095d6..9666842e9c3 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -1777,21 +1777,32 @@ __wt_debug_mode_config(WT_SESSION_IMPL *session, const char *cfg[])
txn_global = &conn->txn_global;
WT_RET(__wt_config_gets(session, cfg, "debug_mode.checkpoint_retention", &cval));
- conn->debug_ckpt_cnt = (uint32_t)cval.val;
- if (cval.val == 0) {
- if (conn->debug_ckpt != NULL)
- __wt_free(session, conn->debug_ckpt);
- conn->debug_ckpt = NULL;
- } else if (conn->debug_ckpt != NULL)
- WT_RET(__wt_realloc(session, NULL, conn->debug_ckpt_cnt, &conn->debug_ckpt));
- else
- WT_RET(__wt_calloc_def(session, conn->debug_ckpt_cnt, &conn->debug_ckpt));
+
+ /*
+ * Checkpoint retention has some rules to avoid needing a lock to coordinate with the archive
+ * thread and avoid memory issues. You can turn it on to some value. You can turn it off. You
+ * can reconfigure to the same value again. You cannot change the non-zero value. Once it was on
+ * in the past and then turned off, you cannot turn it back on again.
+ */
+ if (cval.val != 0) {
+ if (conn->debug_ckpt_cnt != 0 && cval.val != conn->debug_ckpt_cnt)
+ WT_RET_MSG(session, EINVAL, "Cannot change value for checkpoint retention");
+ WT_RET(
+ __wt_realloc_def(session, &conn->debug_ckpt_alloc, (size_t)cval.val, &conn->debug_ckpt));
+ FLD_SET(conn->debug_flags, WT_CONN_DEBUG_CKPT_RETAIN);
+ } else
+ FLD_CLR(conn->debug_flags, WT_CONN_DEBUG_CKPT_RETAIN);
+ /*
+ * We need to make sure all writes to other fields are visible before setting the count because
+ * the archive thread may walk the array using this value.
+ */
+ WT_PUBLISH(conn->debug_ckpt_cnt, (uint32_t)cval.val);
WT_RET(__wt_config_gets(session, cfg, "debug_mode.cursor_copy", &cval));
if (cval.val)
- F_SET(conn, WT_CONN_DEBUG_CURSOR_COPY);
+ FLD_SET(conn->debug_flags, WT_CONN_DEBUG_CURSOR_COPY);
else
- F_CLR(conn, WT_CONN_DEBUG_CURSOR_COPY);
+ FLD_CLR(conn->debug_flags, WT_CONN_DEBUG_CURSOR_COPY);
WT_RET(__wt_config_gets(session, cfg, "debug_mode.eviction", &cval));
if (cval.val)
@@ -1804,18 +1815,18 @@ __wt_debug_mode_config(WT_SESSION_IMPL *session, const char *cfg[])
WT_RET(__wt_config_gets(session, cfg, "debug_mode.realloc_exact", &cval));
if (cval.val)
- F_SET(conn, WT_CONN_DEBUG_REALLOC_EXACT);
+ FLD_SET(conn->debug_flags, WT_CONN_DEBUG_REALLOC_EXACT);
else
- F_CLR(conn, WT_CONN_DEBUG_REALLOC_EXACT);
+ FLD_CLR(conn->debug_flags, WT_CONN_DEBUG_REALLOC_EXACT);
WT_RET(__wt_config_gets(session, cfg, "debug_mode.rollback_error", &cval));
txn_global->debug_rollback = (uint64_t)cval.val;
WT_RET(__wt_config_gets(session, cfg, "debug_mode.slow_checkpoint", &cval));
if (cval.val)
- F_SET(conn, WT_CONN_DEBUG_SLOW_CKPT);
+ FLD_SET(conn->debug_flags, WT_CONN_DEBUG_SLOW_CKPT);
else
- F_CLR(conn, WT_CONN_DEBUG_SLOW_CKPT);
+ FLD_CLR(conn->debug_flags, WT_CONN_DEBUG_SLOW_CKPT);
WT_RET(__wt_config_gets(session, cfg, "debug_mode.table_logging", &cval));
if (cval.val)
diff --git a/src/third_party/wiredtiger/src/conn/conn_log.c b/src/third_party/wiredtiger/src/conn/conn_log.c
index 3419f329c16..95e7b263925 100644
--- a/src/third_party/wiredtiger/src/conn/conn_log.c
+++ b/src/third_party/wiredtiger/src/conn/conn_log.c
@@ -374,7 +374,7 @@ __log_archive_once(WT_SESSION_IMPL *session, uint32_t backup_file)
WT_CONNECTION_IMPL *conn;
WT_DECL_RET;
WT_LOG *log;
- uint32_t min_lognum;
+ uint32_t dbg_val, min_lognum;
u_int logcount;
char **logfiles;
@@ -392,9 +392,11 @@ __log_archive_once(WT_SESSION_IMPL *session, uint32_t backup_file)
WT_MIN(log->ckpt_lsn.l.file, backup_file);
/* Adjust the number of log files to retain based on debugging options. */
- if (conn->debug_ckpt_cnt != 0)
- min_lognum = WT_MIN(conn->debug_ckpt[conn->debug_ckpt_cnt - 1].l.file, min_lognum);
- if (conn->debug_log_cnt != 0) {
+ WT_ORDERED_READ(dbg_val, conn->debug_ckpt_cnt);
+ if (FLD_ISSET(conn->debug_flags, WT_CONN_DEBUG_CKPT_RETAIN) && dbg_val != 0)
+ min_lognum = WT_MIN(conn->debug_ckpt[dbg_val - 1].l.file, min_lognum);
+ WT_ORDERED_READ(dbg_val, conn->debug_log_cnt);
+ if (dbg_val != 0) {
/*
* If we're performing checkpoints, apply the retain value as a minimum, increasing the
* number the log files we keep. If not performing checkpoints, it's an absolute number of
@@ -404,12 +406,12 @@ __log_archive_once(WT_SESSION_IMPL *session, uint32_t backup_file)
*
* Check for N+1, that is, we retain N full log files, and one partial.
*/
- if ((conn->debug_log_cnt + 1) >= log->fileid)
+ if ((dbg_val + 1) >= log->fileid)
return (0);
if (log->ckpt_lsn.l.file == 1 && log->ckpt_lsn.l.offset == 0)
- min_lognum = log->fileid - (conn->debug_log_cnt + 1);
+ min_lognum = log->fileid - (dbg_val + 1);
else
- min_lognum = WT_MIN(log->fileid - (conn->debug_log_cnt + 1), min_lognum);
+ min_lognum = WT_MIN(log->fileid - (dbg_val + 1), min_lognum);
}
__wt_verbose(session, WT_VERB_LOG, "log_archive: archive to log number %" PRIu32, min_lognum);
diff --git a/src/third_party/wiredtiger/src/cursor/cur_std.c b/src/third_party/wiredtiger/src/cursor/cur_std.c
index 7985720c70a..fb68d4681a6 100644
--- a/src/third_party/wiredtiger/src/cursor/cur_std.c
+++ b/src/third_party/wiredtiger/src/cursor/cur_std.c
@@ -379,7 +379,7 @@ __wt_cursor_get_keyv(WT_CURSOR *cursor, uint32_t flags, va_list ap)
WT_ERR(__wt_cursor_kv_not_set(cursor, true));
/* Force an allocated copy when using cursor copy debug. */
- if (F_ISSET(S2C(session), WT_CONN_DEBUG_CURSOR_COPY))
+ if (FLD_ISSET(S2C(session)->debug_flags, WT_CONN_DEBUG_CURSOR_COPY))
WT_ERR(__wt_buf_grow(session, &cursor->key, cursor->key.size));
if (WT_CURSOR_RECNO(cursor)) {
@@ -484,7 +484,7 @@ err:
* memory in the meantime, free it.
*/
if (tmp.mem != NULL) {
- if (buf->mem == NULL && !F_ISSET(S2C(session), WT_CONN_DEBUG_CURSOR_COPY)) {
+ if (buf->mem == NULL && !FLD_ISSET(S2C(session)->debug_flags, WT_CONN_DEBUG_CURSOR_COPY)) {
buf->mem = tmp.mem;
buf->memsize = tmp.memsize;
F_SET(cursor, WT_CURSTD_DEBUG_COPY_KEY);
@@ -528,7 +528,7 @@ __wt_cursor_get_valuev(WT_CURSOR *cursor, va_list ap)
WT_ERR(__wt_cursor_kv_not_set(cursor, false));
/* Force an allocated copy when using cursor copy debug. */
- if (F_ISSET(S2C(session), WT_CONN_DEBUG_CURSOR_COPY))
+ if (FLD_ISSET(S2C(session)->debug_flags, WT_CONN_DEBUG_CURSOR_COPY))
WT_ERR(__wt_buf_grow(session, &cursor->value, cursor->value.size));
/* Fast path some common cases. */
@@ -624,7 +624,7 @@ err:
* memory in the meantime, free it.
*/
if (tmp.mem != NULL) {
- if (buf->mem == NULL && !F_ISSET(S2C(session), WT_CONN_DEBUG_CURSOR_COPY)) {
+ if (buf->mem == NULL && !FLD_ISSET(S2C(session)->debug_flags, WT_CONN_DEBUG_CURSOR_COPY)) {
buf->mem = tmp.mem;
buf->memsize = tmp.memsize;
F_SET(cursor, WT_CURSTD_DEBUG_COPY_VALUE);
diff --git a/src/third_party/wiredtiger/src/history/hs.c b/src/third_party/wiredtiger/src/history/hs.c
index 78b47ecd6aa..ee75972f44f 100644
--- a/src/third_party/wiredtiger/src/history/hs.c
+++ b/src/third_party/wiredtiger/src/history/hs.c
@@ -26,6 +26,9 @@ typedef struct {
static int __hs_delete_key_from_pos(
WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, uint32_t btree_id, const WT_ITEM *key);
+static int __hs_fixup_out_of_order_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor,
+ WT_BTREE *btree, const WT_ITEM *key, wt_timestamp_t ts, uint64_t *hs_counter,
+ const WT_ITEM *srch_key);
/*
* __hs_start_internal_session --
@@ -422,55 +425,23 @@ __hs_insert_updates_verbose(WT_SESSION_IMPL *session, WT_BTREE *btree)
*/
static int
__hs_insert_record_with_btree_int(WT_SESSION_IMPL *session, WT_CURSOR *cursor, WT_BTREE *btree,
- const WT_ITEM *key, const WT_UPDATE *upd, const uint8_t type, const WT_ITEM *hs_value,
- WT_HS_TIME_POINT *stop_time_point)
+ const WT_ITEM *key, const uint8_t type, const WT_ITEM *hs_value,
+ WT_HS_TIME_POINT *start_time_point, WT_HS_TIME_POINT *stop_time_point, uint64_t counter)
{
WT_CURSOR_BTREE *cbt;
- WT_DECL_ITEM(hs_key);
WT_DECL_RET;
WT_UPDATE *hs_upd, *upd_local;
- wt_timestamp_t hs_start_ts;
- uint64_t counter, hs_counter;
- uint32_t hs_btree_id;
- int cmp;
cbt = (WT_CURSOR_BTREE *)cursor;
hs_upd = upd_local = NULL;
- counter = 0;
-
- /* Allocate buffers for the data store and history store key. */
- WT_ERR(__wt_scr_alloc(session, 0, &hs_key));
-
- /*
- * Adjust counter if there exists an update in the history store with same btree id, key and
- * timestamp. Otherwise the newly inserting history store record may fall behind the existing
- * one can lead to wrong order.
- */
- WT_ERR_NOTFOUND_OK(
- __wt_hs_cursor_position(session, cursor, btree->id, key, upd->start_ts), true);
- if (ret == 0) {
- WT_ERR(cursor->get_key(cursor, &hs_btree_id, hs_key, &hs_start_ts, &hs_counter));
-
- /*
- * Check the whether the existing record is also from the same timestamp.
- *
- * Verify simple checks first to confirm whether the retrieved update same or not before
- * performing the expensive key comparison.
- */
- if (hs_btree_id == btree->id && upd->start_ts == hs_start_ts) {
- WT_ERR(__wt_compare(session, NULL, hs_key, key, &cmp));
- if (cmp == 0)
- counter = hs_counter + 1;
- }
- }
/*
* Use WT_CURSOR.set_key and WT_CURSOR.set_value to create key and value items, then use them to
* create an update chain for a direct insertion onto the history store page.
*/
- cursor->set_key(cursor, btree->id, key, upd->start_ts, counter);
+ cursor->set_key(cursor, btree->id, key, start_time_point->ts, counter);
cursor->set_value(
- cursor, stop_time_point->durable_ts, upd->durable_ts, (uint64_t)type, hs_value);
+ cursor, stop_time_point->durable_ts, start_time_point->durable_ts, (uint64_t)type, hs_value);
/* Allocate a tombstone only when there is a valid stop time point. */
if (stop_time_point->ts != WT_TS_MAX || stop_time_point->txnid != WT_TXN_MAX) {
@@ -489,9 +460,9 @@ __hs_insert_record_with_btree_int(WT_SESSION_IMPL *session, WT_CURSOR *cursor, W
* current update start time point as the commit time point to the history store record.
*/
WT_ERR(__wt_upd_alloc(session, &cursor->value, WT_UPDATE_STANDARD, &upd_local, NULL));
- upd_local->start_ts = upd->start_ts;
- upd_local->durable_ts = upd->durable_ts;
- upd_local->txnid = upd->txnid;
+ upd_local->start_ts = start_time_point->ts;
+ upd_local->durable_ts = start_time_point->durable_ts;
+ upd_local->txnid = start_time_point->txnid;
/* Insert the standard update as next update if there is a tombstone. */
if (hs_upd != NULL)
@@ -511,7 +482,6 @@ __hs_insert_record_with_btree_int(WT_SESSION_IMPL *session, WT_CURSOR *cursor, W
WT_STAT_CONN_INCR(session, cache_hs_insert);
err:
- __wt_scr_free(session, &hs_key);
if (ret != 0) {
__wt_free_update_list(session, &hs_upd);
@@ -537,7 +507,20 @@ __hs_insert_record_with_btree(WT_SESSION_IMPL *session, WT_CURSOR *cursor, WT_BT
const WT_ITEM *key, const WT_UPDATE *upd, const uint8_t type, const WT_ITEM *hs_value,
WT_HS_TIME_POINT *stop_time_point, bool clear_hs)
{
+ WT_DECL_ITEM(hs_key);
+ WT_DECL_ITEM(srch_key);
WT_DECL_RET;
+ WT_HS_TIME_POINT start_time_point;
+ wt_timestamp_t hs_start_ts;
+ uint64_t counter, hs_counter;
+ uint32_t hs_btree_id;
+ int cmp;
+
+ counter = 0;
+
+ /* Allocate buffers for the history store and search key. */
+ WT_ERR(__wt_scr_alloc(session, 0, &hs_key));
+ WT_ERR(__wt_scr_alloc(session, 0, &srch_key));
/*
* The session should be pointing at the history store btree since this is the one that we'll be
@@ -560,9 +543,47 @@ __hs_insert_record_with_btree(WT_SESSION_IMPL *session, WT_CURSOR *cursor, WT_BT
*/
WT_ASSERT(session, type == WT_UPDATE_STANDARD || type == WT_UPDATE_MODIFY);
+ /*
+ * Adjust counter if there exists an update in the history store with same btree id, key and
+ * timestamp. Otherwise the newly inserting history store record may fall behind the existing
+ * one can lead to wrong order.
+ */
+ WT_ERR_NOTFOUND_OK(
+ __wt_hs_cursor_position(session, cursor, btree->id, key, upd->start_ts, srch_key), true);
+ if (ret == 0) {
+ WT_ERR(cursor->get_key(cursor, &hs_btree_id, hs_key, &hs_start_ts, &hs_counter));
+
+ /*
+ * Check the whether the existing record is also from the same timestamp.
+ *
+ * Verify simple checks first to confirm whether the retrieved update same or not before
+ * performing the expensive key comparison.
+ */
+ if (hs_btree_id == btree->id && upd->start_ts == hs_start_ts) {
+ WT_ERR(__wt_compare(session, NULL, hs_key, key, &cmp));
+ if (cmp == 0)
+ counter = hs_counter + 1;
+ }
+ }
+
+ /*
+ * If we're inserting a non-zero timestamp, look ahead for any higher timestamps. If we find
+ * updates, we should remove them and reinsert them at the current timestamp.
+ */
+ if (upd->start_ts != WT_TS_NONE) {
+ WT_ERR_NOTFOUND_OK(cursor->next(cursor), true);
+ if (ret == 0)
+ WT_ERR(__hs_fixup_out_of_order_from_pos(
+ session, cursor, btree, key, upd->start_ts, &counter, srch_key));
+ }
+
+ start_time_point.ts = upd->start_ts;
+ start_time_point.durable_ts = upd->durable_ts;
+ start_time_point.txnid = upd->txnid;
+
/* The tree structure can change while we try to insert the mod list, retry if that happens. */
- while ((ret = __hs_insert_record_with_btree_int(
- session, cursor, btree, key, upd, type, hs_value, stop_time_point)) == WT_RESTART)
+ while ((ret = __hs_insert_record_with_btree_int(session, cursor, btree, key, type, hs_value,
+ &start_time_point, stop_time_point, counter)) == WT_RESTART)
WT_STAT_CONN_INCR(session, cache_hs_insert_restart);
WT_ERR(ret);
@@ -596,6 +617,8 @@ __hs_insert_record_with_btree(WT_SESSION_IMPL *session, WT_CURSOR *cursor, WT_BT
done:
err:
+ __wt_scr_free(session, &hs_key);
+ __wt_scr_free(session, &srch_key);
/* We did a row search, release the cursor so that the page doesn't continue being held. */
cursor->reset(cursor);
@@ -678,6 +701,7 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi)
WT_UPDATE *first_non_ts_upd, *non_aborted_upd, *oldest_upd, *prev_upd, *upd;
WT_HS_TIME_POINT stop_time_point;
wt_off_t hs_size;
+ wt_timestamp_t min_insert_ts;
uint64_t insert_cnt, max_hs_size;
uint32_t i;
uint8_t *p;
@@ -767,6 +791,7 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi)
* tombstone.
* 4) We have a single tombstone on the chain, it is simply ignored.
*/
+ min_insert_ts = WT_TS_MAX;
for (non_aborted_upd = prev_upd = NULL; upd != NULL;
prev_upd = non_aborted_upd, upd = upd->next) {
if (upd->txnid == WT_TXN_ABORTED)
@@ -774,6 +799,16 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi)
non_aborted_upd = upd;
+ /*
+ * If we've seen a smaller timestamp before, use that instead.
+ *
+ * FIXME-WT-6442: Resolved prepared updates will lose their durable timestamp here. We
+ * should add a statistic to keep track of how often this happens.
+ */
+ if (min_insert_ts < upd->start_ts)
+ upd->start_ts = upd->durable_ts = min_insert_ts;
+ else
+ min_insert_ts = upd->start_ts;
WT_ERR(__wt_modify_vector_push(&modifies, upd));
/*
@@ -917,6 +952,8 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi)
* If the time points are out of order (which can happen if the application performs
* updates with out-of-order timestamps), so this value can never be seen, don't bother
* inserting it.
+ *
+ * FIXME-WT-6443: We should be able to replace this with an assertion.
*/
if (stop_time_point.ts < upd->start_ts ||
(stop_time_point.ts == upd->start_ts && stop_time_point.txnid <= upd->txnid)) {
@@ -1006,17 +1043,22 @@ err:
* __wt_hs_cursor_position --
* Position a history store cursor at the end of a set of updates for a given btree id, record
* key and timestamp. There may be no history store entries for the given btree id and record
- * key if they have been removed by WT_CONNECTION::rollback_to_stable.
+ * key if they have been removed by WT_CONNECTION::rollback_to_stable. There is an optional
+ * argument to store the key that we used to position the cursor which can be used to assess
+ * where the cursor is relative to it.
*/
int
__wt_hs_cursor_position(WT_SESSION_IMPL *session, WT_CURSOR *cursor, uint32_t btree_id,
- const WT_ITEM *key, wt_timestamp_t timestamp)
+ const WT_ITEM *key, wt_timestamp_t timestamp, WT_ITEM *user_srch_key)
{
WT_DECL_ITEM(srch_key);
WT_DECL_RET;
int cmp, exact;
- WT_RET(__wt_scr_alloc(session, 0, &srch_key));
+ if (user_srch_key == NULL)
+ WT_RET(__wt_scr_alloc(session, 0, &srch_key));
+ else
+ srch_key = user_srch_key;
/*
* Because of the special visibility rules for the history store, a new key can appear in
@@ -1042,6 +1084,9 @@ __wt_hs_cursor_position(WT_SESSION_IMPL *session, WT_CURSOR *cursor, uint32_t bt
* backwards until we land on our key.
*/
while ((ret = cursor->prev(cursor)) == 0) {
+ WT_STAT_CONN_INCR(session, cursor_skip_hs_cur_position);
+ WT_STAT_DATA_INCR(session, cursor_skip_hs_cur_position);
+
WT_ERR(__wt_compare(session, NULL, &cursor->key, srch_key, &cmp));
if (cmp <= 0)
break;
@@ -1054,7 +1099,8 @@ __wt_hs_cursor_position(WT_SESSION_IMPL *session, WT_CURSOR *cursor, uint32_t bt
}
#endif
err:
- __wt_scr_free(session, &srch_key);
+ if (user_srch_key == NULL)
+ __wt_scr_free(session, &srch_key);
return (ret);
}
@@ -1099,6 +1145,9 @@ __wt_find_hs_upd(WT_SESSION_IMPL *session, WT_ITEM *key, const char *value_forma
WT_NOT_READ(modify, false);
is_owner = false;
+ WT_STAT_CONN_INCR(session, cursor_search_hs);
+ WT_STAT_DATA_INCR(session, cursor_search_hs);
+
/* Row-store key is as passed to us, create the column-store key as needed. */
WT_ASSERT(
session, (key == NULL && recno != WT_RECNO_OOB) || (key != NULL && recno == WT_RECNO_OOB));
@@ -1126,7 +1175,7 @@ __wt_find_hs_upd(WT_SESSION_IMPL *session, WT_ITEM *key, const char *value_forma
*/
read_timestamp = allow_prepare ? txn->prepare_timestamp : txn_shared->read_timestamp;
WT_ERR_NOTFOUND_OK(
- __wt_hs_cursor_position(session, hs_cursor, hs_btree_id, key, read_timestamp), true);
+ __wt_hs_cursor_position(session, hs_cursor, hs_btree_id, key, read_timestamp, NULL), true);
if (ret == WT_NOTFOUND) {
ret = 0;
goto done;
@@ -1209,6 +1258,7 @@ __wt_find_hs_upd(WT_SESSION_IMPL *session, WT_ITEM *key, const char *value_forma
upd_type = WT_UPDATE_STANDARD;
break;
}
+ WT_ERR(ret);
hs_start_ts_tmp = WT_TS_NONE;
/*
* Make sure we use the temporary variants of these variables. We need to retain the
@@ -1383,6 +1433,150 @@ __wt_hs_delete_key_from_ts(
}
/*
+ * __hs_fixup_out_of_order_from_pos --
+ * Fixup existing out-of-order updates in the history store. This function works by looking
+ * ahead of the current cursor position for entries for the same key, removing them and
+ * reinserting them at the timestamp that is currently being inserted.
+ */
+static int
+__hs_fixup_out_of_order_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, WT_BTREE *btree,
+ const WT_ITEM *key, wt_timestamp_t ts, uint64_t *counter, const WT_ITEM *srch_key)
+{
+ WT_CURSOR *insert_cursor;
+ WT_CURSOR_BTREE *hs_cbt, *insert_cbt;
+ WT_DECL_RET;
+ WT_HS_TIME_POINT start_time_point, stop_time_point;
+ WT_ITEM hs_key;
+ WT_UPDATE *tombstone;
+ wt_timestamp_t hs_ts;
+ uint64_t hs_counter;
+ uint32_t hs_btree_id;
+ int cmp;
+ const char *open_cursor_cfg[] = {WT_CONFIG_BASE(session, WT_SESSION_open_cursor), NULL};
+
+ insert_cursor = NULL;
+ hs_cbt = (WT_CURSOR_BTREE *)hs_cursor;
+ insert_cbt = NULL;
+ WT_CLEAR(hs_key);
+ tombstone = NULL;
+
+ /*
+ * Position ourselves at the beginning of the key range that we may have to fixup. Prior to
+ * getting here, we've positioned our cursor at the end of a key/timestamp range and then done a
+ * "next". Normally that would leave us pointing at higher timestamps for the same key (if any)
+ * but in the case where our insertion timestamp is the lowest for that key, our cursor may be
+ * pointing at the previous key and can potentially race with additional key insertions. We need
+ * to keep doing "next" until we've got a key greater than the one we attempted to position
+ * ourselves with.
+ */
+ for (; ret == 0; ret = hs_cursor->next(hs_cursor)) {
+ /*
+ * Prior to getting here, we've done a "search near" on our key for the timestamp we're
+ * inserting and then a "next". In the regular case, our cursor will be positioned on the
+ * next key and we'll break out of the first iteration in one of the conditions below.
+ */
+ WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_ts, &hs_counter));
+ WT_ERR(__wt_compare(session, NULL, &hs_cursor->key, srch_key, &cmp));
+ if (cmp > 0)
+ break;
+ }
+ if (ret == WT_NOTFOUND)
+ return (0);
+ WT_ERR(ret);
+
+ /*
+ * The goal of this fixup function is to move out-of-order content to maintain ordering in the
+ * history store. We do this by removing content with higher timestamps and reinserting it
+ * behind (from search's point of view) the newly inserted update. Even though these updates
+ * will all have the same timestamp, they cannot be discarded since older readers may need to
+ * see them after they've been moved due to their transaction id.
+ *
+ * For example, if we're inserting an update at timestamp 3 with value ddd:
+ * btree key ts counter value
+ * 2 foo 5 0 aaa
+ * 2 foo 6 0 bbb
+ * 2 foo 7 0 ccc
+ *
+ * We want to end up with this:
+ * btree key ts counter value
+ * 2 foo 3 0 aaa
+ * 2 foo 3 1 bbb
+ * 2 foo 3 2 ccc
+ * 2 foo 3 3 ddd
+ */
+ for (; ret == 0; ret = hs_cursor->next(hs_cursor)) {
+ /*
+ * Prior to getting here, we've done a "search near" on our key for the timestamp we're
+ * inserting and then a "next". In the regular case, our cursor will be positioned on the
+ * next key and we'll break out of the first iteration in one of the conditions below.
+ */
+ WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_ts, &hs_counter));
+ if (hs_btree_id != btree->id)
+ break;
+ WT_ERR(__wt_compare(session, NULL, &hs_key, key, &cmp));
+ if (cmp != 0)
+ break;
+
+ /*
+ * If we got here, we've got out-of-order updates in the history store.
+ *
+ * Our strategy to rectify this is to remove all records for the same key with a higher
+ * timestamp than the one that we're inserting on and reinsert them at the same timestamp
+ * that we're inserting with.
+ */
+ WT_ASSERT(session, hs_ts > ts);
+
+ /*
+ * Don't incur the overhead of opening this new cursor unless we need it. In the regular
+ * case, we'll never get here.
+ */
+ if (insert_cursor == NULL) {
+ WT_WITHOUT_DHANDLE(session,
+ ret = __wt_open_cursor(session, WT_HS_URI, NULL, open_cursor_cfg, &insert_cursor));
+ WT_ERR(ret);
+ insert_cbt = (WT_CURSOR_BTREE *)insert_cursor;
+ F_SET(insert_cbt, WT_CBT_NO_TXN);
+ }
+
+ start_time_point.ts = start_time_point.durable_ts = ts;
+ start_time_point.txnid = hs_cbt->upd_value->tw.start_txn;
+
+ /*
+ * We're going to be inserting something immediately after with the same timestamp. Either
+ * another moved update OR the update itself that triggered the correction. In either case,
+ * we should preserve the stop transaction id.
+ */
+ stop_time_point.ts = stop_time_point.durable_ts = ts;
+ stop_time_point.txnid = hs_cbt->upd_value->tw.stop_txn;
+
+ /* Reinsert entry with earlier timestamp. */
+ while ((ret = __hs_insert_record_with_btree_int(session, insert_cursor, btree, key,
+ WT_UPDATE_STANDARD, &hs_cursor->value, &start_time_point, &stop_time_point,
+ *counter)) == WT_RESTART)
+ ;
+ WT_ERR(ret);
+ ++(*counter);
+
+ /* Delete entry with higher timestamp. */
+ hs_cbt->compare = 0;
+ WT_ERR(__wt_upd_alloc_tombstone(session, &tombstone, NULL));
+ tombstone->txnid = WT_TXN_NONE;
+ tombstone->start_ts = tombstone->durable_ts = WT_TS_NONE;
+ while ((ret = __wt_hs_modify(hs_cbt, tombstone)) == WT_RESTART)
+ ;
+ WT_ERR(ret);
+ tombstone = NULL;
+ }
+ if (ret == WT_NOTFOUND)
+ ret = 0;
+err:
+ __wt_free(session, tombstone);
+ if (insert_cursor != NULL)
+ insert_cursor->close(insert_cursor);
+ return (ret);
+}
+
+/*
* __hs_delete_key_from_pos --
* Delete an entire key's worth of data in the history store assuming that the input cursor is
* positioned at the beginning of the key range.
diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h
index 20c11fa42dc..fa3d10f1b16 100644
--- a/src/third_party/wiredtiger/src/include/connection.h
+++ b/src/third_party/wiredtiger/src/include/connection.h
@@ -208,10 +208,6 @@ struct __wt_connection_impl {
WT_SPINLOCK optrack_map_spinlock; /* Translation file spinlock. */
uintmax_t optrack_pid; /* Cache the process ID. */
- WT_LSN *debug_ckpt; /* Debug mode checkpoint LSNs. */
- uint32_t debug_ckpt_cnt; /* Checkpoint log file retention number */
- uint32_t debug_log_cnt; /* Log file retention count */
-
void **foc; /* Free-on-close array */
size_t foc_cnt; /* Array entries */
size_t foc_size; /* Array size */
@@ -448,6 +444,18 @@ struct __wt_connection_impl {
bool mmap_all; /* use mmap for all I/O on data files */
int page_size; /* OS page size for mmap alignment */
+ WT_LSN *debug_ckpt; /* Debug mode checkpoint LSNs. */
+ size_t debug_ckpt_alloc; /* Checkpoint retention allocated. */
+ uint32_t debug_ckpt_cnt; /* Checkpoint retention number. */
+ uint32_t debug_log_cnt; /* Log file retention count */
+/* AUTOMATIC FLAG VALUE GENERATION START */
+#define WT_CONN_DEBUG_CKPT_RETAIN 0x1u
+#define WT_CONN_DEBUG_CURSOR_COPY 0x2u
+#define WT_CONN_DEBUG_REALLOC_EXACT 0000u
+#define WT_CONN_DEBUG_SLOW_CKPT 0x8u
+ /* AUTOMATIC FLAG VALUE GENERATION STOP */
+ uint64_t debug_flags;
+
/* AUTOMATIC FLAG VALUE GENERATION START */
#define WT_VERB_API 0x0000000001u
#define WT_VERB_BACKUP 0x0000000002u
@@ -527,30 +535,27 @@ struct __wt_connection_impl {
#define WT_CONN_CLOSING_TIMESTAMP 0x00000020u
#define WT_CONN_COMPATIBILITY 0x00000040u
#define WT_CONN_DATA_CORRUPTION 0x00000080u
-#define WT_CONN_DEBUG_CURSOR_COPY 0x00000100u
-#define WT_CONN_DEBUG_REALLOC_EXACT 0x00000200u
-#define WT_CONN_DEBUG_SLOW_CKPT 0x00000400u
-#define WT_CONN_EVICTION_RUN 0x00000800u
-#define WT_CONN_FILE_CLOSE_SYNC 0x00001000u
-#define WT_CONN_HS_OPEN 0x00002000u
-#define WT_CONN_INCR_BACKUP 0x00004000u
-#define WT_CONN_IN_MEMORY 0x00008000u
-#define WT_CONN_LEAK_MEMORY 0x00010000u
-#define WT_CONN_LSM_MERGE 0x00020000u
-#define WT_CONN_OPTRACK 0x00040000u
-#define WT_CONN_PANIC 0x00080000u
-#define WT_CONN_READONLY 0x00100000u
-#define WT_CONN_RECONFIGURING 0x00200000u
-#define WT_CONN_RECOVERING 0x00400000u
-#define WT_CONN_SALVAGE 0x00800000u
-#define WT_CONN_SERVER_ASYNC 0x01000000u
-#define WT_CONN_SERVER_CAPACITY 0x02000000u
-#define WT_CONN_SERVER_CHECKPOINT 0x04000000u
-#define WT_CONN_SERVER_LOG 0x08000000u
-#define WT_CONN_SERVER_LSM 0x10000000u
-#define WT_CONN_SERVER_STATISTICS 0x20000000u
-#define WT_CONN_SERVER_SWEEP 0x40000000u
-#define WT_CONN_WAS_BACKUP 0x80000000u
+#define WT_CONN_EVICTION_RUN 0x00000100u
+#define WT_CONN_FILE_CLOSE_SYNC 0x00000200u
+#define WT_CONN_HS_OPEN 0x00000400u
+#define WT_CONN_INCR_BACKUP 0x00000800u
+#define WT_CONN_IN_MEMORY 0x00001000u
+#define WT_CONN_LEAK_MEMORY 0x00002000u
+#define WT_CONN_LSM_MERGE 0x00004000u
+#define WT_CONN_OPTRACK 0x00008000u
+#define WT_CONN_PANIC 0x00010000u
+#define WT_CONN_READONLY 0x00020000u
+#define WT_CONN_RECONFIGURING 0x00040000u
+#define WT_CONN_RECOVERING 0x00080000u
+#define WT_CONN_SALVAGE 0x00100000u
+#define WT_CONN_SERVER_ASYNC 0x00200000u
+#define WT_CONN_SERVER_CAPACITY 0x00400000u
+#define WT_CONN_SERVER_CHECKPOINT 0x00800000u
+#define WT_CONN_SERVER_LOG 0x01000000u
+#define WT_CONN_SERVER_LSM 0x02000000u
+#define WT_CONN_SERVER_STATISTICS 0x04000000u
+#define WT_CONN_SERVER_SWEEP 0x08000000u
+#define WT_CONN_WAS_BACKUP 0x10000000u
/* AUTOMATIC FLAG VALUE GENERATION STOP */
uint32_t flags;
};
diff --git a/src/third_party/wiredtiger/src/include/cursor.i b/src/third_party/wiredtiger/src/include/cursor.i
index 99354198433..7bba5af25a0 100644
--- a/src/third_party/wiredtiger/src/include/cursor.i
+++ b/src/third_party/wiredtiger/src/include/cursor.i
@@ -24,7 +24,7 @@ __cursor_set_recno(WT_CURSOR_BTREE *cbt, uint64_t v)
static inline int
__cursor_copy_release(WT_CURSOR *cursor)
{
- if (F_ISSET(S2C(CUR2S(cursor)), WT_CONN_DEBUG_CURSOR_COPY)) {
+ if (FLD_ISSET(S2C(CUR2S(cursor))->debug_flags, WT_CONN_DEBUG_CURSOR_COPY)) {
if (F_ISSET(cursor, WT_CURSTD_DEBUG_COPY_KEY)) {
WT_RET(__wt_cursor_copy_release_item(cursor, &cursor->key));
F_CLR(cursor, WT_CURSTD_DEBUG_COPY_KEY);
diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h
index 43b0a9f943d..31e24f65edd 100644
--- a/src/third_party/wiredtiger/src/include/extern.h
+++ b/src/third_party/wiredtiger/src/include/extern.h
@@ -763,7 +763,8 @@ extern int __wt_hs_cursor_close(WT_SESSION_IMPL *session, uint32_t session_flags
extern int __wt_hs_cursor_open(WT_SESSION_IMPL *session)
WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_hs_cursor_position(WT_SESSION_IMPL *session, WT_CURSOR *cursor, uint32_t btree_id,
- const WT_ITEM *key, wt_timestamp_t timestamp) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
+ const WT_ITEM *key, wt_timestamp_t timestamp, WT_ITEM *user_srch_key)
+ WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_hs_delete_key_from_ts(WT_SESSION_IMPL *session, uint32_t btree_id,
const WT_ITEM *key, wt_timestamp_t ts) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_hs_get_btree(WT_SESSION_IMPL *session, WT_BTREE **hs_btreep)
diff --git a/src/third_party/wiredtiger/src/include/misc.h b/src/third_party/wiredtiger/src/include/misc.h
index 45dd0b42960..053ed2d6a82 100644
--- a/src/third_party/wiredtiger/src/include/misc.h
+++ b/src/third_party/wiredtiger/src/include/misc.h
@@ -114,12 +114,13 @@
* Common case allocate-and-grow function. Starts by allocating the requested number of items
* (at least 10), then doubles each time the list needs to grow.
*/
-#define __wt_realloc_def(session, sizep, number, addr) \
- (((number) * sizeof(**(addr)) <= *(sizep)) ? \
- 0 : \
- __wt_realloc(session, sizep, (F_ISSET(S2C(session), WT_CONN_DEBUG_REALLOC_EXACT)) ? \
- (number) * sizeof(**(addr)) : \
- WT_MAX(*(sizep)*2, WT_MAX(10, (number)) * sizeof(**(addr))), \
+#define __wt_realloc_def(session, sizep, number, addr) \
+ (((number) * sizeof(**(addr)) <= *(sizep)) ? \
+ 0 : \
+ __wt_realloc(session, sizep, \
+ (FLD_ISSET(S2C(session)->debug_flags, WT_CONN_DEBUG_REALLOC_EXACT)) ? \
+ (number) * sizeof(**(addr)) : \
+ WT_MAX(*(sizep)*2, WT_MAX(10, (number)) * sizeof(**(addr))), \
addr))
/*
diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h
index a158e26e0fc..0e662c0a6d4 100644
--- a/src/third_party/wiredtiger/src/include/stat.h
+++ b/src/third_party/wiredtiger/src/include/stat.h
@@ -480,6 +480,7 @@ struct __wt_connection_stats {
int64_t write_io;
int64_t cursor_next_skip_total;
int64_t cursor_prev_skip_total;
+ int64_t cursor_skip_hs_cur_position;
int64_t cursor_cached_count;
int64_t cursor_insert_bulk;
int64_t cursor_cache;
@@ -501,6 +502,7 @@ struct __wt_connection_stats {
int64_t cursor_reserve;
int64_t cursor_reset;
int64_t cursor_search;
+ int64_t cursor_search_hs;
int64_t cursor_search_near;
int64_t cursor_sweep_buckets;
int64_t cursor_sweep_closed;
@@ -875,6 +877,7 @@ struct __wt_dsrc_stats {
int64_t compress_write_too_small;
int64_t cursor_next_skip_total;
int64_t cursor_prev_skip_total;
+ int64_t cursor_skip_hs_cur_position;
int64_t cursor_insert_bulk;
int64_t cursor_reopen;
int64_t cursor_cache;
@@ -897,6 +900,7 @@ struct __wt_dsrc_stats {
int64_t cursor_reserve;
int64_t cursor_reset;
int64_t cursor_search;
+ int64_t cursor_search_hs;
int64_t cursor_search_near;
int64_t cursor_truncate;
int64_t cursor_update;
diff --git a/src/third_party/wiredtiger/src/include/txn.i b/src/third_party/wiredtiger/src/include/txn.i
index d2c13bbb3b6..b99a54532b0 100644
--- a/src/third_party/wiredtiger/src/include/txn.i
+++ b/src/third_party/wiredtiger/src/include/txn.i
@@ -851,24 +851,25 @@ __wt_txn_read_upd_list(
if (type == WT_UPDATE_RESERVE)
continue;
+ /*
+ * If the cursor is configured to ignore tombstones, copy the timestamps from the tombstones
+ * to the stop time window of the update value being returned to the caller. Caller can
+ * process the stop time window to decide if there was a tombstone on the update chain.
+ */
+ if (type == WT_UPDATE_TOMBSTONE && F_ISSET(&cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE) &&
+ !__wt_txn_upd_visible_all(session, upd)) {
+ cbt->upd_value->tw.durable_stop_ts = upd->durable_ts;
+ cbt->upd_value->tw.stop_ts = upd->start_ts;
+ cbt->upd_value->tw.stop_txn = upd->txnid;
+ cbt->upd_value->tw.prepare = upd->prepare_state == WT_PREPARE_INPROGRESS ||
+ upd->prepare_state == WT_PREPARE_LOCKED;
+ continue;
+ }
+
upd_visible = __wt_txn_upd_visible_type(session, upd);
- if (upd_visible == WT_VISIBLE_TRUE) {
- /*
- * Ignore non-globally visible tombstones when we are doing history store scans in
- * rollback to stable or when we are told to.
- */
- if (type == WT_UPDATE_TOMBSTONE && F_ISSET(&cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE) &&
- !__wt_txn_upd_visible_all(session, upd)) {
- cbt->upd_value->tw.durable_stop_ts = upd->durable_ts;
- cbt->upd_value->tw.stop_ts = upd->start_ts;
- cbt->upd_value->tw.stop_txn = upd->txnid;
- cbt->upd_value->tw.prepare = upd->prepare_state == WT_PREPARE_INPROGRESS ||
- upd->prepare_state == WT_PREPARE_LOCKED;
- continue;
- }
+ if (upd_visible == WT_VISIBLE_TRUE)
break;
- }
if (upd_visible == WT_VISIBLE_PREPARE) {
/* Ignore the prepared update, if transaction configuration says so. */
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index 24325bba4bc..2114928a10d 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -5368,657 +5368,664 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_CONN_CURSOR_NEXT_SKIP_TOTAL 1183
/*! cursor: Total number of entries skipped by cursor prev calls */
#define WT_STAT_CONN_CURSOR_PREV_SKIP_TOTAL 1184
+/*!
+ * cursor: Total number of entries skipped to position the history store
+ * cursor
+ */
+#define WT_STAT_CONN_CURSOR_SKIP_HS_CUR_POSITION 1185
/*! cursor: cached cursor count */
-#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1185
+#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1186
/*! cursor: cursor bulk loaded cursor insert calls */
-#define WT_STAT_CONN_CURSOR_INSERT_BULK 1186
+#define WT_STAT_CONN_CURSOR_INSERT_BULK 1187
/*! cursor: cursor close calls that result in cache */
-#define WT_STAT_CONN_CURSOR_CACHE 1187
+#define WT_STAT_CONN_CURSOR_CACHE 1188
/*! cursor: cursor create calls */
-#define WT_STAT_CONN_CURSOR_CREATE 1188
+#define WT_STAT_CONN_CURSOR_CREATE 1189
/*! cursor: cursor insert calls */
-#define WT_STAT_CONN_CURSOR_INSERT 1189
+#define WT_STAT_CONN_CURSOR_INSERT 1190
/*! cursor: cursor insert key and value bytes */
-#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1190
+#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1191
/*! cursor: cursor modify calls */
-#define WT_STAT_CONN_CURSOR_MODIFY 1191
+#define WT_STAT_CONN_CURSOR_MODIFY 1192
/*! cursor: cursor modify key and value bytes affected */
-#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1192
+#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1193
/*! cursor: cursor modify value bytes modified */
-#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1193
+#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1194
/*! cursor: cursor next calls */
-#define WT_STAT_CONN_CURSOR_NEXT 1194
+#define WT_STAT_CONN_CURSOR_NEXT 1195
/*!
* cursor: cursor next calls that skip greater than or equal to 100
* entries
*/
-#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1195
+#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1196
/*! cursor: cursor next calls that skip less than 100 entries */
-#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1196
+#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1197
/*! cursor: cursor operation restarted */
-#define WT_STAT_CONN_CURSOR_RESTART 1197
+#define WT_STAT_CONN_CURSOR_RESTART 1198
/*! cursor: cursor prev calls */
-#define WT_STAT_CONN_CURSOR_PREV 1198
+#define WT_STAT_CONN_CURSOR_PREV 1199
/*!
* cursor: cursor prev calls that skip greater than or equal to 100
* entries
*/
-#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1199
+#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1200
/*! cursor: cursor prev calls that skip less than 100 entries */
-#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1200
+#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1201
/*! cursor: cursor remove calls */
-#define WT_STAT_CONN_CURSOR_REMOVE 1201
+#define WT_STAT_CONN_CURSOR_REMOVE 1202
/*! cursor: cursor remove key bytes removed */
-#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1202
+#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1203
/*! cursor: cursor reserve calls */
-#define WT_STAT_CONN_CURSOR_RESERVE 1203
+#define WT_STAT_CONN_CURSOR_RESERVE 1204
/*! cursor: cursor reset calls */
-#define WT_STAT_CONN_CURSOR_RESET 1204
+#define WT_STAT_CONN_CURSOR_RESET 1205
/*! cursor: cursor search calls */
-#define WT_STAT_CONN_CURSOR_SEARCH 1205
+#define WT_STAT_CONN_CURSOR_SEARCH 1206
+/*! cursor: cursor search history store calls */
+#define WT_STAT_CONN_CURSOR_SEARCH_HS 1207
/*! cursor: cursor search near calls */
-#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1206
+#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1208
/*! cursor: cursor sweep buckets */
-#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1207
+#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1209
/*! cursor: cursor sweep cursors closed */
-#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1208
+#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1210
/*! cursor: cursor sweep cursors examined */
-#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1209
+#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1211
/*! cursor: cursor sweeps */
-#define WT_STAT_CONN_CURSOR_SWEEP 1210
+#define WT_STAT_CONN_CURSOR_SWEEP 1212
/*! cursor: cursor truncate calls */
-#define WT_STAT_CONN_CURSOR_TRUNCATE 1211
+#define WT_STAT_CONN_CURSOR_TRUNCATE 1213
/*! cursor: cursor update calls */
-#define WT_STAT_CONN_CURSOR_UPDATE 1212
+#define WT_STAT_CONN_CURSOR_UPDATE 1214
/*! cursor: cursor update key and value bytes */
-#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1213
+#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1215
/*! cursor: cursor update value size change */
-#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1214
+#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1216
/*! cursor: cursors reused from cache */
-#define WT_STAT_CONN_CURSOR_REOPEN 1215
+#define WT_STAT_CONN_CURSOR_REOPEN 1217
/*! cursor: open cursor count */
-#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1216
+#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1218
/*! data-handle: connection data handle size */
-#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1217
+#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1219
/*! data-handle: connection data handles currently active */
-#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1218
+#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1220
/*! data-handle: connection sweep candidate became referenced */
-#define WT_STAT_CONN_DH_SWEEP_REF 1219
+#define WT_STAT_CONN_DH_SWEEP_REF 1221
/*! data-handle: connection sweep dhandles closed */
-#define WT_STAT_CONN_DH_SWEEP_CLOSE 1220
+#define WT_STAT_CONN_DH_SWEEP_CLOSE 1222
/*! data-handle: connection sweep dhandles removed from hash list */
-#define WT_STAT_CONN_DH_SWEEP_REMOVE 1221
+#define WT_STAT_CONN_DH_SWEEP_REMOVE 1223
/*! data-handle: connection sweep time-of-death sets */
-#define WT_STAT_CONN_DH_SWEEP_TOD 1222
+#define WT_STAT_CONN_DH_SWEEP_TOD 1224
/*! data-handle: connection sweeps */
-#define WT_STAT_CONN_DH_SWEEPS 1223
+#define WT_STAT_CONN_DH_SWEEPS 1225
/*! data-handle: session dhandles swept */
-#define WT_STAT_CONN_DH_SESSION_HANDLES 1224
+#define WT_STAT_CONN_DH_SESSION_HANDLES 1226
/*! data-handle: session sweep attempts */
-#define WT_STAT_CONN_DH_SESSION_SWEEPS 1225
+#define WT_STAT_CONN_DH_SESSION_SWEEPS 1227
/*! history: history pages added for eviction during garbage collection */
-#define WT_STAT_CONN_HS_GC_PAGES_EVICT 1226
+#define WT_STAT_CONN_HS_GC_PAGES_EVICT 1228
/*! history: history pages removed for garbage collection */
-#define WT_STAT_CONN_HS_GC_PAGES_REMOVED 1227
+#define WT_STAT_CONN_HS_GC_PAGES_REMOVED 1229
/*! history: history pages visited for garbage collection */
-#define WT_STAT_CONN_HS_GC_PAGES_VISITED 1228
+#define WT_STAT_CONN_HS_GC_PAGES_VISITED 1230
/*! lock: checkpoint lock acquisitions */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1229
+#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1231
/*! lock: checkpoint lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1230
+#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1232
/*! lock: checkpoint lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1231
+#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1233
/*! lock: dhandle lock application thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1232
+#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1234
/*! lock: dhandle lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1233
+#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1235
/*! lock: dhandle read lock acquisitions */
-#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1234
+#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1236
/*! lock: dhandle write lock acquisitions */
-#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1235
+#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1237
/*!
* lock: durable timestamp queue lock application thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1236
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1238
/*!
* lock: durable timestamp queue lock internal thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1237
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1239
/*! lock: durable timestamp queue read lock acquisitions */
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1238
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1240
/*! lock: durable timestamp queue write lock acquisitions */
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1239
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1241
/*! lock: metadata lock acquisitions */
-#define WT_STAT_CONN_LOCK_METADATA_COUNT 1240
+#define WT_STAT_CONN_LOCK_METADATA_COUNT 1242
/*! lock: metadata lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1241
+#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1243
/*! lock: metadata lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1242
+#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1244
/*!
* lock: read timestamp queue lock application thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1243
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1245
/*! lock: read timestamp queue lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1244
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1246
/*! lock: read timestamp queue read lock acquisitions */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1245
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1247
/*! lock: read timestamp queue write lock acquisitions */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1246
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1248
/*! lock: schema lock acquisitions */
-#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1247
+#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1249
/*! lock: schema lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1248
+#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1250
/*! lock: schema lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1249
+#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1251
/*!
* lock: table lock application thread time waiting for the table lock
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1250
+#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1252
/*!
* lock: table lock internal thread time waiting for the table lock
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1251
+#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1253
/*! lock: table read lock acquisitions */
-#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1252
+#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1254
/*! lock: table write lock acquisitions */
-#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1253
+#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1255
/*! lock: txn global lock application thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1254
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1256
/*! lock: txn global lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1255
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1257
/*! lock: txn global read lock acquisitions */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1256
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1258
/*! lock: txn global write lock acquisitions */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1257
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1259
/*! log: busy returns attempting to switch slots */
-#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1258
+#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1260
/*! log: force archive time sleeping (usecs) */
-#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1259
+#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1261
/*! log: log bytes of payload data */
-#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1260
+#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1262
/*! log: log bytes written */
-#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1261
+#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1263
/*! log: log files manually zero-filled */
-#define WT_STAT_CONN_LOG_ZERO_FILLS 1262
+#define WT_STAT_CONN_LOG_ZERO_FILLS 1264
/*! log: log flush operations */
-#define WT_STAT_CONN_LOG_FLUSH 1263
+#define WT_STAT_CONN_LOG_FLUSH 1265
/*! log: log force write operations */
-#define WT_STAT_CONN_LOG_FORCE_WRITE 1264
+#define WT_STAT_CONN_LOG_FORCE_WRITE 1266
/*! log: log force write operations skipped */
-#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1265
+#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1267
/*! log: log records compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1266
+#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1268
/*! log: log records not compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1267
+#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1269
/*! log: log records too small to compress */
-#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1268
+#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1270
/*! log: log release advances write LSN */
-#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1269
+#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1271
/*! log: log scan operations */
-#define WT_STAT_CONN_LOG_SCANS 1270
+#define WT_STAT_CONN_LOG_SCANS 1272
/*! log: log scan records requiring two reads */
-#define WT_STAT_CONN_LOG_SCAN_REREADS 1271
+#define WT_STAT_CONN_LOG_SCAN_REREADS 1273
/*! log: log server thread advances write LSN */
-#define WT_STAT_CONN_LOG_WRITE_LSN 1272
+#define WT_STAT_CONN_LOG_WRITE_LSN 1274
/*! log: log server thread write LSN walk skipped */
-#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1273
+#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1275
/*! log: log sync operations */
-#define WT_STAT_CONN_LOG_SYNC 1274
+#define WT_STAT_CONN_LOG_SYNC 1276
/*! log: log sync time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DURATION 1275
+#define WT_STAT_CONN_LOG_SYNC_DURATION 1277
/*! log: log sync_dir operations */
-#define WT_STAT_CONN_LOG_SYNC_DIR 1276
+#define WT_STAT_CONN_LOG_SYNC_DIR 1278
/*! log: log sync_dir time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1277
+#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1279
/*! log: log write operations */
-#define WT_STAT_CONN_LOG_WRITES 1278
+#define WT_STAT_CONN_LOG_WRITES 1280
/*! log: logging bytes consolidated */
-#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1279
+#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1281
/*! log: maximum log file size */
-#define WT_STAT_CONN_LOG_MAX_FILESIZE 1280
+#define WT_STAT_CONN_LOG_MAX_FILESIZE 1282
/*! log: number of pre-allocated log files to create */
-#define WT_STAT_CONN_LOG_PREALLOC_MAX 1281
+#define WT_STAT_CONN_LOG_PREALLOC_MAX 1283
/*! log: pre-allocated log files not ready and missed */
-#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1282
+#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1284
/*! log: pre-allocated log files prepared */
-#define WT_STAT_CONN_LOG_PREALLOC_FILES 1283
+#define WT_STAT_CONN_LOG_PREALLOC_FILES 1285
/*! log: pre-allocated log files used */
-#define WT_STAT_CONN_LOG_PREALLOC_USED 1284
+#define WT_STAT_CONN_LOG_PREALLOC_USED 1286
/*! log: records processed by log scan */
-#define WT_STAT_CONN_LOG_SCAN_RECORDS 1285
+#define WT_STAT_CONN_LOG_SCAN_RECORDS 1287
/*! log: slot close lost race */
-#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1286
+#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1288
/*! log: slot close unbuffered waits */
-#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1287
+#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1289
/*! log: slot closures */
-#define WT_STAT_CONN_LOG_SLOT_CLOSES 1288
+#define WT_STAT_CONN_LOG_SLOT_CLOSES 1290
/*! log: slot join atomic update races */
-#define WT_STAT_CONN_LOG_SLOT_RACES 1289
+#define WT_STAT_CONN_LOG_SLOT_RACES 1291
/*! log: slot join calls atomic updates raced */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1290
+#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1292
/*! log: slot join calls did not yield */
-#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1291
+#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1293
/*! log: slot join calls found active slot closed */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1292
+#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1294
/*! log: slot join calls slept */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1293
+#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1295
/*! log: slot join calls yielded */
-#define WT_STAT_CONN_LOG_SLOT_YIELD 1294
+#define WT_STAT_CONN_LOG_SLOT_YIELD 1296
/*! log: slot join found active slot closed */
-#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1295
+#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1297
/*! log: slot joins yield time (usecs) */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1296
+#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1298
/*! log: slot transitions unable to find free slot */
-#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1297
+#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1299
/*! log: slot unbuffered writes */
-#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1298
+#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1300
/*! log: total in-memory size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_MEM 1299
+#define WT_STAT_CONN_LOG_COMPRESS_MEM 1301
/*! log: total log buffer size */
-#define WT_STAT_CONN_LOG_BUFFER_SIZE 1300
+#define WT_STAT_CONN_LOG_BUFFER_SIZE 1302
/*! log: total size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_LEN 1301
+#define WT_STAT_CONN_LOG_COMPRESS_LEN 1303
/*! log: written slots coalesced */
-#define WT_STAT_CONN_LOG_SLOT_COALESCED 1302
+#define WT_STAT_CONN_LOG_SLOT_COALESCED 1304
/*! log: yields waiting for previous log file close */
-#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1303
+#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1305
/*! perf: file system read latency histogram (bucket 1) - 10-49ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1304
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1306
/*! perf: file system read latency histogram (bucket 2) - 50-99ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1305
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1307
/*! perf: file system read latency histogram (bucket 3) - 100-249ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1306
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1308
/*! perf: file system read latency histogram (bucket 4) - 250-499ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1307
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1309
/*! perf: file system read latency histogram (bucket 5) - 500-999ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1308
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1310
/*! perf: file system read latency histogram (bucket 6) - 1000ms+ */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1309
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1311
/*! perf: file system write latency histogram (bucket 1) - 10-49ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1310
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1312
/*! perf: file system write latency histogram (bucket 2) - 50-99ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1311
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1313
/*! perf: file system write latency histogram (bucket 3) - 100-249ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1312
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1314
/*! perf: file system write latency histogram (bucket 4) - 250-499ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1313
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1315
/*! perf: file system write latency histogram (bucket 5) - 500-999ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1314
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1316
/*! perf: file system write latency histogram (bucket 6) - 1000ms+ */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1315
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1317
/*! perf: operation read latency histogram (bucket 1) - 100-249us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1316
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1318
/*! perf: operation read latency histogram (bucket 2) - 250-499us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1317
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1319
/*! perf: operation read latency histogram (bucket 3) - 500-999us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1318
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1320
/*! perf: operation read latency histogram (bucket 4) - 1000-9999us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1319
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1321
/*! perf: operation read latency histogram (bucket 5) - 10000us+ */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1320
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1322
/*! perf: operation write latency histogram (bucket 1) - 100-249us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1321
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1323
/*! perf: operation write latency histogram (bucket 2) - 250-499us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1322
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1324
/*! perf: operation write latency histogram (bucket 3) - 500-999us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1323
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1325
/*! perf: operation write latency histogram (bucket 4) - 1000-9999us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1324
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1326
/*! perf: operation write latency histogram (bucket 5) - 10000us+ */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1325
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1327
/*! reconciliation: approximate byte size of timestamps in pages written */
-#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1326
+#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1328
/*!
* reconciliation: approximate byte size of transaction IDs in pages
* written
*/
-#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1327
+#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1329
/*! reconciliation: fast-path pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1328
+#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1330
/*! reconciliation: maximum seconds spent in a reconciliation call */
-#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1329
+#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1331
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_CONN_REC_PAGES 1330
+#define WT_STAT_CONN_REC_PAGES 1332
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_CONN_REC_PAGES_EVICTION 1331
+#define WT_STAT_CONN_REC_PAGES_EVICTION 1333
/*!
* reconciliation: page reconciliation calls that resulted in values with
* prepared transaction metadata
*/
-#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1332
+#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1334
/*!
* reconciliation: page reconciliation calls that resulted in values with
* timestamps
*/
-#define WT_STAT_CONN_REC_PAGES_WITH_TS 1333
+#define WT_STAT_CONN_REC_PAGES_WITH_TS 1335
/*!
* reconciliation: page reconciliation calls that resulted in values with
* transaction ids
*/
-#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1334
+#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1336
/*! reconciliation: pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE 1335
+#define WT_STAT_CONN_REC_PAGE_DELETE 1337
/*!
* reconciliation: pages written including an aggregated newest start
* durable timestamp
*/
-#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1336
+#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1338
/*!
* reconciliation: pages written including an aggregated newest stop
* durable timestamp
*/
-#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1337
+#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1339
/*!
* reconciliation: pages written including an aggregated newest stop
* timestamp
*/
-#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1338
+#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1340
/*!
* reconciliation: pages written including an aggregated newest stop
* transaction ID
*/
-#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1339
+#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1341
/*!
* reconciliation: pages written including an aggregated oldest start
* timestamp
*/
-#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1340
+#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1342
/*!
* reconciliation: pages written including an aggregated oldest start
* transaction ID
*/
-#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TXN 1341
+#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TXN 1343
/*! reconciliation: pages written including an aggregated prepare */
-#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1342
+#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1344
/*! reconciliation: pages written including at least one prepare state */
-#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1343
+#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1345
/*!
* reconciliation: pages written including at least one start durable
* timestamp
*/
-#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1344
+#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1346
/*! reconciliation: pages written including at least one start timestamp */
-#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1345
+#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1347
/*!
* reconciliation: pages written including at least one start transaction
* ID
*/
-#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1346
+#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1348
/*!
* reconciliation: pages written including at least one stop durable
* timestamp
*/
-#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1347
+#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1349
/*! reconciliation: pages written including at least one stop timestamp */
-#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1348
+#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1350
/*!
* reconciliation: pages written including at least one stop transaction
* ID
*/
-#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1349
+#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1351
/*! reconciliation: records written including a prepare state */
-#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1350
+#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1352
/*! reconciliation: records written including a start durable timestamp */
-#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1351
+#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1353
/*! reconciliation: records written including a start timestamp */
-#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1352
+#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1354
/*! reconciliation: records written including a start transaction ID */
-#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1353
+#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1355
/*! reconciliation: records written including a stop durable timestamp */
-#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1354
+#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1356
/*! reconciliation: records written including a stop timestamp */
-#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1355
+#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1357
/*! reconciliation: records written including a stop transaction ID */
-#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1356
+#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1358
/*! reconciliation: split bytes currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1357
+#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1359
/*! reconciliation: split objects currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1358
+#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1360
/*! session: open session count */
-#define WT_STAT_CONN_SESSION_OPEN 1359
+#define WT_STAT_CONN_SESSION_OPEN 1361
/*! session: session query timestamp calls */
-#define WT_STAT_CONN_SESSION_QUERY_TS 1360
+#define WT_STAT_CONN_SESSION_QUERY_TS 1362
/*! session: table alter failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1361
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1363
/*! session: table alter successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1362
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1364
/*! session: table alter unchanged and skipped */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1363
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1365
/*! session: table compact failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1364
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1366
/*! session: table compact successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1365
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1367
/*! session: table create failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1366
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1368
/*! session: table create successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1367
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1369
/*! session: table drop failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1368
+#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1370
/*! session: table drop successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1369
+#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1371
/*! session: table import failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1370
+#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1372
/*! session: table import successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1371
+#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1373
/*! session: table rebalance failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1372
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1374
/*! session: table rebalance successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1373
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1375
/*! session: table rename failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1374
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1376
/*! session: table rename successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1375
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1377
/*! session: table salvage failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1376
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1378
/*! session: table salvage successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1377
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1379
/*! session: table truncate failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1378
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1380
/*! session: table truncate successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1379
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1381
/*! session: table verify failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1380
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1382
/*! session: table verify successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1381
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1383
/*! thread-state: active filesystem fsync calls */
-#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1382
+#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1384
/*! thread-state: active filesystem read calls */
-#define WT_STAT_CONN_THREAD_READ_ACTIVE 1383
+#define WT_STAT_CONN_THREAD_READ_ACTIVE 1385
/*! thread-state: active filesystem write calls */
-#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1384
+#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1386
/*! thread-yield: application thread time evicting (usecs) */
-#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1385
+#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1387
/*! thread-yield: application thread time waiting for cache (usecs) */
-#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1386
+#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1388
/*!
* thread-yield: connection close blocked waiting for transaction state
* stabilization
*/
-#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1387
+#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1389
/*! thread-yield: connection close yielded for lsm manager shutdown */
-#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1388
+#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1390
/*! thread-yield: data handle lock yielded */
-#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1389
+#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1391
/*!
* thread-yield: get reference for page index and slot time sleeping
* (usecs)
*/
-#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1390
+#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1392
/*! thread-yield: log server sync yielded for log write */
-#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1391
+#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1393
/*! thread-yield: page access yielded due to prepare state change */
-#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1392
+#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1394
/*! thread-yield: page acquire busy blocked */
-#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1393
+#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1395
/*! thread-yield: page acquire eviction blocked */
-#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1394
+#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1396
/*! thread-yield: page acquire locked blocked */
-#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1395
+#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1397
/*! thread-yield: page acquire read blocked */
-#define WT_STAT_CONN_PAGE_READ_BLOCKED 1396
+#define WT_STAT_CONN_PAGE_READ_BLOCKED 1398
/*! thread-yield: page acquire time sleeping (usecs) */
-#define WT_STAT_CONN_PAGE_SLEEP 1397
+#define WT_STAT_CONN_PAGE_SLEEP 1399
/*!
* thread-yield: page delete rollback time sleeping for state change
* (usecs)
*/
-#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1398
+#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1400
/*! thread-yield: page reconciliation yielded due to child modification */
-#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1399
+#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1401
/*! transaction: Number of prepared updates */
-#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1400
+#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1402
/*! transaction: durable timestamp queue entries walked */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1401
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1403
/*! transaction: durable timestamp queue insert to empty */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1402
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1404
/*! transaction: durable timestamp queue inserts to head */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1403
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1405
/*! transaction: durable timestamp queue inserts total */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1404
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1406
/*! transaction: durable timestamp queue length */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1405
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1407
/*! transaction: prepared transactions */
-#define WT_STAT_CONN_TXN_PREPARE 1406
+#define WT_STAT_CONN_TXN_PREPARE 1408
/*! transaction: prepared transactions committed */
-#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1407
+#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1409
/*! transaction: prepared transactions currently active */
-#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1408
+#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1410
/*! transaction: prepared transactions rolled back */
-#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1409
+#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1411
/*! transaction: query timestamp calls */
-#define WT_STAT_CONN_TXN_QUERY_TS 1410
+#define WT_STAT_CONN_TXN_QUERY_TS 1412
/*! transaction: read timestamp queue entries walked */
-#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1411
+#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1413
/*! transaction: read timestamp queue insert to empty */
-#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1412
+#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1414
/*! transaction: read timestamp queue inserts to head */
-#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1413
+#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1415
/*! transaction: read timestamp queue inserts total */
-#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1414
+#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1416
/*! transaction: read timestamp queue length */
-#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1415
+#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1417
/*! transaction: rollback to stable calls */
-#define WT_STAT_CONN_TXN_RTS 1416
+#define WT_STAT_CONN_TXN_RTS 1418
/*!
* 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 1417
+#define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1419
/*! transaction: rollback to stable keys removed */
-#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1418
+#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1420
/*! transaction: rollback to stable keys restored */
-#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1419
+#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1421
/*! transaction: rollback to stable pages visited */
-#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1420
+#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1422
/*! transaction: rollback to stable restored tombstones from history store */
-#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1421
+#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1423
/*! transaction: rollback to stable skipping internal pages tree walk */
-#define WT_STAT_CONN_TXN_RTS_SKIP_INTERAL_PAGES_WALK 1422
+#define WT_STAT_CONN_TXN_RTS_SKIP_INTERAL_PAGES_WALK 1424
/*! transaction: rollback to stable sweeping history store keys */
-#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1423
+#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1425
/*! transaction: rollback to stable updates aborted */
-#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1424
+#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1426
/*! transaction: rollback to stable updates removed from history store */
-#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1425
+#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1427
/*! transaction: set timestamp calls */
-#define WT_STAT_CONN_TXN_SET_TS 1426
+#define WT_STAT_CONN_TXN_SET_TS 1428
/*! transaction: set timestamp durable calls */
-#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1427
+#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1429
/*! transaction: set timestamp durable updates */
-#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1428
+#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1430
/*! transaction: set timestamp oldest calls */
-#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1429
+#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1431
/*! transaction: set timestamp oldest updates */
-#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1430
+#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1432
/*! transaction: set timestamp stable calls */
-#define WT_STAT_CONN_TXN_SET_TS_STABLE 1431
+#define WT_STAT_CONN_TXN_SET_TS_STABLE 1433
/*! transaction: set timestamp stable updates */
-#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1432
+#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1434
/*! transaction: transaction begins */
-#define WT_STAT_CONN_TXN_BEGIN 1433
+#define WT_STAT_CONN_TXN_BEGIN 1435
/*! transaction: transaction checkpoint currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1434
+#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1436
/*! transaction: transaction checkpoint generation */
-#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1435
+#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1437
/*!
* transaction: transaction checkpoint history store file duration
* (usecs)
*/
-#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1436
+#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1438
/*! transaction: transaction checkpoint max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1437
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1439
/*! transaction: transaction checkpoint min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1438
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1440
/*! transaction: transaction checkpoint most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1439
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1441
/*! transaction: transaction checkpoint prepare currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1440
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1442
/*! transaction: transaction checkpoint prepare max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1441
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1443
/*! transaction: transaction checkpoint prepare min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1442
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1444
/*! transaction: transaction checkpoint prepare most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1443
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1445
/*! transaction: transaction checkpoint prepare total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1444
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1446
/*! transaction: transaction checkpoint scrub dirty target */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1445
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1447
/*! transaction: transaction checkpoint scrub time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1446
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1448
/*! transaction: transaction checkpoint total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1447
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1449
/*! transaction: transaction checkpoints */
-#define WT_STAT_CONN_TXN_CHECKPOINT 1448
+#define WT_STAT_CONN_TXN_CHECKPOINT 1450
/*!
* transaction: transaction checkpoints skipped because database was
* clean
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1449
+#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1451
/*! transaction: transaction failures due to history store */
-#define WT_STAT_CONN_TXN_FAIL_CACHE 1450
+#define WT_STAT_CONN_TXN_FAIL_CACHE 1452
/*!
* transaction: transaction fsync calls for checkpoint after allocating
* the transaction ID
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1451
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1453
/*!
* transaction: transaction fsync duration for checkpoint after
* allocating the transaction ID (usecs)
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1452
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1454
/*! transaction: transaction range of IDs currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_RANGE 1453
+#define WT_STAT_CONN_TXN_PINNED_RANGE 1455
/*! transaction: transaction range of IDs currently pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1454
+#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1456
/*! transaction: transaction range of timestamps currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1455
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1457
/*! transaction: transaction range of timestamps pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1456
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1458
/*!
* transaction: transaction range of timestamps pinned by the oldest
* active read timestamp
*/
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1457
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1459
/*!
* transaction: transaction range of timestamps pinned by the oldest
* timestamp
*/
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1458
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1460
/*! transaction: transaction read timestamp of the oldest active reader */
-#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1459
+#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1461
/*! transaction: transaction sync calls */
-#define WT_STAT_CONN_TXN_SYNC 1460
+#define WT_STAT_CONN_TXN_SYNC 1462
/*! transaction: transactions committed */
-#define WT_STAT_CONN_TXN_COMMIT 1461
+#define WT_STAT_CONN_TXN_COMMIT 1463
/*! transaction: transactions rolled back */
-#define WT_STAT_CONN_TXN_ROLLBACK 1462
+#define WT_STAT_CONN_TXN_ROLLBACK 1464
/*! transaction: update conflicts */
-#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1463
+#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1465
/*!
* @}
@@ -6356,186 +6363,193 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_TOTAL 2107
/*! cursor: Total number of entries skipped by cursor prev calls */
#define WT_STAT_DSRC_CURSOR_PREV_SKIP_TOTAL 2108
+/*!
+ * cursor: Total number of entries skipped to position the history store
+ * cursor
+ */
+#define WT_STAT_DSRC_CURSOR_SKIP_HS_CUR_POSITION 2109
/*! cursor: bulk loaded cursor insert calls */
-#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2109
+#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2110
/*! cursor: cache cursors reuse count */
-#define WT_STAT_DSRC_CURSOR_REOPEN 2110
+#define WT_STAT_DSRC_CURSOR_REOPEN 2111
/*! cursor: close calls that result in cache */
-#define WT_STAT_DSRC_CURSOR_CACHE 2111
+#define WT_STAT_DSRC_CURSOR_CACHE 2112
/*! cursor: create calls */
-#define WT_STAT_DSRC_CURSOR_CREATE 2112
+#define WT_STAT_DSRC_CURSOR_CREATE 2113
/*!
* cursor: cursor next calls that skip greater than or equal to 100
* entries
*/
-#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100 2113
+#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100 2114
/*! cursor: cursor next calls that skip less than 100 entries */
-#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100 2114
+#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100 2115
/*!
* cursor: cursor prev calls that skip greater than or equal to 100
* entries
*/
-#define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100 2115
+#define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100 2116
/*! cursor: cursor prev calls that skip less than 100 entries */
-#define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100 2116
+#define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100 2117
/*! cursor: insert calls */
-#define WT_STAT_DSRC_CURSOR_INSERT 2117
+#define WT_STAT_DSRC_CURSOR_INSERT 2118
/*! cursor: insert key and value bytes */
-#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2118
+#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2119
/*! cursor: modify */
-#define WT_STAT_DSRC_CURSOR_MODIFY 2119
+#define WT_STAT_DSRC_CURSOR_MODIFY 2120
/*! cursor: modify key and value bytes affected */
-#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2120
+#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2121
/*! cursor: modify value bytes modified */
-#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2121
+#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2122
/*! cursor: next calls */
-#define WT_STAT_DSRC_CURSOR_NEXT 2122
+#define WT_STAT_DSRC_CURSOR_NEXT 2123
/*! cursor: open cursor count */
-#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2123
+#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2124
/*! cursor: operation restarted */
-#define WT_STAT_DSRC_CURSOR_RESTART 2124
+#define WT_STAT_DSRC_CURSOR_RESTART 2125
/*! cursor: prev calls */
-#define WT_STAT_DSRC_CURSOR_PREV 2125
+#define WT_STAT_DSRC_CURSOR_PREV 2126
/*! cursor: remove calls */
-#define WT_STAT_DSRC_CURSOR_REMOVE 2126
+#define WT_STAT_DSRC_CURSOR_REMOVE 2127
/*! cursor: remove key bytes removed */
-#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2127
+#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2128
/*! cursor: reserve calls */
-#define WT_STAT_DSRC_CURSOR_RESERVE 2128
+#define WT_STAT_DSRC_CURSOR_RESERVE 2129
/*! cursor: reset calls */
-#define WT_STAT_DSRC_CURSOR_RESET 2129
+#define WT_STAT_DSRC_CURSOR_RESET 2130
/*! cursor: search calls */
-#define WT_STAT_DSRC_CURSOR_SEARCH 2130
+#define WT_STAT_DSRC_CURSOR_SEARCH 2131
+/*! cursor: search history store calls */
+#define WT_STAT_DSRC_CURSOR_SEARCH_HS 2132
/*! cursor: search near calls */
-#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2131
+#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2133
/*! cursor: truncate calls */
-#define WT_STAT_DSRC_CURSOR_TRUNCATE 2132
+#define WT_STAT_DSRC_CURSOR_TRUNCATE 2134
/*! cursor: update calls */
-#define WT_STAT_DSRC_CURSOR_UPDATE 2133
+#define WT_STAT_DSRC_CURSOR_UPDATE 2135
/*! cursor: update key and value bytes */
-#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2134
+#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2136
/*! cursor: update value size change */
-#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2135
+#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2137
/*! history: history pages added for eviction during garbage collection */
-#define WT_STAT_DSRC_HS_GC_PAGES_EVICT 2136
+#define WT_STAT_DSRC_HS_GC_PAGES_EVICT 2138
/*! history: history pages removed for garbage collection */
-#define WT_STAT_DSRC_HS_GC_PAGES_REMOVED 2137
+#define WT_STAT_DSRC_HS_GC_PAGES_REMOVED 2139
/*! history: history pages visited for garbage collection */
-#define WT_STAT_DSRC_HS_GC_PAGES_VISITED 2138
+#define WT_STAT_DSRC_HS_GC_PAGES_VISITED 2140
/*! reconciliation: approximate byte size of timestamps in pages written */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2139
+#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2141
/*!
* reconciliation: approximate byte size of transaction IDs in pages
* written
*/
-#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2140
+#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2142
/*! reconciliation: dictionary matches */
-#define WT_STAT_DSRC_REC_DICTIONARY 2141
+#define WT_STAT_DSRC_REC_DICTIONARY 2143
/*! reconciliation: fast-path pages deleted */
-#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2142
+#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2144
/*!
* reconciliation: internal page key bytes discarded using suffix
* compression
*/
-#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2143
+#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2145
/*! reconciliation: internal page multi-block writes */
-#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2144
+#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2146
/*! reconciliation: internal-page overflow keys */
-#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2145
+#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2147
/*! reconciliation: leaf page key bytes discarded using prefix compression */
-#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2146
+#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2148
/*! reconciliation: leaf page multi-block writes */
-#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2147
+#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2149
/*! reconciliation: leaf-page overflow keys */
-#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2148
+#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2150
/*! reconciliation: maximum blocks required for a page */
-#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2149
+#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2151
/*! reconciliation: overflow values written */
-#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2150
+#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2152
/*! reconciliation: page checksum matches */
-#define WT_STAT_DSRC_REC_PAGE_MATCH 2151
+#define WT_STAT_DSRC_REC_PAGE_MATCH 2153
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_DSRC_REC_PAGES 2152
+#define WT_STAT_DSRC_REC_PAGES 2154
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_DSRC_REC_PAGES_EVICTION 2153
+#define WT_STAT_DSRC_REC_PAGES_EVICTION 2155
/*! reconciliation: pages deleted */
-#define WT_STAT_DSRC_REC_PAGE_DELETE 2154
+#define WT_STAT_DSRC_REC_PAGE_DELETE 2156
/*!
* reconciliation: pages written including an aggregated newest start
* durable timestamp
*/
-#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2155
+#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2157
/*!
* reconciliation: pages written including an aggregated newest stop
* durable timestamp
*/
-#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2156
+#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2158
/*!
* reconciliation: pages written including an aggregated newest stop
* timestamp
*/
-#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2157
+#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2159
/*!
* reconciliation: pages written including an aggregated newest stop
* transaction ID
*/
-#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2158
+#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2160
/*!
* reconciliation: pages written including an aggregated oldest start
* timestamp
*/
-#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2159
+#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2161
/*!
* reconciliation: pages written including an aggregated oldest start
* transaction ID
*/
-#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TXN 2160
+#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TXN 2162
/*! reconciliation: pages written including an aggregated prepare */
-#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2161
+#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2163
/*! reconciliation: pages written including at least one prepare */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2162
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2164
/*!
* reconciliation: pages written including at least one start durable
* timestamp
*/
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2163
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2165
/*! reconciliation: pages written including at least one start timestamp */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2164
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2166
/*!
* reconciliation: pages written including at least one start transaction
* ID
*/
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2165
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2167
/*!
* reconciliation: pages written including at least one stop durable
* timestamp
*/
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2166
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2168
/*! reconciliation: pages written including at least one stop timestamp */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2167
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2169
/*!
* reconciliation: pages written including at least one stop transaction
* ID
*/
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2168
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2170
/*! reconciliation: records written including a prepare */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2169
+#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2171
/*! reconciliation: records written including a start durable timestamp */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2170
+#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2172
/*! reconciliation: records written including a start timestamp */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2171
+#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2173
/*! reconciliation: records written including a start transaction ID */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2172
+#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2174
/*! reconciliation: records written including a stop durable timestamp */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2173
+#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2175
/*! reconciliation: records written including a stop timestamp */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2174
+#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2176
/*! reconciliation: records written including a stop transaction ID */
-#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2175
+#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2177
/*! session: object compaction */
-#define WT_STAT_DSRC_SESSION_COMPACT 2176
+#define WT_STAT_DSRC_SESSION_COMPACT 2178
/*! transaction: update conflicts */
-#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2177
+#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2179
/*!
* @}
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_row.c b/src/third_party/wiredtiger/src/reconcile/rec_row.c
index 0bf79f2802a..dd072d57cf6 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_row.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_row.c
@@ -770,9 +770,11 @@ __wt_rec_row_leaf(
/*
* If we reconcile an on disk key with a globally visible stop time point and there are no
- * new updates for that key, skip writing that key.
+ * new updates for that key, skip writing that key. Don't do this additional cleanup work if
+ * a checkpoint is doing the work - we need that to be as streamlined as possible.
*/
- if (upd == NULL && __wt_txn_tw_stop_visible_all(session, &tw))
+ if (upd == NULL && !F_ISSET(r, WT_REC_CHECKPOINT) &&
+ __wt_txn_tw_stop_visible_all(session, &tw))
upd = &upd_tombstone;
/* Build value cell. */
diff --git a/src/third_party/wiredtiger/src/support/cond_auto.c b/src/third_party/wiredtiger/src/support/cond_auto.c
index f07cf2fd2a7..c5a43e6d67c 100644
--- a/src/third_party/wiredtiger/src/support/cond_auto.c
+++ b/src/third_party/wiredtiger/src/support/cond_auto.c
@@ -42,7 +42,7 @@ void
__wt_cond_auto_wait_signal(WT_SESSION_IMPL *session, WT_CONDVAR *cond, bool progress,
bool (*run_func)(WT_SESSION_IMPL *), bool *signalled)
{
- uint64_t delta;
+ uint64_t delta, saved_prev_wait;
/*
* Catch cases where this function is called with a condition variable that wasn't initialized
@@ -55,7 +55,15 @@ __wt_cond_auto_wait_signal(WT_SESSION_IMPL *session, WT_CONDVAR *cond, bool prog
cond->prev_wait = cond->min_wait;
else {
delta = WT_MAX(1, (cond->max_wait - cond->min_wait) / 10);
- cond->prev_wait = WT_MIN(cond->max_wait, cond->prev_wait + delta);
+ /*
+ * Try to update the previous wait value for the condition variable. There can be multiple
+ * threads doing this concurrently, so use atomic operations to make sure the value remains
+ * within the bounds of the maximum configured. Don't retry if our update didn't make it in
+ * - it's not necessary for the previous wait time to be updated every time.
+ */
+ WT_ORDERED_READ(saved_prev_wait, cond->prev_wait);
+ __wt_atomic_cas64(
+ &cond->prev_wait, saved_prev_wait, WT_MIN(cond->max_wait, saved_prev_wait + delta));
}
__wt_cond_wait_signal(session, cond, cond->prev_wait, run_func, signalled);
diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c
index 92f0e13f268..bfcb7f43a0c 100644
--- a/src/third_party/wiredtiger/src/support/stat.c
+++ b/src/third_party/wiredtiger/src/support/stat.c
@@ -75,6 +75,7 @@ static const char *const __stats_dsrc_desc[] = {
"compression: page written was too small to compress",
"cursor: Total number of entries skipped by cursor next calls",
"cursor: Total number of entries skipped by cursor prev calls",
+ "cursor: Total number of entries skipped to position the history store cursor",
"cursor: bulk loaded cursor insert calls", "cursor: cache cursors reuse count",
"cursor: close calls that result in cache", "cursor: create calls",
"cursor: cursor next calls that skip greater than or equal to 100 entries",
@@ -86,8 +87,8 @@ static const char *const __stats_dsrc_desc[] = {
"cursor: next calls", "cursor: open cursor count", "cursor: operation restarted",
"cursor: prev calls", "cursor: remove calls", "cursor: remove key bytes removed",
"cursor: reserve calls", "cursor: reset calls", "cursor: search calls",
- "cursor: search near calls", "cursor: truncate calls", "cursor: update calls",
- "cursor: update key and value bytes", "cursor: update value size change",
+ "cursor: search history store calls", "cursor: search near calls", "cursor: truncate calls",
+ "cursor: update calls", "cursor: update key and value bytes", "cursor: update value size change",
"history: history pages added for eviction during garbage collection",
"history: history pages removed for garbage collection",
"history: history pages visited for garbage collection",
@@ -272,6 +273,7 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats)
stats->compress_write_too_small = 0;
stats->cursor_next_skip_total = 0;
stats->cursor_prev_skip_total = 0;
+ stats->cursor_skip_hs_cur_position = 0;
stats->cursor_insert_bulk = 0;
stats->cursor_reopen = 0;
stats->cursor_cache = 0;
@@ -294,6 +296,7 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats)
stats->cursor_reserve = 0;
stats->cursor_reset = 0;
stats->cursor_search = 0;
+ stats->cursor_search_hs = 0;
stats->cursor_search_near = 0;
stats->cursor_truncate = 0;
stats->cursor_update = 0;
@@ -476,6 +479,7 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to)
to->compress_write_too_small += from->compress_write_too_small;
to->cursor_next_skip_total += from->cursor_next_skip_total;
to->cursor_prev_skip_total += from->cursor_prev_skip_total;
+ to->cursor_skip_hs_cur_position += from->cursor_skip_hs_cur_position;
to->cursor_insert_bulk += from->cursor_insert_bulk;
to->cursor_reopen += from->cursor_reopen;
to->cursor_cache += from->cursor_cache;
@@ -498,6 +502,7 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to)
to->cursor_reserve += from->cursor_reserve;
to->cursor_reset += from->cursor_reset;
to->cursor_search += from->cursor_search;
+ to->cursor_search_hs += from->cursor_search_hs;
to->cursor_search_near += from->cursor_search_near;
to->cursor_truncate += from->cursor_truncate;
to->cursor_update += from->cursor_update;
@@ -678,6 +683,7 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to)
to->compress_write_too_small += WT_STAT_READ(from, compress_write_too_small);
to->cursor_next_skip_total += WT_STAT_READ(from, cursor_next_skip_total);
to->cursor_prev_skip_total += WT_STAT_READ(from, cursor_prev_skip_total);
+ to->cursor_skip_hs_cur_position += WT_STAT_READ(from, cursor_skip_hs_cur_position);
to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk);
to->cursor_reopen += WT_STAT_READ(from, cursor_reopen);
to->cursor_cache += WT_STAT_READ(from, cursor_cache);
@@ -700,6 +706,7 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to)
to->cursor_reserve += WT_STAT_READ(from, cursor_reserve);
to->cursor_reset += WT_STAT_READ(from, cursor_reset);
to->cursor_search += WT_STAT_READ(from, cursor_search);
+ to->cursor_search_hs += WT_STAT_READ(from, cursor_search_hs);
to->cursor_search_near += WT_STAT_READ(from, cursor_search_near);
to->cursor_truncate += WT_STAT_READ(from, cursor_truncate);
to->cursor_update += WT_STAT_READ(from, cursor_update);
@@ -884,8 +891,9 @@ static const char *const __stats_connection_desc[] = {
"connection: pthread mutex shared lock write-lock calls", "connection: total fsync I/Os",
"connection: total read I/Os", "connection: total write I/Os",
"cursor: Total number of entries skipped by cursor next calls",
- "cursor: Total number of entries skipped by cursor prev calls", "cursor: cached cursor count",
- "cursor: cursor bulk loaded cursor insert calls",
+ "cursor: Total number of entries skipped by cursor prev calls",
+ "cursor: Total number of entries skipped to position the history store cursor",
+ "cursor: cached cursor count", "cursor: cursor bulk loaded cursor insert calls",
"cursor: cursor close calls that result in cache", "cursor: cursor create calls",
"cursor: cursor insert calls", "cursor: cursor insert key and value bytes",
"cursor: cursor modify calls", "cursor: cursor modify key and value bytes affected",
@@ -896,7 +904,8 @@ static const char *const __stats_connection_desc[] = {
"cursor: cursor prev calls that skip greater than or equal to 100 entries",
"cursor: cursor prev calls that skip less than 100 entries", "cursor: cursor remove calls",
"cursor: cursor remove key bytes removed", "cursor: cursor reserve calls",
- "cursor: cursor reset calls", "cursor: cursor search calls", "cursor: cursor search near calls",
+ "cursor: cursor reset calls", "cursor: cursor search calls",
+ "cursor: cursor search history store calls", "cursor: cursor search near calls",
"cursor: cursor sweep buckets", "cursor: cursor sweep cursors closed",
"cursor: cursor sweep cursors examined", "cursor: cursor sweeps", "cursor: cursor truncate calls",
"cursor: cursor update calls", "cursor: cursor update key and value bytes",
@@ -1317,6 +1326,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
stats->write_io = 0;
stats->cursor_next_skip_total = 0;
stats->cursor_prev_skip_total = 0;
+ stats->cursor_skip_hs_cur_position = 0;
/* not clearing cursor_cached_count */
stats->cursor_insert_bulk = 0;
stats->cursor_cache = 0;
@@ -1338,6 +1348,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
stats->cursor_reserve = 0;
stats->cursor_reset = 0;
stats->cursor_search = 0;
+ stats->cursor_search_hs = 0;
stats->cursor_search_near = 0;
stats->cursor_sweep_buckets = 0;
stats->cursor_sweep_closed = 0;
@@ -1816,6 +1827,7 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS *
to->write_io += WT_STAT_READ(from, write_io);
to->cursor_next_skip_total += WT_STAT_READ(from, cursor_next_skip_total);
to->cursor_prev_skip_total += WT_STAT_READ(from, cursor_prev_skip_total);
+ to->cursor_skip_hs_cur_position += WT_STAT_READ(from, cursor_skip_hs_cur_position);
to->cursor_cached_count += WT_STAT_READ(from, cursor_cached_count);
to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk);
to->cursor_cache += WT_STAT_READ(from, cursor_cache);
@@ -1837,6 +1849,7 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS *
to->cursor_reserve += WT_STAT_READ(from, cursor_reserve);
to->cursor_reset += WT_STAT_READ(from, cursor_reset);
to->cursor_search += WT_STAT_READ(from, cursor_search);
+ to->cursor_search_hs += WT_STAT_READ(from, cursor_search_hs);
to->cursor_search_near += WT_STAT_READ(from, cursor_search_near);
to->cursor_sweep_buckets += WT_STAT_READ(from, cursor_sweep_buckets);
to->cursor_sweep_closed += WT_STAT_READ(from, cursor_sweep_closed);
diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c
index 11aac26e2b5..b63dadbf9b5 100644
--- a/src/third_party/wiredtiger/src/txn/txn.c
+++ b/src/third_party/wiredtiger/src/txn/txn.c
@@ -711,6 +711,7 @@ __txn_append_hs_record(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, WT_ITEM *
/* If the history store record has a valid stop time point, append it. */
if (hs_stop_durable_ts != WT_TS_MAX) {
+ WT_ASSERT(session, hs_cbt->upd_value->tw.stop_ts != WT_TS_MAX);
WT_ERR(__wt_upd_alloc(session, NULL, WT_UPDATE_TOMBSTONE, &tombstone, &size));
tombstone->durable_ts = hs_cbt->upd_value->tw.durable_stop_ts;
tombstone->start_ts = hs_cbt->upd_value->tw.stop_ts;
@@ -945,8 +946,8 @@ __txn_resolve_prepared_op(WT_SESSION_IMPL *session, WT_TXN_OP *op, bool commit,
* Scan the history store for the given btree and key with maximum start timestamp to let
* the search point to the last version of the key.
*/
- WT_ERR_NOTFOUND_OK(
- __wt_hs_cursor_position(session, hs_cursor, hs_btree_id, &op->u.op_row.key, WT_TS_MAX),
+ WT_ERR_NOTFOUND_OK(__wt_hs_cursor_position(
+ session, hs_cursor, hs_btree_id, &op->u.op_row.key, WT_TS_MAX, NULL),
true);
if (ret == 0)
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 7b89d4f21d3..956711943ed 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
@@ -169,6 +169,7 @@ __rollback_row_ondisk_fixup_key(WT_SESSION_IMPL *session, WT_PAGE *page, WT_ROW
hs_durable_ts = hs_start_ts = hs_stop_durable_ts = WT_TS_NONE;
hs_btree_id = S2BT(session)->id;
session_flags = 0;
+ WT_CLEAR(full_value);
is_owner = valid_update_found = false;
#ifdef HAVE_DIAGNOSTIC
first_record = true;
@@ -182,7 +183,6 @@ __rollback_row_ondisk_fixup_key(WT_SESSION_IMPL *session, WT_PAGE *page, WT_ROW
WT_ERR(__wt_row_leaf_key(session, page, rip, key, false));
/* Get the full update value from the data store. */
- WT_CLEAR(full_value);
unpack = &_unpack;
__wt_row_leaf_value_cell(session, page, rip, NULL, unpack);
WT_ERR(__wt_page_cell_data_ref(session, page, unpack, &full_value));
@@ -201,7 +201,7 @@ __rollback_row_ondisk_fixup_key(WT_SESSION_IMPL *session, WT_PAGE *page, WT_ROW
* into data store and removed from history store. If none of the history store records satisfy
* the given timestamp, the key is removed from data store.
*/
- ret = __wt_hs_cursor_position(session, hs_cursor, hs_btree_id, key, WT_TS_MAX);
+ ret = __wt_hs_cursor_position(session, hs_cursor, hs_btree_id, key, WT_TS_MAX, NULL);
for (; ret == 0; ret = hs_cursor->prev(hs_cursor)) {
WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, hs_key, &hs_start_ts, &hs_counter));
@@ -365,9 +365,9 @@ err:
__wt_free_update_list(session, &upd);
__wt_free_update_list(session, &hs_upd);
}
- __wt_scr_free(session, &key);
__wt_scr_free(session, &hs_key);
__wt_scr_free(session, &hs_value);
+ __wt_scr_free(session, &key);
__wt_buf_free(session, &full_value);
WT_TRET(__wt_hs_cursor_close(session, session_flags, is_owner));
return (ret);
@@ -389,7 +389,9 @@ __rollback_abort_row_ondisk_kv(
bool prepared;
vpack = &_vpack;
+ WT_CLEAR(buf);
upd = NULL;
+
__wt_row_leaf_value_cell(session, page, rip, NULL, vpack);
prepared = vpack->tw.prepare;
if (WT_IS_HS(S2BT(session))) {
@@ -429,18 +431,15 @@ __rollback_abort_row_ondisk_kv(
/*
* Clear the remove operation from the key by inserting the original on-disk value as a
* standard update.
- */
- WT_CLEAR(buf);
-
- /*
- * If a value is simple(no compression), and is globally visible at the time of reading a
- * page into cache, we encode its location into the WT_ROW.
+ *
+ * Take the value from the original page cell. If a value is simple(no compression), and is
+ * globally visible at the time of reading a page into cache, we encode its location into
+ * the WT_ROW. Otherwise, read it from the page.
*/
if (!__wt_row_leaf_value(page, rip, &buf))
- /* Take the value from the original page cell. */
WT_RET(__wt_page_cell_data_ref(session, page, vpack, &buf));
- WT_RET(__wt_upd_alloc(session, &buf, WT_UPDATE_STANDARD, &upd, NULL));
+ WT_ERR(__wt_upd_alloc(session, &buf, WT_UPDATE_STANDARD, &upd, NULL));
upd->txnid = vpack->tw.start_txn;
upd->durable_ts = vpack->tw.durable_start_ts;
upd->start_ts = vpack->tw.start_ts;
@@ -459,9 +458,10 @@ __rollback_abort_row_ondisk_kv(
return (0);
WT_ERR(__rollback_row_add_update(session, page, rip, upd));
- return (0);
+ upd = NULL;
err:
+ __wt_buf_free(session, &buf);
__wt_free(session, upd);
return (ret);
}
diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
index b565282dad1..8c69211d563 100644
--- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
@@ -85,7 +85,7 @@ static volatile uint64_t global_ts = 1;
#define ENV_CONFIG_DEF \
"cache_size=20M,create," \
"debug_mode=(table_logging=true,checkpoint_retention=5)," \
- "eviction_dirty_trigger=100," \
+ "eviction_dirty_trigger=50,eviction_updates_trigger=50," \
"log=(archive=true,file_max=10M,enabled),session_max=%d," \
"statistics=(fast),statistics_log=(wait=1,json=true),"
#define ENV_CONFIG_TXNSYNC \
@@ -127,11 +127,14 @@ static WT_THREAD_RET
thread_ts_run(void *arg)
{
WT_DECL_RET;
+ WT_RAND_STATE rnd;
WT_SESSION *session;
THREAD_DATA *td;
+ int dbg;
char tscfg[64], ts_string[WT_TS_HEX_STRING_SIZE];
td = (THREAD_DATA *)arg;
+ __wt_random_init(&rnd);
testutil_check(td->conn->open_session(td->conn, NULL, NULL, &session));
/* Update the oldest timestamp every 1 millisecond. */
@@ -152,6 +155,18 @@ thread_ts_run(void *arg)
testutil_check(__wt_snprintf(tscfg, sizeof(tscfg),
"oldest_timestamp=%s,stable_timestamp=%s", ts_string, ts_string));
testutil_check(td->conn->set_timestamp(td->conn, tscfg));
+ /*
+ * Set and reset the checkpoint retention setting on a regular basis. We want to test
+ * racing with the internal archive thread while we're here.
+ */
+ dbg = __wt_random(&rnd) % 2;
+ if (dbg == 0)
+ testutil_check(
+ __wt_snprintf(tscfg, sizeof(tscfg), "debug_mode=(checkpoint_retention=0)"));
+ else
+ testutil_check(
+ __wt_snprintf(tscfg, sizeof(tscfg), "debug_mode=(checkpoint_retention=5)"));
+ testutil_check(td->conn->reconfigure(td->conn, tscfg));
}
__wt_sleep(0, 1000);
}
diff --git a/src/third_party/wiredtiger/test/suite/test_debug_mode02.py b/src/third_party/wiredtiger/test/suite/test_debug_mode02.py
index da6ea168774..d2dfd47bb23 100644
--- a/src/third_party/wiredtiger/test/suite/test_debug_mode02.py
+++ b/src/third_party/wiredtiger/test/suite/test_debug_mode02.py
@@ -26,11 +26,12 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
+from suite_subprocess import suite_subprocess
import fnmatch, os, time, wiredtiger, wttest
# test_debug_mode02.py
# Test the debug mode settings. Test checkpoint_retention use.
-class test_debug_mode02(wttest.WiredTigerTestCase):
+class test_debug_mode02(wttest.WiredTigerTestCase, suite_subprocess):
uri = 'file:test_debug'
entries = 100
@@ -91,18 +92,41 @@ class test_debug_mode02(wttest.WiredTigerTestCase):
self.assertTrue(os.path.exists(self.log1))
self.advance_log_checkpoint()
self.check_archive(self.log1)
+ self.conn.reconfigure("debug_mode=(table_logging=true)")
+ self.conn.reconfigure("verbose=(temporary)")
# Test that both zero and one archive as usual. And test reconfigure.
- def test_checkpoint_retain_off(self):
+ def test_checkpoint_retain_reconfig(self):
+ # We can turn checkpoint retention off.
+ # We can turn checkpoint retention on to some value.
+ # We can reconfigure checkpoint retention to the same value.
+ # We cannot reconfigure checkpoint retention to another value.
+ # We can turn checkpoint retention off again.
+ # We can reconfigure checkpoint retention to the original value.
self.conn.reconfigure("debug_mode=(checkpoint_retention=0)")
self.session.create(self.uri, 'key_format=i,value_format=i')
-
self.advance_log_checkpoint()
self.check_archive(self.log1)
- self.conn.reconfigure("debug_mode=(checkpoint_retention=1)")
+ cfg = 'debug_mode=(checkpoint_retention=%d)' % self.retain
+ self.conn.reconfigure(cfg)
+ self.advance_log_checkpoint()
+ self.assertTrue(os.path.exists(self.log2))
+
+ self.conn.reconfigure(cfg)
+ self.advance_log_checkpoint()
+ self.assertTrue(os.path.exists(self.log2))
+
+ msg = '/Cannot change value/'
+ cfg1 = 'debug_mode=(checkpoint_retention=%d)' % (self.retain - 1)
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.conn.reconfigure(cfg1), msg)
+
+ self.conn.reconfigure("debug_mode=(checkpoint_retention=0)")
self.advance_log_checkpoint()
self.check_archive(self.log2)
+ self.conn.reconfigure(cfg)
+
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_hs03.py b/src/third_party/wiredtiger/test/suite/test_prepare_hs03.py
index 946a6597447..dbf6b92ed09 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare_hs03.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare_hs03.py
@@ -40,7 +40,8 @@ def timestamp_str(t):
# test to ensure salvage, verify & simulating crash are working for prepared transactions.
class test_prepare_hs03(wttest.WiredTigerTestCase):
# Force a small cache.
- conn_config = 'cache_size=50MB,statistics=(fast)'
+ conn_config = ('cache_size=50MB,statistics=(fast),'
+ 'eviction_dirty_trigger=50,eviction_updates_trigger=50')
# Create a small table.
uri = "table:test_prepare_hs03"
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp04.py b/src/third_party/wiredtiger/test/suite/test_timestamp04.py
index fd7d24050d7..b3795ad8da6 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp04.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp04.py
@@ -45,9 +45,12 @@ class test_timestamp04(wttest.WiredTigerTestCase, suite_subprocess):
table_nots_nolog = 'table:ts04_nots_nologged'
conncfg = [
- ('nolog', dict(conn_config='', using_log=False)),
- ('V1', dict(conn_config=',log=(enabled),compatibility=(release="2.9")', using_log=True)),
- ('V2', dict(conn_config=',log=(enabled)', using_log=True)),
+ ('nolog', dict(conn_config=',eviction_dirty_trigger=50,eviction_updates_trigger=50',
+ using_log=False)),
+ ('V1', dict(conn_config=',eviction_dirty_trigger=50,eviction_updates_trigger=50,' \
+ 'log=(enabled),compatibility=(release="2.9")', using_log=True)),
+ ('V2', dict(conn_config=',eviction_dirty_trigger=50,eviction_updates_trigger=50,' \
+ 'log=(enabled)', using_log=True)),
]
session_config = 'isolation=snapshot'
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp20.py b/src/third_party/wiredtiger/test/suite/test_timestamp20.py
new file mode 100644
index 00000000000..69aec301a47
--- /dev/null
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp20.py
@@ -0,0 +1,88 @@
+#!/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.
+
+import wiredtiger, wttest
+
+def timestamp_str(t):
+ return '%x' % t
+
+# test_timestamp20.py
+# Exercise fixing up of out-of-order updates in the history store.
+class test_timestamp20(wttest.WiredTigerTestCase):
+ conn_config = 'cache_size=50MB'
+ session_config = 'isolation=snapshot'
+
+ def test_timestamp20(self):
+ uri = 'table:test_timestamp20'
+ self.session.create(uri, 'key_format=S,value_format=S')
+ self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(1))
+ cursor = self.session.open_cursor(uri)
+
+ value1 = 'a' * 500
+ value2 = 'b' * 500
+ value3 = 'c' * 500
+ value4 = 'd' * 500
+ value5 = 'e' * 500
+
+ for i in range(1, 10000):
+ self.session.begin_transaction()
+ cursor[str(i)] = value1
+ self.session.commit_transaction('commit_timestamp=' + timestamp_str(10))
+
+ for i in range(1, 10000):
+ self.session.begin_transaction()
+ cursor[str(i)] = value2
+ self.session.commit_transaction('commit_timestamp=' + timestamp_str(20))
+
+ for i in range(1, 10000):
+ self.session.begin_transaction()
+ cursor[str(i)] = value3
+ self.session.commit_transaction('commit_timestamp=' + timestamp_str(30))
+
+ old_reader_session = self.conn.open_session()
+ old_reader_cursor = old_reader_session.open_cursor(uri)
+ old_reader_session.begin_transaction('read_timestamp=' + timestamp_str(30))
+
+ # Now put two updates out of order. 5 will go to the history store and will trigger a
+ # correction to the existing contents.
+ for i in range(1, 10000):
+ self.session.begin_transaction()
+ cursor[str(i)] = value4
+ self.session.commit_transaction('commit_timestamp=' + timestamp_str(5))
+ self.session.begin_transaction()
+ cursor[str(i)] = value5
+ self.session.commit_transaction('commit_timestamp=' + timestamp_str(40))
+
+ self.session.begin_transaction('read_timestamp=' + timestamp_str(30))
+ for i in range(1, 10000):
+ self.assertEqual(cursor[str(i)], value4)
+ self.session.rollback_transaction()
+
+ for i in range(1, 10000):
+ self.assertEqual(old_reader_cursor[str(i)], value3)
+ old_reader_session.rollback_transaction()