diff options
author | Luke Chen <luke.chen@mongodb.com> | 2021-03-25 13:33:19 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-25 02:53:07 +0000 |
commit | 7d1cf0943da755745baf61d86a20507594b6931d (patch) | |
tree | bcb8e7aaa1a4d87966ac70c96b082990d1857bc6 | |
parent | fbf13d24435cc05a04cbc56e560397e8b52d4ac9 (diff) | |
download | mongo-7d1cf0943da755745baf61d86a20507594b6931d.tar.gz |
Import wiredtiger: 0b64c3341b8617d22cf8482d4ed6fae6f1bed89b from branch mongodb-4.0
ref: c9d3a90c78..0b64c3341b
for: 4.0.24
WT-4296 Add aggressive mode to sweep server
WT-4614 Trigger sweep immediately to reclaim space after a table drop
WT-6309 Add support for start/stop arguments to wt printlog command
WT-6430 Move WT_CONN_SERVER flags into their own field
WT-7026 Atomically read and set ref->addr in case of race
WT-7028 Sweep thread shouldn't lock during checkpoint gathering handles
WT-7104 Redact user data from printlog output
38 files changed, 611 insertions, 362 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py index be87d821919..f1b21c37e76 100644 --- a/src/third_party/wiredtiger/dist/api_data.py +++ b/src/third_party/wiredtiger/dist/api_data.py @@ -645,8 +645,9 @@ connection_runtime_config = [ intended for use with internal stress testing of WiredTiger.''', type='list', undoc=True, choices=[ - 'checkpoint_slow', 'lookaside_sweep_race', 'split_1', 'split_2', - 'split_3', 'split_4', 'split_5', 'split_6', 'split_7', 'split_8']), + 'aggressive_sweep', 'checkpoint_slow', 'lookaside_sweep_race', + 'split_1', 'split_2', 'split_3', 'split_4', 'split_5', 'split_6', + 'split_7', 'split_8']), Config('verbose', '', r''' enable messages for various events. Options are given as a list, such as <code>"verbose=[evictserver,read]"</code>''', diff --git a/src/third_party/wiredtiger/dist/log.py b/src/third_party/wiredtiger/dist/log.py index b2c5b5d1af9..694dbb57d07 100644 --- a/src/third_party/wiredtiger/dist/log.py +++ b/src/third_party/wiredtiger/dist/log.py @@ -86,6 +86,19 @@ def printf_setup(f, i, nl_indent): def n_setup(f): return len(field_types[f[0]][4]) +# Check for an operation that has a file id type. Redact any user data +# if the redact flag is set, but print operations for file id 0, known +# to be the metadata. +def check_redact(optype): + for f in optype.fields: + if f[0] == 'uint32_id': + redact_str = '\tif (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && ' + redact_str += '%s != WT_METAFILE_ID) {\n' % (f[1]) + redact_str += '\t\tWT_RET(__wt_fprintf(session, args->fs, " REDACTED"));\n' + redact_str += '\t\treturn (0);\n\t}\n' + return redact_str + return '' + # Create a printf line, with an optional setup function. # ishex indicates that the the field name in the output is modified # (to add "-hex"), and that the setup and printf are conditional @@ -287,6 +300,7 @@ __wt_logop_%(name)s_print(WT_SESSION_IMPL *session, \t%(arg_init)sWT_RET(__wt_logop_%(name)s_unpack( \t session, pp, end%(arg_addrs)s)); +\t%(redact)s \tWT_RET(__wt_fprintf(session, args->fs, \t " \\"optype\\": \\"%(name)s\\",\\n")); %(print_args)s @@ -303,6 +317,7 @@ __wt_logop_%(name)s_print(WT_SESSION_IMPL *session, 'arg_fini' : ('\nerr:\t__wt_free(session, escaped);\n\treturn (ret);' if has_escape(optype.fields) else '\treturn (0);'), 'arg_addrs' : ''.join(', &%s' % f[1] for f in optype.fields), + 'redact' : check_redact(optype), 'print_args' : ('\t' + '\n\t'.join(printf_line(f, optype, i, s) for i,f in enumerate(optype.fields) for s in range(0, n_setup(f))) if optype.fields else ''), diff --git a/src/third_party/wiredtiger/dist/s_string.ok b/src/third_party/wiredtiger/dist/s_string.ok index 17beab0f05f..a555e4d3254 100644 --- a/src/third_party/wiredtiger/dist/s_string.ok +++ b/src/third_party/wiredtiger/dist/s_string.ok @@ -993,6 +993,7 @@ multithreaded munmap mutex mutexes +mux mytable mytxn namespace @@ -1169,6 +1170,7 @@ rwlock sH sHQ sT +sanitizer sanitizers scalability sched diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index 5ebee776e95..8a89202ea15 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -375,6 +375,7 @@ connection_stats = [ DhandleStat('dh_sweep_close', 'connection sweep dhandles closed'), DhandleStat('dh_sweep_ref', 'connection sweep candidate became referenced'), DhandleStat('dh_sweep_remove', 'connection sweep dhandles removed from hash list'), + DhandleStat('dh_sweep_skip_ckpt', 'connection sweeps skipped due to checkpoint gathering handles'), DhandleStat('dh_sweep_tod', 'connection sweep time-of-death sets'), DhandleStat('dh_sweeps', 'connection sweeps'), diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index a3650819c1b..0790d91d4e8 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.0", - "commit": "c9d3a90c78a12f747f283022eda9b6e140cc6dd1" + "commit": "0b64c3341b8617d22cf8482d4ed6fae6f1bed89b" } diff --git a/src/third_party/wiredtiger/src/async/async_api.c b/src/third_party/wiredtiger/src/async/async_api.c index fde309b2e3b..748e0f035a2 100644 --- a/src/third_party/wiredtiger/src/async/async_api.c +++ b/src/third_party/wiredtiger/src/async/async_api.c @@ -238,7 +238,7 @@ __async_start(WT_SESSION_IMPL *session) /* * Start up the worker threads. */ - F_SET(conn, WT_CONN_SERVER_ASYNC); + FLD_SET(conn->server_flags, WT_CONN_SERVER_ASYNC); for (i = 0; i < conn->async_workers; i++) { /* * Each worker has its own session. We set both a general server flag in the connection and @@ -417,7 +417,7 @@ __wt_async_destroy(WT_SESSION_IMPL *session) if (!conn->async_cfg) return (0); - F_CLR(conn, WT_CONN_SERVER_ASYNC); + FLD_CLR(conn->server_flags, WT_CONN_SERVER_ASYNC); for (i = 0; i < conn->async_workers; i++) WT_TRET(__wt_thread_join(session, &async->worker_tids[i])); __wt_cond_destroy(session, &async->flush_cond); diff --git a/src/third_party/wiredtiger/src/async/async_worker.c b/src/third_party/wiredtiger/src/async/async_worker.c index 8fdd4cba4b4..3fbcb753445 100644 --- a/src/third_party/wiredtiger/src/async/async_worker.c +++ b/src/third_party/wiredtiger/src/async/async_worker.c @@ -51,7 +51,7 @@ retry: } if (!F_ISSET(session, WT_SESSION_SERVER_ASYNC)) return (0); - if (!F_ISSET(conn, WT_CONN_SERVER_ASYNC)) + if (!FLD_ISSET(conn->server_flags, WT_CONN_SERVER_ASYNC)) return (0); WT_ORDERED_READ(last_consume, async->alloc_tail); } @@ -278,7 +278,8 @@ __wt_async_worker(void *arg) worker.num_cursors = 0; TAILQ_INIT(&worker.cursorqh); - while (F_ISSET(conn, WT_CONN_SERVER_ASYNC) && F_ISSET(session, WT_SESSION_SERVER_ASYNC)) { + while (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_ASYNC) && + F_ISSET(session, WT_SESSION_SERVER_ASYNC)) { WT_ERR(__async_op_dequeue(conn, session, &op)); if (op != NULL && op != &async->flush_op) { /* diff --git a/src/third_party/wiredtiger/src/btree/bt_split.c b/src/third_party/wiredtiger/src/btree/bt_split.c index 80d523ae5ee..7f4ad6cc7e1 100644 --- a/src/third_party/wiredtiger/src/btree/bt_split.c +++ b/src/third_party/wiredtiger/src/btree/bt_split.c @@ -1030,8 +1030,8 @@ __split_internal(WT_SESSION_IMPL *session, WT_PAGE *parent, WT_PAGE *page) * The newly allocated child's page index references the same structures as the parent. (We * cannot move WT_REF structures, threads may be underneath us right now changing the * structure state.) However, if the WT_REF structures reference on-page information, we - * have to fix that, because the disk image for the page that has an page index entry for - * the WT_REF is about to be discarded. + * have to fix that, because the disk image for the page that has a page index entry for the + * WT_REF is about to be discarded. */ child_pindex = WT_INTL_INDEX_GET_SAFE(child); child_incr = 0; diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c index 452da4dc0ab..f7acbff8363 100644 --- a/src/third_party/wiredtiger/src/config/config_def.c +++ b/src/third_party/wiredtiger/src/config/config_def.c @@ -127,9 +127,9 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = { {"statistics_log", "category", NULL, NULL, confchk_WT_CONNECTION_reconfigure_statistics_log_subconfigs, 5}, {"timing_stress_for_test", "list", NULL, - "choices=[\"checkpoint_slow\",\"lookaside_sweep_race\"," - "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," - "\"split_6\",\"split_7\",\"split_8\"]", + "choices=[\"aggressive_sweep\",\"checkpoint_slow\"," + "\"lookaside_sweep_race\",\"split_1\",\"split_2\",\"split_3\"," + "\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]", NULL, 0}, {"verbose", "list", NULL, "choices=[\"api\",\"block\",\"checkpoint\"," @@ -560,9 +560,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, - "choices=[\"checkpoint_slow\",\"lookaside_sweep_race\"," - "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," - "\"split_6\",\"split_7\",\"split_8\"]", + "choices=[\"aggressive_sweep\",\"checkpoint_slow\"," + "\"lookaside_sweep_race\",\"split_1\",\"split_2\",\"split_3\"," + "\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, @@ -628,9 +628,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, - "choices=[\"checkpoint_slow\",\"lookaside_sweep_race\"," - "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," - "\"split_6\",\"split_7\",\"split_8\"]", + "choices=[\"aggressive_sweep\",\"checkpoint_slow\"," + "\"lookaside_sweep_race\",\"split_1\",\"split_2\",\"split_3\"," + "\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, @@ -696,9 +696,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, - "choices=[\"checkpoint_slow\",\"lookaside_sweep_race\"," - "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," - "\"split_6\",\"split_7\",\"split_8\"]", + "choices=[\"aggressive_sweep\",\"checkpoint_slow\"," + "\"lookaside_sweep_race\",\"split_1\",\"split_2\",\"split_3\"," + "\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, @@ -762,9 +762,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, - "choices=[\"checkpoint_slow\",\"lookaside_sweep_race\"," - "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," - "\"split_6\",\"split_7\",\"split_8\"]", + "choices=[\"aggressive_sweep\",\"checkpoint_slow\"," + "\"lookaside_sweep_race\",\"split_1\",\"split_2\",\"split_3\"," + "\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c index b08aeb9d762..11351b3bd13 100644 --- a/src/third_party/wiredtiger/src/conn/conn_api.c +++ b/src/third_party/wiredtiger/src/conn/conn_api.c @@ -1987,6 +1987,7 @@ __wt_timing_stress_config(WT_SESSION_IMPL *session, const char *cfg[]) * point where race conditions aren't encountered. */ static const WT_NAME_FLAG stress_types[] = { + {"aggressive_sweep", WT_TIMING_STRESS_AGGRESSIVE_SWEEP}, {"checkpoint_slow", WT_TIMING_STRESS_CHECKPOINT_SLOW}, {"lookaside_sweep_race", WT_TIMING_STRESS_LOOKASIDE_SWEEP}, {"split_1", WT_TIMING_STRESS_SPLIT_1}, {"split_2", WT_TIMING_STRESS_SPLIT_2}, diff --git a/src/third_party/wiredtiger/src/conn/conn_capacity.c b/src/third_party/wiredtiger/src/conn/conn_capacity.c index ca4449aef21..beba22be04e 100644 --- a/src/third_party/wiredtiger/src/conn/conn_capacity.c +++ b/src/third_party/wiredtiger/src/conn/conn_capacity.c @@ -72,7 +72,7 @@ __capacity_config(WT_SESSION_IMPL *session, const char *cfg[]) static bool __capacity_server_run_chk(WT_SESSION_IMPL *session) { - return (F_ISSET(S2C(session), WT_CONN_SERVER_CAPACITY)); + return (FLD_ISSET(S2C(session)->server_flags, WT_CONN_SERVER_CAPACITY)); } /* @@ -129,7 +129,7 @@ __capacity_server_start(WT_CONNECTION_IMPL *conn) { WT_SESSION_IMPL *session; - F_SET(conn, WT_CONN_SERVER_CAPACITY); + FLD_SET(conn->server_flags, WT_CONN_SERVER_CAPACITY); /* * The capacity server gets its own session. @@ -197,7 +197,7 @@ __wt_capacity_server_destroy(WT_SESSION_IMPL *session) conn = S2C(session); - F_CLR(conn, WT_CONN_SERVER_CAPACITY); + FLD_CLR(conn->server_flags, WT_CONN_SERVER_CAPACITY); if (conn->capacity_tid_set) { __wt_cond_signal(session, conn->capacity_cond); WT_TRET(__wt_thread_join(session, &conn->capacity_tid)); diff --git a/src/third_party/wiredtiger/src/conn/conn_ckpt.c b/src/third_party/wiredtiger/src/conn/conn_ckpt.c index 68a437be046..9ee93562b81 100644 --- a/src/third_party/wiredtiger/src/conn/conn_ckpt.c +++ b/src/third_party/wiredtiger/src/conn/conn_ckpt.c @@ -64,7 +64,7 @@ __ckpt_server_config(WT_SESSION_IMPL *session, const char **cfg, bool *startp) static bool __ckpt_server_run_chk(WT_SESSION_IMPL *session) { - return (F_ISSET(S2C(session), WT_CONN_SERVER_CHECKPOINT)); + return (FLD_ISSET(S2C(session)->server_flags, WT_CONN_SERVER_CHECKPOINT)); } /* @@ -135,7 +135,7 @@ __ckpt_server_start(WT_CONNECTION_IMPL *conn) if (conn->ckpt_session != NULL) return (0); - F_SET(conn, WT_CONN_SERVER_CHECKPOINT); + FLD_SET(conn->server_flags, WT_CONN_SERVER_CHECKPOINT); /* * The checkpoint server gets its own session. @@ -203,7 +203,7 @@ __wt_checkpoint_server_destroy(WT_SESSION_IMPL *session) conn = S2C(session); - F_CLR(conn, WT_CONN_SERVER_CHECKPOINT); + FLD_CLR(conn->server_flags, WT_CONN_SERVER_CHECKPOINT); if (conn->ckpt_tid_set) { __wt_cond_signal(session, conn->ckpt_cond); WT_TRET(__wt_thread_join(session, &conn->ckpt_tid)); diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c index cb801c2967a..ac07af4463d 100644 --- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c +++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c @@ -600,6 +600,7 @@ __wt_conn_btree_apply(WT_SESSION_IMPL *session, const char *uri, conn->ckpt_apply = conn->ckpt_skip = 0; conn->ckpt_apply_time = conn->ckpt_skip_time = 0; time_start = __wt_clock(session); + F_SET(conn, WT_CONN_CKPT_GATHER); } for (dhandle = NULL;;) { WT_WITH_HANDLE_LIST_READ_LOCK( @@ -615,6 +616,7 @@ __wt_conn_btree_apply(WT_SESSION_IMPL *session, const char *uri, } done: if (WT_SESSION_IS_CHECKPOINT(session)) { + F_CLR(conn, WT_CONN_CKPT_GATHER); time_stop = __wt_clock(session); time_diff = WT_CLOCKDIFF_US(time_stop, time_start); WT_STAT_CONN_SET(session, txn_checkpoint_handle_applied, conn->ckpt_apply); @@ -628,6 +630,7 @@ done: } err: + F_CLR(conn, WT_CONN_CKPT_GATHER); WT_DHANDLE_RELEASE(dhandle); return (ret); } diff --git a/src/third_party/wiredtiger/src/conn/conn_log.c b/src/third_party/wiredtiger/src/conn/conn_log.c index 3266aa2ad1e..b4a61eef8cb 100644 --- a/src/third_party/wiredtiger/src/conn/conn_log.c +++ b/src/third_party/wiredtiger/src/conn/conn_log.c @@ -481,7 +481,7 @@ __wt_log_truncate_files(WT_SESSION_IMPL *session, WT_CURSOR *cursor, bool force) conn = S2C(session); if (!FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED)) return (0); - if (!force && F_ISSET(conn, WT_CONN_SERVER_LOG) && + if (!force && FLD_ISSET(conn->server_flags, WT_CONN_SERVER_LOG) && FLD_ISSET(conn->log_flags, WT_CONN_LOG_ARCHIVE)) WT_RET_MSG(session, EINVAL, "Attempt to archive manually while a server is running"); @@ -525,7 +525,7 @@ __log_file_server(void *arg) log = conn->log; locked = false; yield_count = 0; - while (F_ISSET(conn, WT_CONN_SERVER_LOG)) { + while (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_LOG)) { /* * If there is a log file to close, make sure any outstanding write operations have * completed, then fsync and close it. @@ -800,7 +800,7 @@ __log_wrlsn_server(void *arg) log = conn->log; yield = 0; WT_INIT_LSN(&prev); - while (F_ISSET(conn, WT_CONN_SERVER_LOG)) { + while (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_LOG)) { /* * Write out any log record buffers if anything was done since last time. Only call the * function to walk the slots if the system is not idle. On an idle system the alloc_lsn @@ -870,7 +870,7 @@ __log_server(void *arg) * records sitting in the buffer over the time it takes to sync out an earlier file. */ did_work = true; - while (F_ISSET(conn, WT_CONN_SERVER_LOG)) { + while (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_LOG)) { /* * Slots depend on future activity. Force out buffered writes in case we are idle. This * cannot be part of the wrlsn thread because of interaction advancing the write_lsn and a @@ -1003,7 +1003,7 @@ __wt_logmgr_open(WT_SESSION_IMPL *session) if (!FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED)) return (0); - F_SET(conn, WT_CONN_SERVER_LOG); + FLD_SET(conn->server_flags, WT_CONN_SERVER_LOG); /* * Start the log close thread. It is not configurable. If logging is enabled, this thread runs. @@ -1072,7 +1072,7 @@ __wt_logmgr_destroy(WT_SESSION_IMPL *session) conn = S2C(session); - F_CLR(conn, WT_CONN_SERVER_LOG); + FLD_CLR(conn->server_flags, WT_CONN_SERVER_LOG); if (!FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED)) { /* diff --git a/src/third_party/wiredtiger/src/conn/conn_stat.c b/src/third_party/wiredtiger/src/conn/conn_stat.c index 24397ed0666..9b6e324bd60 100644 --- a/src/third_party/wiredtiger/src/conn/conn_stat.c +++ b/src/third_party/wiredtiger/src/conn/conn_stat.c @@ -543,7 +543,7 @@ __statlog_on_close(WT_SESSION_IMPL *session) if (!FLD_ISSET(conn->stat_flags, WT_STAT_ON_CLOSE)) return (0); - if (F_ISSET(conn, WT_CONN_SERVER_STATISTICS)) + if (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_STATISTICS)) WT_RET_MSG(session, EINVAL, "Attempt to log statistics while a server is running"); WT_RET(__wt_scr_alloc(session, strlen(conn->stat_path) + 128, &tmp)); @@ -562,7 +562,7 @@ err: static bool __statlog_server_run_chk(WT_SESSION_IMPL *session) { - return (F_ISSET(S2C(session), WT_CONN_SERVER_STATISTICS)); + return (FLD_ISSET(S2C(session)->server_flags, WT_CONN_SERVER_STATISTICS)); } /* @@ -629,7 +629,7 @@ __statlog_start(WT_CONNECTION_IMPL *conn) if (conn->stat_session != NULL) return (0); - F_SET(conn, WT_CONN_SERVER_STATISTICS); + FLD_SET(conn->server_flags, WT_CONN_SERVER_STATISTICS); /* The statistics log server gets its own session. */ WT_RET(__wt_open_internal_session(conn, "statlog-server", true, 0, &conn->stat_session)); @@ -704,7 +704,7 @@ __wt_statlog_destroy(WT_SESSION_IMPL *session, bool is_close) conn = S2C(session); /* Stop the server thread. */ - F_CLR(conn, WT_CONN_SERVER_STATISTICS); + FLD_CLR(conn->server_flags, WT_CONN_SERVER_STATISTICS); if (conn->stat_tid_set) { __wt_cond_signal(session, conn->stat_cond); WT_TRET(__wt_thread_join(session, &conn->stat_tid)); diff --git a/src/third_party/wiredtiger/src/conn/conn_sweep.c b/src/third_party/wiredtiger/src/conn/conn_sweep.c index 54d3e103c23..8409271c0cd 100644 --- a/src/third_party/wiredtiger/src/conn/conn_sweep.c +++ b/src/third_party/wiredtiger/src/conn/conn_sweep.c @@ -252,7 +252,7 @@ __sweep_remove_handles(WT_SESSION_IMPL *session) static bool __sweep_server_run_chk(WT_SESSION_IMPL *session) { - return (F_ISSET(S2C(session), WT_CONN_SERVER_SWEEP)); + return (FLD_ISSET(S2C(session)->server_flags, WT_CONN_SERVER_SWEEP)); } /* @@ -266,13 +266,18 @@ __sweep_server(void *arg) WT_DECL_RET; WT_SESSION_IMPL *session; time_t last, now; - uint64_t last_las_sweep_id, min_sleep, oldest_id; + uint64_t last_las_sweep_id, min_sleep, oldest_id, sweep_interval; u_int dead_handles; + bool cv_signalled; session = arg; conn = S2C(session); last_las_sweep_id = WT_TXN_NONE; min_sleep = WT_MIN(WT_LAS_SWEEP_SEC, conn->sweep_interval); + if (FLD_ISSET(conn->timing_stress_flags, WT_TIMING_STRESS_AGGRESSIVE_SWEEP)) + sweep_interval = conn->sweep_interval / 10; + else + sweep_interval = conn->sweep_interval; /* * Sweep for dead and excess handles. @@ -280,7 +285,12 @@ __sweep_server(void *arg) __wt_seconds(session, &last); for (;;) { /* Wait until the next event. */ - __wt_cond_wait(session, conn->sweep_cond, min_sleep * WT_MILLION, __sweep_server_run_chk); + if (FLD_ISSET(conn->timing_stress_flags, WT_TIMING_STRESS_AGGRESSIVE_SWEEP)) + __wt_cond_wait_signal(session, conn->sweep_cond, min_sleep * 100 * WT_THOUSAND, + __sweep_server_run_chk, &cv_signalled); + else + __wt_cond_wait_signal(session, conn->sweep_cond, min_sleep * WT_MILLION, + __sweep_server_run_chk, &cv_signalled); /* Check if we're quitting or being reconfigured. */ if (!__sweep_server_run_chk(session)) @@ -299,8 +309,9 @@ __sweep_server(void *arg) * bringing in and evicting pages from the lookaside table, * which will stop the cache from moving into the stuck state. */ - if (now - last >= WT_LAS_SWEEP_SEC && !__wt_las_empty(session) && - !__wt_cache_stuck(session)) { + if ((FLD_ISSET(conn->timing_stress_flags, WT_TIMING_STRESS_AGGRESSIVE_SWEEP) || + now - last >= WT_LAS_SWEEP_SEC) && + !__wt_las_empty(session) && !__wt_cache_stuck(session)) { oldest_id = __wt_txn_oldest_id(session); if (WT_TXNID_LT(last_las_sweep_id, oldest_id)) { WT_ERR(__wt_las_sweep(session)); @@ -310,10 +321,18 @@ __sweep_server(void *arg) /* * See if it is time to sweep the data handles. Those are swept less frequently than the - * lookaside table by default and the frequency is controlled by a user setting. + * history store table by default and the frequency is controlled by a user setting. We want + * to avoid sweeping while checkpoint is gathering handles. Both need to lock the dhandle + * list and sweep acquiring that lock can interfere with checkpoint and cause it to take + * longer. Sweep is an operation that typically has long intervals so skipping some for + * checkpoint should have little impact. */ - if ((uint64_t)(now - last) < conn->sweep_interval) + if (!cv_signalled && ((uint64_t)(now - last) < sweep_interval)) + continue; + if (F_ISSET(conn, WT_CONN_CKPT_GATHER)) { + WT_STAT_CONN_INCR(session, dh_sweep_skip_ckpt); continue; + } WT_STAT_CONN_INCR(session, dh_sweeps); /* * Mark handles with a time of death, and report whether any handles are marked dead. If @@ -333,6 +352,9 @@ __sweep_server(void *arg) if (dead_handles > 0) WT_ERR(__sweep_remove_handles(session)); + + /* Remember the last sweep time. */ + last = now; } if (0) { @@ -387,7 +409,7 @@ __wt_sweep_create(WT_SESSION_IMPL *session) conn = S2C(session); /* Set first, the thread might run before we finish up. */ - F_SET(conn, WT_CONN_SERVER_SWEEP); + FLD_SET(conn->server_flags, WT_CONN_SERVER_SWEEP); /* * Handle sweep does enough I/O it may be called upon to perform slow operations for the block @@ -426,7 +448,7 @@ __wt_sweep_destroy(WT_SESSION_IMPL *session) conn = S2C(session); - F_CLR(conn, WT_CONN_SERVER_SWEEP); + FLD_CLR(conn->server_flags, WT_CONN_SERVER_SWEEP); if (conn->sweep_tid_set) { __wt_cond_signal(session, conn->sweep_cond); WT_TRET(__wt_thread_join(session, &conn->sweep_tid)); diff --git a/src/third_party/wiredtiger/src/cursor/cur_log.c b/src/third_party/wiredtiger/src/cursor/cur_log.c index ce72db0dbca..816c09d2d50 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_log.c +++ b/src/third_party/wiredtiger/src/cursor/cur_log.c @@ -208,7 +208,7 @@ __curlog_next(WT_CURSOR *cursor) */ if (cl->stepp == NULL || cl->stepp >= cl->stepp_end || !*cl->stepp) { cl->txnid = 0; - ret = __wt_log_scan(session, cl->next_lsn, WT_LOGSCAN_ONE, __curlog_logrec, cl); + ret = __wt_log_scan(session, cl->next_lsn, NULL, WT_LOGSCAN_ONE, __curlog_logrec, cl); if (ret == ENOENT) ret = WT_NOTFOUND; WT_ERR(ret); @@ -247,7 +247,7 @@ __curlog_search(WT_CURSOR *cursor) */ WT_ERR(__wt_cursor_get_key(cursor, &key_file, &key_offset, &counter)); WT_SET_LSN(&key, key_file, key_offset); - ret = __wt_log_scan(session, &key, WT_LOGSCAN_ONE, __curlog_logrec, cl); + ret = __wt_log_scan(session, &key, NULL, WT_LOGSCAN_ONE, __curlog_logrec, cl); if (ret == ENOENT) ret = WT_NOTFOUND; WT_ERR(ret); diff --git a/src/third_party/wiredtiger/src/include/btree.i b/src/third_party/wiredtiger/src/include/btree.i index 89915c05f42..48f0fa21a4b 100644 --- a/src/third_party/wiredtiger/src/include/btree.i +++ b/src/third_party/wiredtiger/src/include/btree.i @@ -646,14 +646,23 @@ __wt_off_page(WT_PAGE *page, const void *p) static inline void __wt_ref_addr_free(WT_SESSION_IMPL *session, WT_REF *ref) { - if (ref->addr == NULL) - return; + void *ref_addr; - if (ref->home == NULL || __wt_off_page(ref->home, ref->addr)) { - __wt_free(session, ((WT_ADDR *)ref->addr)->addr); - __wt_free(session, ref->addr); + /* + * The page being discarded may be the child of a page being split, where the WT_REF.addr field + * is being instantiated (as it can no longer reference the on-disk image). Loop until we read + * and clear the address without a race, then free the read address as necessary. + */ + do { + WT_ORDERED_READ(ref_addr, ref->addr); + if (ref_addr == NULL) + return; + } while (!__wt_atomic_cas_ptr(&ref->addr, ref_addr, NULL)); + + if (ref->home == NULL || __wt_off_page(ref->home, ref_addr)) { + __wt_free(session, ((WT_ADDR *)ref_addr)->addr); + __wt_free(session, ref_addr); } - ref->addr = NULL; } /* diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h index 35bf8785b86..2ca2ed5d655 100644 --- a/src/third_party/wiredtiger/src/include/connection.h +++ b/src/third_party/wiredtiger/src/include/connection.h @@ -468,16 +468,17 @@ struct __wt_connection_impl { * Variable with flags for which subsystems the diagnostic stress timing delays have been requested. */ /* AUTOMATIC FLAG VALUE GENERATION START */ -#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x001u -#define WT_TIMING_STRESS_LOOKASIDE_SWEEP 0x002u -#define WT_TIMING_STRESS_SPLIT_1 0x004u -#define WT_TIMING_STRESS_SPLIT_2 0x008u -#define WT_TIMING_STRESS_SPLIT_3 0x010u -#define WT_TIMING_STRESS_SPLIT_4 0x020u -#define WT_TIMING_STRESS_SPLIT_5 0x040u -#define WT_TIMING_STRESS_SPLIT_6 0x080u -#define WT_TIMING_STRESS_SPLIT_7 0x100u -#define WT_TIMING_STRESS_SPLIT_8 0x200u +#define WT_TIMING_STRESS_AGGRESSIVE_SWEEP 0x001u +#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x002u +#define WT_TIMING_STRESS_LOOKASIDE_SWEEP 0x004u +#define WT_TIMING_STRESS_SPLIT_1 0x008u +#define WT_TIMING_STRESS_SPLIT_2 0x010u +#define WT_TIMING_STRESS_SPLIT_3 0x020u +#define WT_TIMING_STRESS_SPLIT_4 0x040u +#define WT_TIMING_STRESS_SPLIT_5 0x080u +#define WT_TIMING_STRESS_SPLIT_6 0x100u +#define WT_TIMING_STRESS_SPLIT_7 0x200u +#define WT_TIMING_STRESS_SPLIT_8 0x400u /* AUTOMATIC FLAG VALUE GENERATION STOP */ uint64_t timing_stress_flags; @@ -490,34 +491,42 @@ struct __wt_connection_impl { */ WT_FILE_SYSTEM *file_system; +/* + * Server subsystem flags. + */ +/* AUTOMATIC FLAG VALUE GENERATION START */ +#define WT_CONN_SERVER_ASYNC 0x01u +#define WT_CONN_SERVER_CAPACITY 0x02u +#define WT_CONN_SERVER_CHECKPOINT 0x04u +#define WT_CONN_SERVER_LOG 0x08u +#define WT_CONN_SERVER_LSM 0x10u +#define WT_CONN_SERVER_STATISTICS 0x20u +#define WT_CONN_SERVER_SWEEP 0x40u + /* AUTOMATIC FLAG VALUE GENERATION STOP */ + uint32_t server_flags; + /* AUTOMATIC FLAG VALUE GENERATION START */ -#define WT_CONN_CACHE_CURSORS 0x0000001u -#define WT_CONN_CACHE_POOL 0x0000002u -#define WT_CONN_CKPT_SYNC 0x0000004u -#define WT_CONN_CLOSING 0x0000008u -#define WT_CONN_CLOSING_NO_MORE_OPENS 0x0000010u -#define WT_CONN_CLOSING_TIMESTAMP 0x0000020u -#define WT_CONN_COMPATIBILITY 0x0000040u -#define WT_CONN_DATA_CORRUPTION 0x0000080u -#define WT_CONN_EVICTION_NO_LOOKASIDE 0x0000100u -#define WT_CONN_EVICTION_RUN 0x0000200u -#define WT_CONN_IN_MEMORY 0x0000400u -#define WT_CONN_LEAK_MEMORY 0x0000800u -#define WT_CONN_LOOKASIDE_OPEN 0x0001000u -#define WT_CONN_LSM_MERGE 0x0002000u -#define WT_CONN_OPTRACK 0x0004000u -#define WT_CONN_PANIC 0x0008000u -#define WT_CONN_READONLY 0x0010000u -#define WT_CONN_RECOVERING 0x0020000u -#define WT_CONN_SALVAGE 0x0040000u -#define WT_CONN_SERVER_ASYNC 0x0080000u -#define WT_CONN_SERVER_CAPACITY 0x0100000u -#define WT_CONN_SERVER_CHECKPOINT 0x0200000u -#define WT_CONN_SERVER_LOG 0x0400000u -#define WT_CONN_SERVER_LSM 0x0800000u -#define WT_CONN_SERVER_STATISTICS 0x1000000u -#define WT_CONN_SERVER_SWEEP 0x2000000u -#define WT_CONN_WAS_BACKUP 0x4000000u +#define WT_CONN_CACHE_CURSORS 0x000001u +#define WT_CONN_CACHE_POOL 0x000002u +#define WT_CONN_CKPT_GATHER 0x000004u +#define WT_CONN_CKPT_SYNC 0x000008u +#define WT_CONN_CLOSING 0x000010u +#define WT_CONN_CLOSING_NO_MORE_OPENS 0x000020u +#define WT_CONN_CLOSING_TIMESTAMP 0x000040u +#define WT_CONN_COMPATIBILITY 0x000080u +#define WT_CONN_DATA_CORRUPTION 0x000100u +#define WT_CONN_EVICTION_NO_LOOKASIDE 0x000200u +#define WT_CONN_EVICTION_RUN 0x000400u +#define WT_CONN_IN_MEMORY 0x000800u +#define WT_CONN_LEAK_MEMORY 0x001000u +#define WT_CONN_LOOKASIDE_OPEN 0x002000u +#define WT_CONN_LSM_MERGE 0x004000u +#define WT_CONN_OPTRACK 0x008000u +#define WT_CONN_PANIC 0x010000u +#define WT_CONN_READONLY 0x020000u +#define WT_CONN_RECOVERING 0x040000u +#define WT_CONN_SALVAGE 0x080000u +#define WT_CONN_WAS_BACKUP 0x100000u /* AUTOMATIC FLAG VALUE GENERATION STOP */ uint32_t flags; }; diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h index 71e6d55340c..5d351709edb 100644 --- a/src/third_party/wiredtiger/src/include/extern.h +++ b/src/third_party/wiredtiger/src/include/extern.h @@ -779,9 +779,9 @@ extern int __wt_log_close(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, - int (*func)(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp, WT_LSN *next_lsnp, - void *cookie, int firstrecord), +extern int __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *start_lsnp, WT_LSN *end_lsnp, + uint32_t flags, int (*func)(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp, + WT_LSN *next_lsnp, void *cookie, int firstrecord), void *cookie) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_log_force_write(WT_SESSION_IMPL *session, bool retry, bool *did_work) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -1647,9 +1647,9 @@ extern int __wt_txn_checkpoint_log(WT_SESSION_IMPL *session, bool full, uint32_t extern int __wt_txn_truncate_log(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *start, WT_CURSOR_BTREE *stop) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern void __wt_txn_truncate_end(WT_SESSION_IMPL *session); -extern int __wt_txn_printlog(WT_SESSION *wt_session, const char *ofile, uint32_t flags) - WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))) - WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); +extern int __wt_txn_printlog(WT_SESSION *wt_session, const char *ofile, uint32_t flags, + WT_LSN *start_lsn, WT_LSN *end_lsn) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))) + WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_txn_named_snapshot_begin(WT_SESSION_IMPL *session, const char *cfg[]) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_txn_named_snapshot_drop(WT_SESSION_IMPL *session, const char *cfg[]) diff --git a/src/third_party/wiredtiger/src/include/log.h b/src/third_party/wiredtiger/src/include/log.h index 7810a32c4cc..f671f63c69e 100644 --- a/src/third_party/wiredtiger/src/include/log.h +++ b/src/third_party/wiredtiger/src/include/log.h @@ -49,8 +49,11 @@ union __wt_lsn { #define WT_LOG_ALIGN 128 /* - * Atomically set the two components of the LSN. + * Atomically set the LSN. There are two forms. We need WT_ASSIGN_LSN because some compilers (at + * least clang address sanitizer) does not do atomic 64-bit structure assignment so we need to + * explicitly assign the 64-bit field. And WT_SET_LSN atomically sets the LSN given a file/offset. */ +#define WT_ASSIGN_LSN(dstl, srcl) (dstl)->file_offset = (srcl)->file_offset #define WT_SET_LSN(l, f, o) (l)->file_offset = (((uint64_t)(f) << 32) + (o)) #define WT_INIT_LSN(l) WT_SET_LSN((l), 1, 0) @@ -394,8 +397,10 @@ struct __wt_txn_printlog_args { WT_FSTREAM *fs; /* AUTOMATIC FLAG VALUE GENERATION START */ -#define WT_TXN_PRINTLOG_HEX 0x1u /* Add hex output */ - /* AUTOMATIC FLAG VALUE GENERATION STOP */ +#define WT_TXN_PRINTLOG_HEX 0x1u /* Add hex output */ +#define WT_TXN_PRINTLOG_MSG 0x2u /* Messages only */ +#define WT_TXN_PRINTLOG_UNREDACT 0x4u /* Don't redact user data from output */ + /* AUTOMATIC FLAG VALUE GENERATION STOP */ uint32_t flags; }; diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index bedc8914272..3e3917d6267 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -510,6 +510,7 @@ struct __wt_connection_stats { int64_t dh_sweep_remove; int64_t dh_sweep_tod; int64_t dh_sweeps; + int64_t dh_sweep_skip_ckpt; int64_t dh_session_handles; int64_t dh_session_sweeps; int64_t lock_checkpoint_count; diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index 4270db64132..e7343783bdc 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -5229,459 +5229,464 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_DH_SWEEP_TOD 1202 /*! data-handle: connection sweeps */ #define WT_STAT_CONN_DH_SWEEPS 1203 +/*! + * data-handle: connection sweeps skipped due to checkpoint gathering + * handles + */ +#define WT_STAT_CONN_DH_SWEEP_SKIP_CKPT 1204 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1204 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1205 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1205 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1206 /*! lock: checkpoint lock acquisitions */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1206 +#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1207 /*! lock: checkpoint lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1207 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1208 /*! lock: checkpoint lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1208 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1209 /*! * lock: commit timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_APPLICATION 1209 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_APPLICATION 1210 /*! lock: commit timestamp queue lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_INTERNAL 1210 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_INTERNAL 1211 /*! lock: commit timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_READ_COUNT 1211 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_READ_COUNT 1212 /*! lock: commit timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WRITE_COUNT 1212 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WRITE_COUNT 1213 /*! lock: dhandle lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1213 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1214 /*! lock: dhandle lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1214 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1215 /*! lock: dhandle read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1215 +#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1216 /*! lock: dhandle write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1216 +#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1217 /*! lock: metadata lock acquisitions */ -#define WT_STAT_CONN_LOCK_METADATA_COUNT 1217 +#define WT_STAT_CONN_LOCK_METADATA_COUNT 1218 /*! lock: metadata lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1218 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1219 /*! lock: metadata lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1219 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1220 /*! * lock: read timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1220 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1221 /*! lock: read timestamp queue lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1221 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1222 /*! lock: read timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1222 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1223 /*! lock: read timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1223 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1224 /*! lock: schema lock acquisitions */ -#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1224 +#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1225 /*! lock: schema lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1225 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1226 /*! lock: schema lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1226 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1227 /*! * lock: table lock application thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1227 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1228 /*! * lock: table lock internal thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1228 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1229 /*! lock: table read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1229 +#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1230 /*! lock: table write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1230 +#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1231 /*! lock: txn global lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1231 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1232 /*! lock: txn global lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1232 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1233 /*! lock: txn global read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1233 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1234 /*! lock: txn global write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1234 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1235 /*! log: busy returns attempting to switch slots */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1235 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1236 /*! log: force archive time sleeping (usecs) */ -#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1236 +#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1237 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1237 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1238 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1238 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1239 /*! log: log files manually zero-filled */ -#define WT_STAT_CONN_LOG_ZERO_FILLS 1239 +#define WT_STAT_CONN_LOG_ZERO_FILLS 1240 /*! log: log flush operations */ -#define WT_STAT_CONN_LOG_FLUSH 1240 +#define WT_STAT_CONN_LOG_FLUSH 1241 /*! log: log force write operations */ -#define WT_STAT_CONN_LOG_FORCE_WRITE 1241 +#define WT_STAT_CONN_LOG_FORCE_WRITE 1242 /*! log: log force write operations skipped */ -#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1242 +#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1243 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1243 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1244 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1244 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1245 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1245 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1246 /*! log: log release advances write LSN */ -#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1246 +#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1247 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1247 +#define WT_STAT_CONN_LOG_SCANS 1248 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1248 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1249 /*! log: log server thread advances write LSN */ -#define WT_STAT_CONN_LOG_WRITE_LSN 1249 +#define WT_STAT_CONN_LOG_WRITE_LSN 1250 /*! log: log server thread write LSN walk skipped */ -#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1250 +#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1251 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1251 +#define WT_STAT_CONN_LOG_SYNC 1252 /*! log: log sync time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DURATION 1252 +#define WT_STAT_CONN_LOG_SYNC_DURATION 1253 /*! log: log sync_dir operations */ -#define WT_STAT_CONN_LOG_SYNC_DIR 1253 +#define WT_STAT_CONN_LOG_SYNC_DIR 1254 /*! log: log sync_dir time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1254 +#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1255 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1255 +#define WT_STAT_CONN_LOG_WRITES 1256 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1256 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1257 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1257 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1258 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1258 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1259 /*! log: pre-allocated log files not ready and missed */ -#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1259 +#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1260 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1260 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1261 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1261 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1262 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1262 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1263 /*! log: slot close lost race */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1263 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1264 /*! log: slot close unbuffered waits */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1264 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1265 /*! log: slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1265 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1266 /*! log: slot join atomic update races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1266 +#define WT_STAT_CONN_LOG_SLOT_RACES 1267 /*! log: slot join calls atomic updates raced */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1267 +#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1268 /*! log: slot join calls did not yield */ -#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1268 +#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1269 /*! log: slot join calls found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1269 +#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1270 /*! log: slot join calls slept */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1270 +#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1271 /*! log: slot join calls yielded */ -#define WT_STAT_CONN_LOG_SLOT_YIELD 1271 +#define WT_STAT_CONN_LOG_SLOT_YIELD 1272 /*! log: slot join found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1272 +#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1273 /*! log: slot joins yield time (usecs) */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1273 +#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1274 /*! log: slot transitions unable to find free slot */ -#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1274 +#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1275 /*! log: slot unbuffered writes */ -#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1275 +#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1276 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1276 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1277 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1277 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1278 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1278 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1279 /*! log: written slots coalesced */ -#define WT_STAT_CONN_LOG_SLOT_COALESCED 1279 +#define WT_STAT_CONN_LOG_SLOT_COALESCED 1280 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1280 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1281 /*! perf: file system read latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1281 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1282 /*! perf: file system read latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1282 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1283 /*! perf: file system read latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1283 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1284 /*! perf: file system read latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1284 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1285 /*! perf: file system read latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1285 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1286 /*! perf: file system read latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1286 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1287 /*! perf: file system write latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1287 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1288 /*! perf: file system write latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1288 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1289 /*! perf: file system write latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1289 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1290 /*! perf: file system write latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1290 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1291 /*! perf: file system write latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1291 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1292 /*! perf: file system write latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1292 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1293 /*! perf: operation read latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1293 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1294 /*! perf: operation read latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1294 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1295 /*! perf: operation read latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1295 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1296 /*! perf: operation read latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1296 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1297 /*! perf: operation read latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1297 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1298 /*! perf: operation write latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1298 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1299 /*! perf: operation write latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1299 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1300 /*! perf: operation write latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1300 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1301 /*! perf: operation write latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1301 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1302 /*! perf: operation write latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1302 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1303 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1303 +#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1304 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1304 +#define WT_STAT_CONN_REC_PAGES 1305 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1305 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1306 /*! reconciliation: pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE 1306 +#define WT_STAT_CONN_REC_PAGE_DELETE 1307 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1307 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1308 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1308 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1309 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1309 +#define WT_STAT_CONN_SESSION_OPEN 1310 /*! session: session query timestamp calls */ -#define WT_STAT_CONN_SESSION_QUERY_TS 1310 +#define WT_STAT_CONN_SESSION_QUERY_TS 1311 /*! session: table alter failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1311 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1312 /*! session: table alter successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1312 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1313 /*! session: table alter unchanged and skipped */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1313 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1314 /*! session: table compact failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1314 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1315 /*! session: table compact successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1315 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1316 /*! session: table create failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1316 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1317 /*! session: table create successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1317 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1318 /*! session: table drop failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1318 +#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1319 /*! session: table drop successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1319 +#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1320 /*! session: table rebalance failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1320 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1321 /*! session: table rebalance successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1321 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1322 /*! session: table rename failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1322 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1323 /*! session: table rename successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1323 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1324 /*! session: table salvage failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1324 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1325 /*! session: table salvage successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1325 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1326 /*! session: table truncate failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1326 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1327 /*! session: table truncate successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1327 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1328 /*! session: table verify failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1328 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1329 /*! session: table verify successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1329 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1330 /*! thread-state: active filesystem fsync calls */ -#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1330 +#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1331 /*! thread-state: active filesystem read calls */ -#define WT_STAT_CONN_THREAD_READ_ACTIVE 1331 +#define WT_STAT_CONN_THREAD_READ_ACTIVE 1332 /*! thread-state: active filesystem write calls */ -#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1332 +#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1333 /*! thread-yield: application thread time evicting (usecs) */ -#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1333 +#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1334 /*! thread-yield: application thread time waiting for cache (usecs) */ -#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1334 +#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1335 /*! * thread-yield: connection close blocked waiting for transaction state * stabilization */ -#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1335 +#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1336 /*! thread-yield: connection close yielded for lsm manager shutdown */ -#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1336 +#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1337 /*! thread-yield: data handle lock yielded */ -#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1337 +#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1338 /*! * thread-yield: get reference for page index and slot time sleeping * (usecs) */ -#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1338 +#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1339 /*! thread-yield: log server sync yielded for log write */ -#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1339 +#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1340 /*! thread-yield: page access yielded due to prepare state change */ -#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1340 +#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1341 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1341 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1342 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1342 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1343 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1343 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1344 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1344 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1345 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1345 +#define WT_STAT_CONN_PAGE_SLEEP 1346 /*! * thread-yield: page delete rollback time sleeping for state change * (usecs) */ -#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1346 +#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1347 /*! thread-yield: page reconciliation yielded due to child modification */ -#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1347 +#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1348 /*! transaction: Number of prepared updates */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1348 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1349 /*! transaction: Number of prepared updates added to cache overflow */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_LOOKASIDE_INSERTS 1349 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_LOOKASIDE_INSERTS 1350 /*! transaction: Number of prepared updates resolved */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_RESOLVED 1350 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_RESOLVED 1351 /*! transaction: commit timestamp queue entries walked */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_WALKED 1351 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_WALKED 1352 /*! transaction: commit timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_EMPTY 1352 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_EMPTY 1353 /*! transaction: commit timestamp queue inserts to head */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_HEAD 1353 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_HEAD 1354 /*! transaction: commit timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_INSERTS 1354 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_INSERTS 1355 /*! transaction: commit timestamp queue length */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_LEN 1355 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_LEN 1356 /*! transaction: number of named snapshots created */ -#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1356 +#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1357 /*! transaction: number of named snapshots dropped */ -#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1357 +#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1358 /*! transaction: prepared transactions */ -#define WT_STAT_CONN_TXN_PREPARE 1358 +#define WT_STAT_CONN_TXN_PREPARE 1359 /*! transaction: prepared transactions committed */ -#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1359 +#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1360 /*! transaction: prepared transactions currently active */ -#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1360 +#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1361 /*! transaction: prepared transactions rolled back */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1361 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1362 /*! transaction: query timestamp calls */ -#define WT_STAT_CONN_TXN_QUERY_TS 1362 +#define WT_STAT_CONN_TXN_QUERY_TS 1363 /*! transaction: read timestamp queue entries walked */ -#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1363 +#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1364 /*! transaction: read timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1364 +#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1365 /*! transaction: read timestamp queue inserts to head */ -#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1365 +#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1366 /*! transaction: read timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1366 +#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1367 /*! transaction: read timestamp queue length */ -#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1367 +#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1368 /*! transaction: rollback to stable calls */ -#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE 1368 +#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE 1369 /*! transaction: rollback to stable updates aborted */ -#define WT_STAT_CONN_TXN_ROLLBACK_UPD_ABORTED 1369 +#define WT_STAT_CONN_TXN_ROLLBACK_UPD_ABORTED 1370 /*! transaction: rollback to stable updates removed from cache overflow */ -#define WT_STAT_CONN_TXN_ROLLBACK_LAS_REMOVED 1370 +#define WT_STAT_CONN_TXN_ROLLBACK_LAS_REMOVED 1371 /*! transaction: set timestamp calls */ -#define WT_STAT_CONN_TXN_SET_TS 1371 +#define WT_STAT_CONN_TXN_SET_TS 1372 /*! transaction: set timestamp commit calls */ -#define WT_STAT_CONN_TXN_SET_TS_COMMIT 1372 +#define WT_STAT_CONN_TXN_SET_TS_COMMIT 1373 /*! transaction: set timestamp commit updates */ -#define WT_STAT_CONN_TXN_SET_TS_COMMIT_UPD 1373 +#define WT_STAT_CONN_TXN_SET_TS_COMMIT_UPD 1374 /*! transaction: set timestamp oldest calls */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1374 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1375 /*! transaction: set timestamp oldest updates */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1375 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1376 /*! transaction: set timestamp stable calls */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE 1376 +#define WT_STAT_CONN_TXN_SET_TS_STABLE 1377 /*! transaction: set timestamp stable updates */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1377 +#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1378 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1378 +#define WT_STAT_CONN_TXN_BEGIN 1379 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1379 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1380 /*! transaction: transaction checkpoint generation */ -#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1380 +#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1381 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1381 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1382 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1382 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1383 /*! * transaction: transaction checkpoint most recent duration for gathering * all handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1383 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1384 /*! * transaction: transaction checkpoint most recent duration for gathering * applied handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1384 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1385 /*! * transaction: transaction checkpoint most recent duration for gathering * skipped handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1385 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1386 /*! transaction: transaction checkpoint most recent handles applied */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1386 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1387 /*! transaction: transaction checkpoint most recent handles skipped */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1387 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1388 /*! transaction: transaction checkpoint most recent handles walked */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1388 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1389 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1389 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1390 /*! transaction: transaction checkpoint scrub dirty target */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1390 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1391 /*! transaction: transaction checkpoint scrub time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1391 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1392 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1392 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1393 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1393 +#define WT_STAT_CONN_TXN_CHECKPOINT 1394 /*! * transaction: transaction checkpoints skipped because database was * clean */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1394 +#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1395 /*! transaction: transaction failures due to cache overflow */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1395 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1396 /*! * transaction: transaction fsync calls for checkpoint after allocating * the transaction ID */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1396 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1397 /*! * transaction: transaction fsync duration for checkpoint after * allocating the transaction ID (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1397 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1398 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1398 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1399 /*! transaction: transaction range of IDs currently pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1399 +#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1400 /*! * transaction: transaction range of IDs currently pinned by named * snapshots */ -#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1400 +#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1401 /*! transaction: transaction range of timestamps currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1401 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1402 /*! transaction: transaction range of timestamps pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1402 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1403 /*! * transaction: transaction range of timestamps pinned by the oldest * timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1403 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1404 /*! transaction: transaction sync calls */ -#define WT_STAT_CONN_TXN_SYNC 1404 +#define WT_STAT_CONN_TXN_SYNC 1405 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1405 +#define WT_STAT_CONN_TXN_COMMIT 1406 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1406 +#define WT_STAT_CONN_TXN_ROLLBACK 1407 /*! transaction: update conflicts */ -#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1407 +#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1408 /*! * @} diff --git a/src/third_party/wiredtiger/src/log/log.c b/src/third_party/wiredtiger/src/log/log.c index b74ba6817f8..5caecc18c6d 100644 --- a/src/third_party/wiredtiger/src/log/log.c +++ b/src/third_party/wiredtiger/src/log/log.c @@ -2082,7 +2082,7 @@ __log_salvage_message( * Scan the logs, calling a function on each record found. */ int -__wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, +__wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *start_lsnp, WT_LSN *end_lsnp, uint32_t flags, int (*func)(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp, WT_LSN *next_lsnp, void *cookie, int firstrecord), void *cookie) @@ -2120,7 +2120,7 @@ __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, if (func == NULL) return (0); - if (lsnp != NULL && LF_ISSET(WT_LOGSCAN_FIRST | WT_LOGSCAN_FROM_CKP)) + if (start_lsnp != NULL && LF_ISSET(WT_LOGSCAN_FIRST | WT_LOGSCAN_FROM_CKP)) WT_RET_MSG(session, WT_ERROR, "choose either a start LSN or a start flag"); /* * Set up the allocation size, starting and ending LSNs. The values for those depend on whether @@ -2129,9 +2129,9 @@ __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, lastlog = 0; if (log != NULL) { allocsize = log->allocsize; - end_lsn = log->alloc_lsn; - start_lsn = log->first_lsn; - if (lsnp == NULL) { + WT_ASSIGN_LSN(&end_lsn, &log->alloc_lsn); + WT_ASSIGN_LSN(&start_lsn, &log->first_lsn); + if (start_lsnp == NULL) { if (LF_ISSET(WT_LOGSCAN_FROM_CKP)) start_lsn = log->ckpt_lsn; else if (!LF_ISSET(WT_LOGSCAN_FIRST)) @@ -2161,16 +2161,17 @@ __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, WT_SET_LSN(&end_lsn, lastlog, 0); WT_ERR(__wt_fs_directory_list_free(session, &logfiles, logcount)); } - if (lsnp != NULL) { + + if (start_lsnp != NULL) { /* * Offsets must be on allocation boundaries. An invalid LSN from a user should just return * WT_NOTFOUND. It is not an error. But if it is from recovery, we expect valid LSNs so give * more information about that. */ - if (lsnp->l.offset % allocsize != 0) { + if (start_lsnp->l.offset % allocsize != 0) { if (LF_ISSET(WT_LOGSCAN_RECOVER)) WT_ERR_MSG(session, WT_NOTFOUND, "__wt_log_scan unaligned LSN %" PRIu32 "/%" PRIu32, - lsnp->l.file, lsnp->l.offset); + start_lsnp->l.file, start_lsnp->l.offset); else return (WT_NOTFOUND); } @@ -2179,11 +2180,11 @@ __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, * return WT_NOTFOUND. It is not an error. But if it is from recovery, we expect valid LSNs * so give more information about that. */ - if (lsnp->l.file > lastlog) { + if (start_lsnp->l.file > lastlog) { if (LF_ISSET(WT_LOGSCAN_RECOVER)) WT_ERR_MSG(session, WT_NOTFOUND, "__wt_log_scan LSN %" PRIu32 "/%" PRIu32 " larger than biggest log file %" PRIu32, - lsnp->l.file, lsnp->l.offset, lastlog); + start_lsnp->l.file, start_lsnp->l.offset, lastlog); else return (WT_NOTFOUND); } @@ -2191,8 +2192,8 @@ __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, * Log cursors may not know the starting LSN. If an LSN is passed in that it is equal to the * smallest LSN, start from the beginning of the log. */ - if (!WT_IS_INIT_LSN(lsnp)) - start_lsn = *lsnp; + if (!WT_IS_INIT_LSN(start_lsnp)) + WT_ASSIGN_LSN(&start_lsn, start_lsnp); } WT_ERR(__log_open_verify(session, start_lsn.l.file, &log_fh, &prev_lsn, NULL, &need_salvage)); if (need_salvage) @@ -2430,7 +2431,14 @@ advance: if (LF_ISSET(WT_LOGSCAN_ONE)) break; } - rd_lsn = next_lsn; + + /* + * Exit the scanning loop if the next LSN seen is greater than our user set end range LSN. + */ + if (end_lsnp != NULL && __wt_log_cmp(&next_lsn, end_lsnp) > 0) + break; + + WT_ASSIGN_LSN(&rd_lsn, &next_lsn); } /* Truncate if we're in recovery. */ diff --git a/src/third_party/wiredtiger/src/log/log_auto.c b/src/third_party/wiredtiger/src/log/log_auto.c index 615f4238aa3..0531fff0c11 100644 --- a/src/third_party/wiredtiger/src/log/log_auto.c +++ b/src/third_party/wiredtiger/src/log/log_auto.c @@ -136,6 +136,11 @@ __wt_logop_col_modify_print( escaped = NULL; WT_RET(__wt_logop_col_modify_unpack(session, pp, end, &fileid, &recno, &value)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"col_modify\",\n")); WT_ERR(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); @@ -203,6 +208,11 @@ __wt_logop_col_put_print( escaped = NULL; WT_RET(__wt_logop_col_put_unpack(session, pp, end, &fileid, &recno, &value)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"col_put\",\n")); WT_ERR(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); @@ -266,6 +276,11 @@ __wt_logop_col_remove_print( WT_RET(__wt_logop_col_remove_unpack(session, pp, end, &fileid, &recno)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"col_remove\",\n")); WT_RET(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); @@ -321,6 +336,11 @@ __wt_logop_col_truncate_print( WT_RET(__wt_logop_col_truncate_unpack(session, pp, end, &fileid, &start, &stop)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"col_truncate\",\n")); WT_RET(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); @@ -380,6 +400,11 @@ __wt_logop_row_modify_print( escaped = NULL; WT_RET(__wt_logop_row_modify_unpack(session, pp, end, &fileid, &key, &value)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"row_modify\",\n")); WT_ERR(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); @@ -452,6 +477,11 @@ __wt_logop_row_put_print( escaped = NULL; WT_RET(__wt_logop_row_put_unpack(session, pp, end, &fileid, &key, &value)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"row_put\",\n")); WT_ERR(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); @@ -522,6 +552,11 @@ __wt_logop_row_remove_print( escaped = NULL; WT_RET(__wt_logop_row_remove_unpack(session, pp, end, &fileid, &key)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"row_remove\",\n")); WT_ERR(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); @@ -589,6 +624,11 @@ __wt_logop_row_truncate_print( escaped = NULL; WT_RET(__wt_logop_row_truncate_unpack(session, pp, end, &fileid, &start, &stop, &mode)); + if (!FLD_ISSET(args->flags, WT_TXN_PRINTLOG_UNREDACT) && fileid != WT_METAFILE_ID) { + WT_RET(__wt_fprintf(session, args->fs, " REDACTED")); + return (0); + } + WT_RET(__wt_fprintf(session, args->fs, " \"optype\": \"row_truncate\",\n")); WT_ERR(__wt_fprintf( session, args->fs, " \"fileid\": %" PRIu32 " 0x%" PRIx32 ",\n", fileid, fileid)); diff --git a/src/third_party/wiredtiger/src/lsm/lsm_manager.c b/src/third_party/wiredtiger/src/lsm/lsm_manager.c index ef98f5397f6..24f55923204 100644 --- a/src/third_party/wiredtiger/src/lsm/lsm_manager.c +++ b/src/third_party/wiredtiger/src/lsm/lsm_manager.c @@ -213,7 +213,7 @@ __wt_lsm_manager_start(WT_SESSION_IMPL *session) manager->lsm_worker_cookies[i].session = worker_session; } - F_SET(conn, WT_CONN_SERVER_LSM); + FLD_SET(conn->server_flags, WT_CONN_SERVER_LSM); /* Start the LSM manager thread. */ WT_ERR(__wt_thread_create(session, &manager->lsm_worker_cookies[0].tid, __lsm_worker_manager, @@ -270,7 +270,7 @@ __wt_lsm_manager_destroy(WT_SESSION_IMPL *session) removed = 0; /* Clear the LSM server flag. */ - F_CLR(conn, WT_CONN_SERVER_LSM); + FLD_CLR(conn->server_flags, WT_CONN_SERVER_LSM); WT_ASSERT(session, !F_ISSET(conn, WT_CONN_READONLY) || manager->lsm_workers == 0); if (manager->lsm_workers > 0) { @@ -360,7 +360,7 @@ __lsm_manager_run_server(WT_SESSION_IMPL *session) conn = S2C(session); dhandle_locked = false; - while (F_ISSET(conn, WT_CONN_SERVER_LSM)) { + while (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_LSM)) { __wt_sleep(0, 10000); if (TAILQ_EMPTY(&conn->lsmqh)) continue; diff --git a/src/third_party/wiredtiger/src/meta/meta_track.c b/src/third_party/wiredtiger/src/meta/meta_track.c index 00f5375c405..de53205d1db 100644 --- a/src/third_party/wiredtiger/src/meta/meta_track.c +++ b/src/third_party/wiredtiger/src/meta/meta_track.c @@ -229,6 +229,7 @@ __wt_meta_track_off(WT_SESSION_IMPL *session, bool need_sync, bool unroll) WT_META_TRACK *trk, *trk_orig; WT_SESSION_IMPL *ckpt_session; int saved_ret; + bool did_drop; saved_ret = 0; @@ -295,14 +296,19 @@ err: /* * Undo any tracked operations on failure. Apply any tracked operations post-commit. */ + did_drop = false; if (unroll || ret != 0) { saved_ret = ret; ret = 0; - while (--trk >= trk_orig) + while (--trk >= trk_orig) { + did_drop = did_drop || trk->op == WT_ST_DROP_COMMIT; WT_TRET(__meta_track_unroll(session, trk)); + } } else - for (; trk_orig < trk; trk_orig++) + for (; trk_orig < trk; trk_orig++) { + did_drop = did_drop || trk_orig->op == WT_ST_DROP_COMMIT; WT_TRET(__meta_track_apply(session, trk_orig)); + } if (F_ISSET(session, WT_SESSION_SCHEMA_TXN)) { F_CLR(session, WT_SESSION_SCHEMA_TXN); @@ -317,6 +323,13 @@ err: #endif } + /* + * Wake up the sweep thread: particularly for the in-memory storage engine, we want to reclaim + * space immediately. + */ + if (did_drop && S2C(session)->sweep_cond != NULL) + __wt_cond_signal(session, S2C(session)->sweep_cond); + if (ret != 0) WT_PANIC_RET(session, ret, "failed to apply or unroll all tracked operations"); return (saved_ret == 0 ? 0 : saved_ret); diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c index c99711d6f12..72bb31ecc50 100644 --- a/src/third_party/wiredtiger/src/session/session_api.c +++ b/src/third_party/wiredtiger/src/session/session_api.c @@ -1770,7 +1770,7 @@ __transaction_sync_run_chk(WT_SESSION_IMPL *session) conn = S2C(session); - return (FLD_ISSET(conn->flags, WT_CONN_SERVER_LOG)); + return (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_LOG)); } /* diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index 7d93bd70147..d74170513ba 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -735,6 +735,7 @@ static const char *const __stats_connection_desc[] = { "data-handle: connection sweep dhandles closed", "data-handle: connection sweep dhandles removed from hash list", "data-handle: connection sweep time-of-death sets", "data-handle: connection sweeps", + "data-handle: connection sweeps skipped due to checkpoint gathering handles", "data-handle: session dhandles swept", "data-handle: session sweep attempts", "lock: checkpoint lock acquisitions", "lock: checkpoint lock application thread wait time (usecs)", @@ -1127,6 +1128,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->dh_sweep_remove = 0; stats->dh_sweep_tod = 0; stats->dh_sweeps = 0; + stats->dh_sweep_skip_ckpt = 0; stats->dh_session_handles = 0; stats->dh_session_sweeps = 0; stats->lock_checkpoint_count = 0; @@ -1573,6 +1575,7 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->dh_sweep_remove += WT_STAT_READ(from, dh_sweep_remove); to->dh_sweep_tod += WT_STAT_READ(from, dh_sweep_tod); to->dh_sweeps += WT_STAT_READ(from, dh_sweeps); + to->dh_sweep_skip_ckpt += WT_STAT_READ(from, dh_sweep_skip_ckpt); to->dh_session_handles += WT_STAT_READ(from, dh_session_handles); to->dh_session_sweeps += WT_STAT_READ(from, dh_session_sweeps); to->lock_checkpoint_count += WT_STAT_READ(from, lock_checkpoint_count); diff --git a/src/third_party/wiredtiger/src/txn/txn_log.c b/src/third_party/wiredtiger/src/txn/txn_log.c index c107faeb86a..921f9392ae4 100644 --- a/src/third_party/wiredtiger/src/txn/txn_log.c +++ b/src/third_party/wiredtiger/src/txn/txn_log.c @@ -704,8 +704,8 @@ __txn_printlog(WT_SESSION_IMPL *session, WT_ITEM *rawrec, WT_LSN *lsnp, WT_LSN * * Print the log in a human-readable format. */ int -__wt_txn_printlog(WT_SESSION *wt_session, const char *ofile, uint32_t flags) - WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) +__wt_txn_printlog(WT_SESSION *wt_session, const char *ofile, uint32_t flags, WT_LSN *start_lsn, + WT_LSN *end_lsn) WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) { WT_DECL_RET; WT_FSTREAM *fs; @@ -722,8 +722,9 @@ __wt_txn_printlog(WT_SESSION *wt_session, const char *ofile, uint32_t flags) WT_ERR(__wt_fprintf(session, fs, "[\n")); args.fs = fs; args.flags = flags; - WT_ERR(__wt_log_scan(session, NULL, WT_LOGSCAN_FIRST, __txn_printlog, &args)); - ret = __wt_fprintf(session, fs, "\n]\n"); + WT_ERR(__wt_log_scan(session, start_lsn, end_lsn, 0x0, __txn_printlog, &args)); + if (!LF_ISSET(WT_TXN_PRINTLOG_MSG)) + ret = __wt_fprintf(session, fs, "\n]\n"); err: if (ofile != NULL) diff --git a/src/third_party/wiredtiger/src/txn/txn_recover.c b/src/third_party/wiredtiger/src/txn/txn_recover.c index 13dcbd0693b..0d5b4b505ce 100644 --- a/src/third_party/wiredtiger/src/txn/txn_recover.c +++ b/src/third_party/wiredtiger/src/txn/txn_recover.c @@ -592,14 +592,14 @@ __wt_txn_recover(WT_SESSION_IMPL *session) WT_ERR_MSG(session, WT_RUN_RECOVERY, "Read-only database needs recovery"); } if (WT_IS_INIT_LSN(&metafile->ckpt_lsn)) - ret = __wt_log_scan(session, NULL, WT_LOGSCAN_FIRST, __txn_log_recover, &r); + ret = __wt_log_scan(session, NULL, NULL, WT_LOGSCAN_FIRST, __txn_log_recover, &r); else { /* * Start at the last checkpoint LSN referenced in the metadata. If we see the end of a * checkpoint while scanning, we will change the full scan to start from there. */ - r.ckpt_lsn = metafile->ckpt_lsn; - ret = __wt_log_scan(session, &metafile->ckpt_lsn, 0, __txn_log_recover, &r); + WT_ASSIGN_LSN(&r.ckpt_lsn, &metafile->ckpt_lsn); + ret = __wt_log_scan(session, &metafile->ckpt_lsn, NULL, 0, __txn_log_recover, &r); } if (F_ISSET(conn, WT_CONN_SALVAGE)) ret = 0; @@ -670,9 +670,9 @@ __wt_txn_recover(WT_SESSION_IMPL *session) FLD_SET(conn->log_flags, WT_CONN_LOG_RECOVER_DIRTY); if (WT_IS_INIT_LSN(&r.ckpt_lsn)) ret = __wt_log_scan( - session, NULL, WT_LOGSCAN_FIRST | WT_LOGSCAN_RECOVER, __txn_log_recover, &r); + session, NULL, NULL, WT_LOGSCAN_FIRST | WT_LOGSCAN_RECOVER, __txn_log_recover, &r); else - ret = __wt_log_scan(session, &r.ckpt_lsn, WT_LOGSCAN_RECOVER, __txn_log_recover, &r); + ret = __wt_log_scan(session, &r.ckpt_lsn, NULL, WT_LOGSCAN_RECOVER, __txn_log_recover, &r); if (F_ISSET(conn, WT_CONN_SALVAGE)) ret = 0; WT_ERR(ret); diff --git a/src/third_party/wiredtiger/src/utilities/util.h b/src/third_party/wiredtiger/src/utilities/util.h index 4512956abce..9a64d5bd772 100644 --- a/src/third_party/wiredtiger/src/utilities/util.h +++ b/src/third_party/wiredtiger/src/utilities/util.h @@ -52,5 +52,6 @@ int util_str2num(WT_SESSION *, const char *, bool, uint64_t *); int util_truncate(WT_SESSION *, int, char *[]); int util_upgrade(WT_SESSION *, int, char *[]); char *util_uri(WT_SESSION *, const char *, const char *); +void util_usage(const char *, const char *, const char *[]); int util_verify(WT_SESSION *, int, char *[]); int util_write(WT_SESSION *, int, char *[]); diff --git a/src/third_party/wiredtiger/src/utilities/util_misc.c b/src/third_party/wiredtiger/src/utilities/util_misc.c index 2c4358e64ef..10a344dca80 100644 --- a/src/third_party/wiredtiger/src/utilities/util_misc.c +++ b/src/third_party/wiredtiger/src/utilities/util_misc.c @@ -152,3 +152,21 @@ util_flush(WT_SESSION *session, const char *uri) (void)util_err(session, ret, "%s: session.drop", uri); return (1); } + +/* + * util_usage -- + * Display a usage statement. + */ +void +util_usage(const char *usage, const char *tag, const char *list[]) +{ + const char **p; + + if (usage != NULL) + fprintf(stderr, "usage: %s %s %s\n", progname, usage_prefix, usage); + if (tag != NULL) + fprintf(stderr, "%s\n", tag); + if (list != NULL) + for (p = list; *p != NULL; p += 2) + fprintf(stderr, " %s%s%s\n", p[0], strlen(p[0]) > 2 ? "\n " : " ", p[1]); +} diff --git a/src/third_party/wiredtiger/src/utilities/util_printlog.c b/src/third_party/wiredtiger/src/utilities/util_printlog.c index ede4b0464b0..19f22982a04 100644 --- a/src/third_party/wiredtiger/src/utilities/util_printlog.c +++ b/src/third_party/wiredtiger/src/utilities/util_printlog.c @@ -8,23 +8,67 @@ #include "util.h" -static int usage(void); +static int +usage(void) +{ + static const char *options[] = {"-f", "output to the specified file", "-x", + "display key and value items in hexadecimal format", "-l", + "the start LSN from which the log will be printed, optionally the end LSN can also be " + "specified", + "-m", "output log message records only", "-u", "print user data, don't redact", NULL, NULL}; + + util_usage( + "printlog [-mux] [-f output-file] [-l start-file,start-offset]|[-l " + "start-file,start-offset,end-file,end-offset]", + "options:", options); + return (1); +} int util_printlog(WT_SESSION *session, int argc, char *argv[]) { WT_DECL_RET; + WT_LSN end_lsn, start_lsn; + uint32_t end_lsnfile, end_lsnoffset, start_lsnfile, start_lsnoffset; uint32_t flags; int ch; - char *ofile; + int n_args; + char *ofile, *start_str; + bool end_set, start_set; + end_set = start_set = false; flags = 0; ofile = NULL; - while ((ch = __wt_getopt(progname, argc, argv, "f:x")) != EOF) + /* + * By default redact user data. This way if any support people are using this on customer data, + * it is redacted unless they make the effort to keep it in. It lessens the risk of doing the + * wrong command. + */ + while ((ch = __wt_getopt(progname, argc, argv, "f:l:mux")) != EOF) switch (ch) { case 'f': /* output file */ ofile = __wt_optarg; break; + case 'l': + start_str = __wt_optarg; + n_args = sscanf(start_str, "%" SCNu32 ",%" SCNu32 ",%" SCNu32 ",%" SCNu32, + &start_lsnfile, &start_lsnoffset, &end_lsnfile, &end_lsnoffset); + if (n_args == 2) { + WT_SET_LSN(&start_lsn, start_lsnfile, start_lsnoffset); + start_set = true; + } else if (n_args == 4) { + WT_SET_LSN(&start_lsn, start_lsnfile, start_lsnoffset); + WT_SET_LSN(&end_lsn, end_lsnfile, end_lsnoffset); + end_set = start_set = true; + } else + return (usage()); + break; + case 'm': /* messages only */ + LF_SET(WT_TXN_PRINTLOG_MSG); + break; + case 'u': /* print user data, don't redact */ + LF_SET(WT_TXN_PRINTLOG_UNREDACT); + break; case 'x': /* hex output */ LF_SET(WT_TXN_PRINTLOG_HEX); break; @@ -38,18 +82,9 @@ util_printlog(WT_SESSION *session, int argc, char *argv[]) if (argc != 0) return (usage()); - if ((ret = __wt_txn_printlog(session, ofile, flags)) != 0) + if ((ret = __wt_txn_printlog(session, ofile, flags, start_set == true ? &start_lsn : NULL, + end_set == true ? &end_lsn : NULL)) != 0) (void)util_err(session, ret, "printlog"); return (ret); } - -static int -usage(void) -{ - (void)fprintf(stderr, - "usage: %s %s " - "printlog [-x] [-f output-file]\n", - progname, usage_prefix); - return (1); -} diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h index a701ad676a8..e0b1495b1c5 100644 --- a/src/third_party/wiredtiger/test/format/config.h +++ b/src/third_party/wiredtiger/test/format/config.h @@ -256,6 +256,9 @@ static CONFIG c[] = {{"abort", "if timed run should drop core", /* 0% */ {"timer", "maximum time to run in minutes", C_IGNORE, 0, 0, UINT_MAX, &g.c_timer, NULL}, + {"timing_stress_aggressive_sweep", "stress aggressive sweep", /* 2% */ + C_BOOL, 2, 0, 0, &g.c_timing_stress_aggressive_sweep, NULL}, + {"timing_stress_checkpoint", "stress checkpoints", /* 2% */ C_BOOL, 2, 0, 0, &g.c_timing_stress_checkpoint, NULL}, diff --git a/src/third_party/wiredtiger/test/suite/suite_subprocess.py b/src/third_party/wiredtiger/test/suite/suite_subprocess.py index b05e462a50a..643b19c3b7a 100755 --- a/src/third_party/wiredtiger/test/suite/suite_subprocess.py +++ b/src/third_party/wiredtiger/test/suite/suite_subprocess.py @@ -92,7 +92,9 @@ class suite_subprocess: got = f.read(len(expect) + 100) self.assertEqual(got, expect, filename + ': does not contain expected:\n\'' + expect + '\', but contains:\n\'' + got + '\'.') - def check_file_contains_one_of(self, filename, expectlist): + # Check contents of the file against a provided checklist. Expected is used as a bool to either + # ensure checklist is included or ensure the checklist is not included in the file. + def check_file_contains_one_of(self, filename, checklist, expected): """ Check that the file contains the expected string in the first 100K bytes """ @@ -100,21 +102,27 @@ class suite_subprocess: with open(filename, 'r') as f: got = f.read(maxbytes) found = False - for expect in expectlist: + for expect in checklist: pat = self.convert_to_pattern(expect) if pat == None: if expect in got: found = True - break + if expected: + break + else: + self.fail("Did not expect: " + got) else: if re.search(pat, got): found = True - break - if not found: - if len(expectlist) == 1: - expect = '\'' + expectlist[0] + '\'' + if expected: + break + else: + self.fail("Did not expect: " + got) + if not found and expected: + if len(checklist) == 1: + expect = '\'' + checklist[0] + '\'' else: - expect = str(expectlist) + expect = str(checklist) gotstr = '\'' + \ (got if len(got) < 1000 else (got[0:1000] + '...')) + '\'' if len(got) >= maxbytes: @@ -122,8 +130,11 @@ class suite_subprocess: else: self.fail(filename + ': does not contain expected ' + expect + ', got ' + gotstr) - def check_file_contains(self, filename, expect): - self.check_file_contains_one_of(filename, [expect]) + def check_file_contains(self, filename, content): + self.check_file_contains_one_of(filename, [content], True) + + def check_file_not_contains(self, filename, content): + self.check_file_contains_one_of(filename, [content], False) def check_empty_file(self, filename): """ diff --git a/src/third_party/wiredtiger/test/suite/test_txn08.py b/src/third_party/wiredtiger/test/suite/test_txn08.py index 1da7f499c91..8dbda1de8e1 100644 --- a/src/third_party/wiredtiger/test/suite/test_txn08.py +++ b/src/third_party/wiredtiger/test/suite/test_txn08.py @@ -64,14 +64,55 @@ class test_txn08(wttest.WiredTigerTestCase, suite_subprocess): # # Run printlog and make sure it exits with zero status. # - self.runWt(['printlog'], outfilename='printlog.out') + self.runWt(['printlog', '-u'], outfilename='printlog.out') self.check_file_contains('printlog.out', '\\u0001\\u0002abcd\\u0003\\u0004') - self.runWt(['printlog', '-x'], outfilename='printlog-hex.out') + self.runWt(['printlog', '-u','-x'], outfilename='printlog-hex.out') self.check_file_contains('printlog-hex.out', '\\u0001\\u0002abcd\\u0003\\u0004') self.check_file_contains('printlog-hex.out', '0102616263640304') + # Check the printlog start LSN and stop LSN feature. + self.runWt(['printlog', '-l 2,128'], outfilename='printlog-range01.out') + self.check_file_contains('printlog-range01.out', + '"lsn" : [2,128],') + self.check_file_contains('printlog-range01.out', + '"lsn" : [2,256],') + self.check_file_not_contains('printlog-range01.out', + '"lsn" : [1,128],') + self.runWt(['printlog', '-l 2,128,3,128'], outfilename='printlog-range02.out') + self.check_file_contains('printlog-range02.out', + '"lsn" : [2,128],') + self.check_file_not_contains('printlog-range02.out', + '"lsn" : [1,128],') + self.check_file_not_contains('printlog-range02.out', + '"lsn" : [3,256],') + # Test for invalid LSN, return WT_NOTFOUND + self.runWt(['printlog', '-l 2,300'], outfilename='printlog-range03.out', errfilename='printlog-range03.err', failure=True) + self.check_file_contains('printlog-range03.err','WT_NOTFOUND') + # Test for Start > end, print the start lsn and then stop + self.runWt(['printlog', '-l 3,128,2,128'], outfilename='printlog-range04.out') + self.check_file_contains('printlog-range04.out','"lsn" : [3,128],') + self.check_file_not_contains('printlog-range04.out','"lsn" : [3,256],') + # Test for usage error, print the usage message if arguments are invalid + self.runWt(['printlog', '-l'], outfilename='printlog-range05.out', errfilename='printlog-range05.err', failure=True) + self.check_file_contains('printlog-range05.err','wt: option requires an argument -- l') + # Test start and end offset of 0 + self.runWt(['printlog', '-l 2,0,3,0'], outfilename='printlog-range06.out') + self.check_file_contains('printlog-range06.out', + '"lsn" : [2,128],') + self.check_file_not_contains('printlog-range06.out', + '"lsn" : [1,128],') + self.check_file_not_contains('printlog-range06.out', + '"lsn" : [3,256],') + # Test for start == end + self.runWt(['printlog', '-l 1,256,1,256'], outfilename='printlog-range07.out') + self.check_file_contains('printlog-range07.out', + '"lsn" : [1,256],') + self.check_file_not_contains('printlog-range07.out', + '"lsn" : [1,128],') + self.check_file_not_contains('printlog-range07.out', + '"lsn" : [1,384],') if __name__ == '__main__': wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_txn19.py b/src/third_party/wiredtiger/test/suite/test_txn19.py index a6061ffbb9a..2bb01fcea08 100755 --- a/src/third_party/wiredtiger/test/suite/test_txn19.py +++ b/src/third_party/wiredtiger/test/suite/test_txn19.py @@ -303,7 +303,7 @@ class test_txn19(wttest.WiredTigerTestCase, suite_subprocess): if expect_fail: self.check_file_contains_one_of(errfile, ['/log file.*corrupted/', - 'WT_TRY_SALVAGE: database corruption detected']) + 'WT_TRY_SALVAGE: database corruption detected'], True) else: self.check_empty_file(errfile) if self.expect_warning_corruption(): |