summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2016-09-16 06:21:24 +0000
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-09-16 06:21:24 +0000
commit5bc03723a7e77c96b1d5e45a97173654872c727a (patch)
treef0d12b535fee95b721d8d046c3e4dfbfec0a91e2
parentdeeb0f589aab43f0d4b8d97755ed1e13808dcfab (diff)
parent03bbd9d3c9330a5b6e3cbd7d2db1ac7fea5e96bf (diff)
downloadmongo-5bc03723a7e77c96b1d5e45a97173654872c727a.tar.gz
Merge branch 'develop' into mongodb-3.4mongodb-3.3.14mongodb-3.3.13
-rw-r--r--bench/wtperf/config.c2
-rw-r--r--bench/wtperf/runners/checkpoint-stress.wtperf15
-rw-r--r--bench/wtperf/runners/multi-btree-read-heavy-stress.wtperf21
-rw-r--r--build_posix/aclocal/strict.m424
-rw-r--r--build_posix/configure.ac.in12
-rw-r--r--dist/api_config.py2
-rw-r--r--dist/api_data.py4
-rw-r--r--dist/log_data.py2
-rwxr-xr-xdist/s_c_test_create7
-rw-r--r--dist/s_define.list11
-rwxr-xr-xdist/s_export1
-rwxr-xr-xdist/s_release_docs1
-rwxr-xr-xdist/s_whitespace39
-rw-r--r--dist/stat_data.py4
-rwxr-xr-xdist/style.py1
-rw-r--r--examples/c/ex_encrypt.c2
-rw-r--r--examples/c/ex_event_handler.c2
-rw-r--r--examples/c/ex_stat.c6
-rwxr-xr-xexamples/python/ex_stat.py7
-rw-r--r--ext/datasources/helium/helium.c2
-rw-r--r--src/async/async_api.c10
-rw-r--r--src/async/async_op.c10
-rw-r--r--src/async/async_worker.c2
-rw-r--r--src/block/block_ext.c6
-rw-r--r--src/block/block_open.c16
-rw-r--r--src/block/block_read.c10
-rw-r--r--src/block/block_vrfy.c2
-rw-r--r--src/block/block_write.c10
-rw-r--r--src/btree/bt_compact.c4
-rw-r--r--src/btree/bt_curnext.c4
-rw-r--r--src/btree/bt_curprev.c4
-rw-r--r--src/btree/bt_cursor.c65
-rw-r--r--src/btree/bt_delete.c4
-rw-r--r--src/btree/bt_io.c24
-rw-r--r--src/btree/bt_ovfl.c8
-rw-r--r--src/btree/bt_read.c19
-rw-r--r--src/btree/bt_split.c20
-rw-r--r--src/btree/col_srch.c2
-rw-r--r--src/checksum/arm64/crc32-arm64.c12
-rw-r--r--src/config/config_api.c2
-rw-r--r--src/config/config_def.c12
-rw-r--r--src/conn/conn_api.c9
-rw-r--r--src/conn/conn_cache.c14
-rw-r--r--src/conn/conn_log.c15
-rw-r--r--src/conn/conn_stat.c2
-rw-r--r--src/conn/conn_sweep.c12
-rw-r--r--src/cursor/cur_bulk.c10
-rw-r--r--src/cursor/cur_ds.c43
-rw-r--r--src/cursor/cur_file.c4
-rw-r--r--src/cursor/cur_log.c8
-rw-r--r--src/cursor/cur_stat.c2
-rw-r--r--src/cursor/cur_std.c4
-rw-r--r--src/cursor/cur_table.c2
-rw-r--r--src/docs/upgrading.dox2
-rw-r--r--src/evict/evict_lru.c237
-rw-r--r--src/evict/evict_page.c26
-rw-r--r--src/include/btree.h1
-rw-r--r--src/include/btree.i16
-rw-r--r--src/include/cache.h1
-rw-r--r--src/include/connection.h5
-rw-r--r--src/include/lsm.h4
-rw-r--r--src/include/os_fhandle.i18
-rw-r--r--src/include/stat.h129
-rw-r--r--src/include/txn.i4
-rw-r--r--src/include/wiredtiger.in350
-rw-r--r--src/log/log.c53
-rw-r--r--src/log/log_slot.c16
-rw-r--r--src/lsm/lsm_cursor.c6
-rw-r--r--src/lsm/lsm_manager.c14
-rw-r--r--src/lsm/lsm_merge.c4
-rw-r--r--src/lsm/lsm_stat.c28
-rw-r--r--src/meta/meta_table.c2
-rw-r--r--src/os_common/os_alloc.c12
-rw-r--r--src/os_posix/os_mtx_cond.c2
-rw-r--r--src/os_win/os_mtx_cond.c2
-rw-r--r--src/reconcile/rec_write.c49
-rw-r--r--src/schema/schema_truncate.c4
-rw-r--r--src/session/session_api.c58
-rw-r--r--src/session/session_compact.c6
-rw-r--r--src/session/session_dhandle.c4
-rw-r--r--src/support/cond_auto.c4
-rw-r--r--src/support/mtx_rw.c8
-rw-r--r--src/support/stat.c8
-rw-r--r--src/txn/txn_ckpt.c20
-rw-r--r--src/txn/txn_nsnap.c6
-rw-r--r--src/utilities/util_stat.c1
-rw-r--r--test/csuite/wt2246_col_append/main.c2
-rw-r--r--test/csuite/wt2695_checksum/main.c16
-rw-r--r--test/csuite/wt2719_reconfig/main.c3
-rw-r--r--test/format/config.c2
-rw-r--r--test/format/config.h2
-rw-r--r--test/format/format.h2
-rw-r--r--test/format/rebalance.c6
-rw-r--r--test/readonly/readonly.c37
-rw-r--r--test/suite/run.py20
-rw-r--r--test/suite/test_async01.py2
-rw-r--r--test/suite/test_async02.py2
-rw-r--r--test/suite/test_async03.py1
-rw-r--r--test/suite/test_backup03.py1
-rw-r--r--test/suite/test_backup04.py1
-rw-r--r--test/suite/test_backup05.py1
-rw-r--r--test/suite/test_bug001.py2
-rw-r--r--test/suite/test_bug003.py1
-rw-r--r--test/suite/test_bug004.py1
-rw-r--r--test/suite/test_bug005.py1
-rw-r--r--test/suite/test_bug006.py1
-rw-r--r--test/suite/test_bug007.py1
-rw-r--r--test/suite/test_bug008.py1
-rw-r--r--test/suite/test_bug016.py1
-rw-r--r--test/suite/test_bulk01.py1
-rw-r--r--test/suite/test_bulk02.py1
-rw-r--r--test/suite/test_checkpoint01.py8
-rw-r--r--test/suite/test_checkpoint02.py1
-rw-r--r--test/suite/test_colgap.py2
-rw-r--r--test/suite/test_collator.py1
-rw-r--r--test/suite/test_compact01.py1
-rw-r--r--test/suite/test_compact02.py1
-rw-r--r--test/suite/test_compress01.py1
-rw-r--r--test/suite/test_config06.py1
-rw-r--r--test/suite/test_cursor02.py1
-rw-r--r--test/suite/test_cursor_compare.py1
-rw-r--r--test/suite/test_cursor_pin.py1
-rw-r--r--test/suite/test_cursor_random.py2
-rw-r--r--test/suite/test_encrypt01.py1
-rw-r--r--test/suite/test_encrypt03.py1
-rw-r--r--test/suite/test_encrypt04.py1
-rw-r--r--test/suite/test_encrypt06.py2
-rw-r--r--test/suite/test_excl.py1
-rw-r--r--test/suite/test_home.py3
-rw-r--r--test/suite/test_huffman01.py2
-rw-r--r--test/suite/test_join03.py1
-rw-r--r--test/suite/test_join04.py1
-rw-r--r--test/suite/test_join08.py1
-rw-r--r--test/suite/test_jsondump02.py1
-rw-r--r--test/suite/test_metadata_cursor01.py1
-rw-r--r--test/suite/test_overwrite.py1
-rw-r--r--test/suite/test_readonly03.py1
-rw-r--r--test/suite/test_rebalance.py1
-rw-r--r--test/suite/test_schema02.py1
-rw-r--r--test/suite/test_schema03.py1
-rw-r--r--test/suite/test_schema04.py1
-rw-r--r--test/suite/test_schema05.py1
-rw-r--r--test/suite/test_stat02.py6
-rw-r--r--test/suite/test_stat03.py1
-rw-r--r--test/suite/test_truncate01.py5
-rw-r--r--test/suite/test_truncate02.py1
-rw-r--r--test/suite/test_truncate03.py1
-rw-r--r--test/suite/test_txn01.py2
-rw-r--r--test/suite/test_txn11.py1
-rw-r--r--test/suite/test_upgrade.py1
-rw-r--r--test/suite/test_util01.py1
-rw-r--r--test/suite/test_util02.py2
-rw-r--r--test/suite/test_util03.py1
-rw-r--r--test/suite/test_util07.py1
-rw-r--r--test/suite/test_util08.py1
-rw-r--r--test/suite/test_util09.py1
-rw-r--r--test/suite/test_util11.py1
-rw-r--r--test/suite/test_util12.py1
-rw-r--r--test/suite/test_verify.py1
-rw-r--r--test/suite/test_version.py1
-rw-r--r--test/suite/wttest.py9
-rw-r--r--tools/wtstats/stat_data.py2
162 files changed, 922 insertions, 907 deletions
diff --git a/bench/wtperf/config.c b/bench/wtperf/config.c
index 48127afc10e..4c7b17f102a 100644
--- a/bench/wtperf/config.c
+++ b/bench/wtperf/config.c
@@ -830,7 +830,7 @@ config_consolidate(CONFIG *cfg)
CONFIG_QUEUE_ENTRY *conf_line, *test_line, *tmp;
char *string_key;
- /*
+ /*
* This loop iterates over the config queue and for entry checks if an
* entry later in the queue has the same key. If a match is found then
* the current queue entry is removed and we continue.
diff --git a/bench/wtperf/runners/checkpoint-stress.wtperf b/bench/wtperf/runners/checkpoint-stress.wtperf
index d992f69eb67..0c98a0c2db0 100644
--- a/bench/wtperf/runners/checkpoint-stress.wtperf
+++ b/bench/wtperf/runners/checkpoint-stress.wtperf
@@ -1,23 +1,26 @@
# A stress configuration to create long running checkpoints while doing a lot
# of updates.
-conn_config="cache_size=10GB,log=(enabled=false)"
+conn_config="cache_size=16GB,eviction=(threads_max=4),log=(enabled=false)"
table_config="leaf_page_max=32k,internal_page_max=16k,allocation_size=4k,split_pct=90,type=file"
-# Enough data to fill the cache. 100 million 1k records results in two ~6GB
+# Enough data to fill the cache. 150 million 1k records results in two ~11GB
# tables
-icount=100000000
+icount=150000000
create=true
compression="snappy"
-populate_threads=1
checkpoint_interval=60
checkpoint_threads=1
+populate_threads=1
report_interval=10
# Run for a longer duration to ensure checkpoints are completing.
run_time=600
+# Sampling isn't being currently used by any automated test. Keeping it to be
+# used in the future
+sample_interval=10
+sample_rate=1
# MongoDB always has multiple tables, and checkpoints behave differently when
# there is more than a single table.
table_count=2
threads=((count=6,updates=1))
value_sz=1000
-sample_interval=10
-sample_rate=1
+# Wait for the throughput to stabilize
warmup=120
diff --git a/bench/wtperf/runners/multi-btree-read-heavy-stress.wtperf b/bench/wtperf/runners/multi-btree-read-heavy-stress.wtperf
new file mode 100644
index 00000000000..d7b27f8fda4
--- /dev/null
+++ b/bench/wtperf/runners/multi-btree-read-heavy-stress.wtperf
@@ -0,0 +1,21 @@
+# Drive a constant high workload through, even if WiredTiger isn't keeping
+# up by dividing the workload across a lot of threads. This needs to be
+# tuned to the particular machine so the workload is close to capacity in the
+# steady state, but not overwhelming.
+conn_config="cache_size=20GB,session_max=1000,eviction=(threads_min=4,threads_max=4),log=(enabled=false),transaction_sync=(enabled=false),checkpoint_sync=true,checkpoint=(wait=60),statistics=(fast),statistics_log=(json,wait=1)"
+table_config="allocation_size=4k,memory_page_max=10MB,prefix_compression=false,split_pct=90,leaf_page_max=32k,internal_page_max=16k,type=file"
+# Divide original icount by database_count.
+table_count=8
+compression=snappy
+icount=200000000
+populate_threads=1
+reopen_connection=false
+log_like_table=true
+#pareto=5
+report_interval=1
+run_time=3600
+threads=((count=10,throttle=250,inserts=1),(count=10,throttle=250,updates=1),(count=80,throttle=600,reads=1,ops_per_txn=3))
+value_sz=500
+sample_interval=5
+sample_rate=1
+
diff --git a/build_posix/aclocal/strict.m4 b/build_posix/aclocal/strict.m4
index 0dbd5dbee16..c107dd017d7 100644
--- a/build_posix/aclocal/strict.m4
+++ b/build_posix/aclocal/strict.m4
@@ -40,6 +40,12 @@ AC_DEFUN([AM_GCC_WARNINGS], [
w="$w -Wno-error=inline"
w="$w -Wno-error=unsafe-loop-optimizations"
+ case "$1" in
+ [*6.[0-9].[0-9]*]) # gcc6.X
+ w="$w -Wduplicated-cond"
+ w="$w -Wmisleading-indentation";;
+ esac
+
wt_cv_strict_warnings="$w"
])
@@ -60,13 +66,17 @@ AC_DEFUN([AM_CLANG_WARNINGS], [
# w="$w -Wno-error=cast-qual"
w="$w -Wno-cast-qual"
- # Older OS X releases need some special love; these flags should be
- # removed in the not-too-distant future.
- # Apple clang version 4.1
- # (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
- w="$w -Wno-attributes"
- w="$w -Wno-pedantic"
- w="$w -Wno-unused-command-line-argument"
+ case "$1" in
+ *Apple*clang*version*4.1*)
+ # Apple clang has its own numbering system, and older OS X
+ # releases need some special love. Turn off some flags for
+ # Apple's clang 4.1:
+ # Apple clang version 4.1
+ # (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
+ w="$w -Wno-attributes"
+ w="$w -Wno-pedantic"
+ w="$w -Wno-unused-command-line-argument";;
+ esac
# Ignore unrecognized options.
w="$w -Wno-unknown-warning-option"
diff --git a/build_posix/configure.ac.in b/build_posix/configure.ac.in
index cbd9e4e4123..608d602937d 100644
--- a/build_posix/configure.ac.in
+++ b/build_posix/configure.ac.in
@@ -38,9 +38,9 @@ if test "$wt_cv_enable_strict" = "yes"; then
wt_cv_cc_version="`$CC --version | sed -eq`"
case "$wt_cv_cc_version" in
*clang*)
- AM_CLANG_WARNINGS;;
- *gcc*|*GCC*)
- AM_GCC_WARNINGS;;
+ AM_CLANG_WARNINGS($wt_cv_cc_version);;
+ *cc*|*CC*) # cc, CC, gcc, GCC
+ AM_GCC_WARNINGS($wt_cv_cc_version);;
*)
AC_MSG_ERROR(
[--enable-strict does not support "$wt_cv_cc_version".]);;
@@ -87,6 +87,12 @@ if test "$GCC" = "yes"; then
if test "`uname -s`" = "SunOS"; then
AM_CFLAGS="$AM_CFLAGS -pthreads"
fi
+
+ # ARMv8-A is the 64-bit ARM architecture, turn on the optional CRC
+ # instructions.
+ if test "$wt_cv_arm64" = "yes"; then
+ AM_CFLAGS="$AM_CFLAGS -march=armv8-a+crc"
+ fi
else
# The Solaris native compiler gets the additional -mt flag.
if test "`uname -s`" = "SunOS"; then
diff --git a/dist/api_config.py b/dist/api_config.py
index 5ccd8247b76..1069a7037ce 100644
--- a/dist/api_config.py
+++ b/dist/api_config.py
@@ -330,7 +330,7 @@ __wt_conn_config_discard(WT_SESSION_IMPL *session)
\t__wt_free(session, conn->config_entries);
}
-/*
+/*
* __wt_conn_config_match --
* Return the static configuration entry for a method.
*/
diff --git a/dist/api_data.py b/dist/api_data.py
index 44fc935d5d3..9781e58a807 100644
--- a/dist/api_data.py
+++ b/dist/api_data.py
@@ -402,7 +402,7 @@ connection_runtime_config = [
vary depending on the current eviction load''',
min=1, max=20),
]),
- Config('eviction_checkpoint_target', '15', r'''
+ Config('eviction_checkpoint_target', '5', r'''
perform eviction at the beginning of checkpoints to bring the dirty
content in cache to this level, expressed as a percentage of the total
cache size. Ignored if set to zero or \c in_memory is \c true''',
@@ -818,7 +818,7 @@ methods = {
type='int'),
]),
-'WT_SESSION.create' : Method(file_config + lsm_config + source_meta +
+'WT_SESSION.create' : Method(file_config + lsm_config + source_meta +
index_only_config + table_only_config + [
Config('exclusive', 'false', r'''
fail if the object exists. When false (the default), if the
diff --git a/dist/log_data.py b/dist/log_data.py
index f46e9e80dda..8fd1a5787fe 100644
--- a/dist/log_data.py
+++ b/dist/log_data.py
@@ -1,7 +1,7 @@
# Data for log.py, describes the format of log records
# There are a small number of main log record types.
-#
+#
# Some log record types, such as transaction commit, also include a list of
# "log operations" within the same log record. Both log record types and log
# operations are described here.
diff --git a/dist/s_c_test_create b/dist/s_c_test_create
index fd0fa809d99..616570dca2e 100755
--- a/dist/s_c_test_create
+++ b/dist/s_c_test_create
@@ -64,9 +64,9 @@ mkdir $CSUITE_DIRECTORY/$TEST_NAME
#include "test_util.h"
/*
- * JIRA ticket reference:
- * Test case description:
- * Failure mode:
+ * JIRA ticket reference:
+ * Test case description:
+ * Failure mode:
*/
void (*custom_die)(void) = NULL;
@@ -92,7 +92,6 @@ main(int argc, char *argv[])
EOF
) > $CSUITE_DIRECTORY/$TEST_NAME/main.c
-
# Now update the C test suite makefile to include the new test case
NEW_MAKE_SECT="test_${TEST_NAME}_SOURCES = ${TEST_NAME}\/main.c\\nnoinst_PROGRAMS = test_${TEST_NAME}\\n\\n"
diff --git a/dist/s_define.list b/dist/s_define.list
index 2cdda74e7d4..6a1a32004ea 100644
--- a/dist/s_define.list
+++ b/dist/s_define.list
@@ -41,18 +41,11 @@ WT_SESSION_LOCKED_CHECKPOINT
WT_SESSION_LOCKED_TURTLE
WT_STATS_FIELD_TO_SLOT
WT_STATS_SLOT_ID
+WT_STAT_CONN_DECRV
+WT_STAT_DATA_DECRV
WT_STAT_DECR
WT_STAT_DECRV
WT_STAT_DECRV_ATOMIC
-WT_STAT_FAST_CONN_DECRV
-WT_STAT_FAST_DATA_DECRV
-WT_STAT_FAST_DECR
-WT_STAT_FAST_DECRV
-WT_STAT_FAST_DECRV_ATOMIC
-WT_STAT_FAST_INCR
-WT_STAT_FAST_INCRV
-WT_STAT_FAST_INCRV_ATOMIC
-WT_STAT_FAST_SET
WT_STAT_INCRV_ATOMIC
WT_STAT_WRITE
WT_TIMEDIFF_US
diff --git a/dist/s_export b/dist/s_export
index 8a2c701d27f..94242e0118d 100755
--- a/dist/s_export
+++ b/dist/s_export
@@ -17,7 +17,6 @@ Darwin)
;;
esac
-
check()
{
(sed -e '/^#/d' s_export.list &&
diff --git a/dist/s_release_docs b/dist/s_release_docs
index 965f59662e8..80469628682 100755
--- a/dist/s_release_docs
+++ b/dist/s_release_docs
@@ -76,4 +76,3 @@ echo "Rebuild documentation root"
echo "Finished packaging documentation, you should now push the results. Run:"
echo "cd $DOC_DIR && git push origin"
echo "To backout changes run 'git reset HEAD~1'"
-
diff --git a/dist/s_whitespace b/dist/s_whitespace
index 8cf3f7dfe6f..e60d85f8cc6 100755
--- a/dist/s_whitespace
+++ b/dist/s_whitespace
@@ -4,46 +4,29 @@
t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
-# Clear lines that only contain whitespace, discard trailing empty lines.
-whitespace()
-{
- sed -e 's/[ ][ ]*$//' \
- -e '${' \
- -e '/^$/d' \
- -e '}' < $1 > $t
- cmp $t $1 > /dev/null 2>&1 || (echo "$1" && cp $t $1)
-}
-
# Clear lines that only contain whitespace, compress multiple empty lines
# into a single line, discard trailing empty lines.
-whitespace_and_empty_line()
+whitespace()
{
- sed -e 's/[ ][ ]*$//' \
- -e '/^$/N' \
- -e '/\n$/D' < $1 > $t
+ sed -e 's/[ ][ ]*$//' < $1 | \
+ cat -s | \
+ sed -e '${' -e '/^$/d' -e '}' > $t
cmp $t $1 > /dev/null 2>&1 || (echo "$1" && cp $t $1)
}
cd ..
-# Scripts.
-for f in `find dist -name '*.py' -name 's_*'`; do
- whitespace_and_empty_line $f
-done
-
-# C-language sources.
-for f in `find bench examples ext src test \
+find bench dist examples ext src test \
-name '*.[chi]' -o \
-name '*.dox' -o \
-name '*.in' -o \
+ -name '*.py' -o \
+ -name 's_*' -o \
-name 'Makefile.am' |
sed -e '/Makefile.in/d' \
- -e '/checksum\/power8/d'`; do
- whitespace_and_empty_line $f
-done
-
-# Python sources.
-for f in `find test \
- -name '*.py' | sed '/3rdparty/d'`; do
+ -e '/checksum\/power8/d' \
+ -e '/3rdparty/d' \
+ -e '/docs\/tools/d' \
+| while read f ; do
whitespace $f
done
diff --git a/dist/stat_data.py b/dist/stat_data.py
index a050849ad76..5087afa44dc 100644
--- a/dist/stat_data.py
+++ b/dist/stat_data.py
@@ -185,6 +185,7 @@ connection_stats = [
CacheStat('cache_eviction_clean', 'unmodified pages evicted'),
CacheStat('cache_eviction_deepen', 'page split during eviction deepened the tree'),
CacheStat('cache_eviction_dirty', 'modified pages evicted'),
+ CacheStat('cache_eviction_empty_score', 'eviction empty score', 'no_clear,no_scale'),
CacheStat('cache_eviction_fail', 'pages selected for eviction unable to be evicted'),
CacheStat('cache_eviction_force', 'pages evicted because they exceeded the in-memory maximum'),
CacheStat('cache_eviction_force_delete', 'pages evicted because they had chains of deleted items'),
@@ -208,7 +209,8 @@ connection_stats = [
CacheStat('cache_eviction_split_leaf', 'leaf pages split during eviction'),
CacheStat('cache_eviction_state', 'eviction state', 'no_clear,no_scale'),
CacheStat('cache_eviction_walk', 'pages walked for eviction'),
- CacheStat('cache_eviction_walks_active', 'files with active eviction walks', 'no_clear,no_scale,size'),
+ CacheStat('cache_eviction_walks_abandoned', 'eviction walks abandoned'),
+ CacheStat('cache_eviction_walks_active', 'files with active eviction walks', 'no_clear,no_scale'),
CacheStat('cache_eviction_walks_started', 'files with new eviction walks started'),
CacheStat('cache_eviction_worker_evicting', 'eviction worker thread evicting pages'),
CacheStat('cache_hazard_checks', 'hazard pointer check calls'),
diff --git a/dist/style.py b/dist/style.py
index ecb24d756e8..af713c03a59 100755
--- a/dist/style.py
+++ b/dist/style.py
@@ -35,7 +35,6 @@ def lines_could_join():
print '\t' + m.group(1).lstrip() + m.group(2)
print
-
missing_comment()
# Don't display lines that could be joined by default; in some cases, the code
diff --git a/examples/c/ex_encrypt.c b/examples/c/ex_encrypt.c
index 5d5cc66c87f..00dc66fc24d 100644
--- a/examples/c/ex_encrypt.c
+++ b/examples/c/ex_encrypt.c
@@ -501,7 +501,7 @@ main(void)
ret = session->open_cursor(session, "table:crypto2", NULL, NULL, &c2);
ret = session->open_cursor(session, "table:nocrypto", NULL, NULL, &nc);
- /*
+ /*
* Insert a set of keys and values. Insert the same data into
* all tables so that we can verify they're all the same after
* we decrypt on read.
diff --git a/examples/c/ex_event_handler.c b/examples/c/ex_event_handler.c
index 7122e71882e..03809cae7c8 100644
--- a/examples/c/ex_event_handler.c
+++ b/examples/c/ex_event_handler.c
@@ -131,7 +131,7 @@ main(void)
*/
if (getenv("WIREDTIGER_HOME") == NULL) {
home = "WT_HOME";
- (void)system("rm -rf WT_HOME && mkdir WT_HOME");
+ ret = system("rm -rf WT_HOME && mkdir WT_HOME");
} else
home = NULL;
diff --git a/examples/c/ex_stat.c b/examples/c/ex_stat.c
index ba473d6be04..cf9e8fb97d1 100644
--- a/examples/c/ex_stat.c
+++ b/examples/c/ex_stat.c
@@ -63,7 +63,7 @@ print_cursor(WT_CURSOR *cursor)
}
/*! [statistics display function] */
-int
+int
print_database_stats(WT_SESSION *session)
{
WT_CURSOR *cursor;
@@ -81,7 +81,7 @@ print_database_stats(WT_SESSION *session)
return (ret);
}
-int
+int
print_file_stats(WT_SESSION *session)
{
WT_CURSOR *cursor;
@@ -99,7 +99,7 @@ print_file_stats(WT_SESSION *session)
return (ret);
}
-int
+int
print_join_cursor_stats(WT_SESSION *session)
{
WT_CURSOR *idx_cursor, *join_cursor, *stat_cursor;
diff --git a/examples/python/ex_stat.py b/examples/python/ex_stat.py
index 10f1d6d597c..1772badd076 100755
--- a/examples/python/ex_stat.py
+++ b/examples/python/ex_stat.py
@@ -32,7 +32,6 @@
import os
from wiredtiger import wiredtiger_open,WIREDTIGER_VERSION_STRING,stat
-
def main():
# Create a clean test directory for this run of the test program
os.system('rm -rf WT_HOME')
@@ -58,19 +57,16 @@ def main():
print_derived_stats(session)
conn.close()
-
def print_database_stats(session):
statcursor = session.open_cursor("statistics:")
print_cursor(statcursor)
statcursor.close()
-
def print_file_stats(session):
fstatcursor = session.open_cursor("statistics:table:access")
print_cursor(fstatcursor)
fstatcursor.close()
-
def print_overflow_pages(session):
ostatcursor = session.open_cursor("statistics:table:access")
val = ostatcursor[stat.dsrc.btree_overflow]
@@ -78,7 +74,6 @@ def print_overflow_pages(session):
print '%s=%s' % (str(val[0]), str(val[1]))
ostatcursor.close()
-
def print_derived_stats(session):
dstatcursor = session.open_cursor("statistics:table:access")
ckpt_size = dstatcursor[stat.dsrc.block_checkpoint_size][1]
@@ -97,7 +92,6 @@ def print_derived_stats(session):
print "Write amplification is " + '{:.2f}'.format(fs_writes / (app_insert + app_remove + app_update))
dstatcursor.close()
-
def print_cursor(mycursor):
while mycursor.next() == 0:
val = mycursor.get_value()
@@ -106,4 +100,3 @@ def print_cursor(mycursor):
if __name__ == "__main__":
main()
-
diff --git a/ext/datasources/helium/helium.c b/ext/datasources/helium/helium.c
index 2a66c9a0ca7..e934d61ddf6 100644
--- a/ext/datasources/helium/helium.c
+++ b/ext/datasources/helium/helium.c
@@ -1942,7 +1942,7 @@ err: if (ws != NULL)
ESET(ws_source_close(wtext, session, ws));
}
- /*
+ /*
* If there was an error or our caller doesn't need the global lock,
* release the global lock.
*/
diff --git a/src/async/async_api.c b/src/async/async_api.c
index 0a855514a07..bac4dc01bae 100644
--- a/src/async/async_api.c
+++ b/src/async/async_api.c
@@ -113,7 +113,7 @@ __async_new_op_alloc(WT_SESSION_IMPL *session, const char *uri,
conn = S2C(session);
async = conn->async;
- WT_STAT_FAST_CONN_INCR(session, async_op_alloc);
+ WT_STAT_CONN_INCR(session, async_op_alloc);
*opp = NULL;
retry:
@@ -143,7 +143,7 @@ retry:
* We still haven't found one. Return an error.
*/
if (op == NULL || op->state != WT_ASYNCOP_FREE) {
- WT_STAT_FAST_CONN_INCR(session, async_full);
+ WT_STAT_CONN_INCR(session, async_full);
WT_RET(EBUSY);
}
/*
@@ -152,10 +152,10 @@ retry:
* Start the next search at the next entry after this one.
*/
if (!__wt_atomic_cas32(&op->state, WT_ASYNCOP_FREE, WT_ASYNCOP_READY)) {
- WT_STAT_FAST_CONN_INCR(session, async_alloc_race);
+ WT_STAT_CONN_INCR(session, async_alloc_race);
goto retry;
}
- WT_STAT_FAST_CONN_INCRV(session, async_alloc_view, view);
+ WT_STAT_CONN_INCRV(session, async_alloc_view, view);
WT_RET(__async_get_format(conn, uri, config, op));
op->unique_id = __wt_atomic_add64(&async->op_id, 1);
op->optype = WT_AOP_NONE;
@@ -507,7 +507,7 @@ __wt_async_flush(WT_SESSION_IMPL *session)
if (workers == 0)
return (0);
- WT_STAT_FAST_CONN_INCR(session, async_flush);
+ WT_STAT_CONN_INCR(session, async_flush);
/*
* We have to do several things. First we have to prevent
* other callers from racing with us so that only one
diff --git a/src/async/async_op.c b/src/async/async_op.c
index 2bdc9e4ec8e..8c074e503d9 100644
--- a/src/async/async_op.c
+++ b/src/async/async_op.c
@@ -104,7 +104,7 @@ __async_search(WT_ASYNC_OP *asyncop)
op = (WT_ASYNC_OP_IMPL *)asyncop;
ASYNCOP_API_CALL(O2C(op), session, search);
- WT_STAT_FAST_CONN_INCR(O2S(op), async_op_search);
+ WT_STAT_CONN_INCR(O2S(op), async_op_search);
WT_ERR(__async_op_wrap(op, WT_AOP_SEARCH));
err: API_END_RET(session, ret);
}
@@ -122,7 +122,7 @@ __async_insert(WT_ASYNC_OP *asyncop)
op = (WT_ASYNC_OP_IMPL *)asyncop;
ASYNCOP_API_CALL(O2C(op), session, insert);
- WT_STAT_FAST_CONN_INCR(O2S(op), async_op_insert);
+ WT_STAT_CONN_INCR(O2S(op), async_op_insert);
WT_ERR(__async_op_wrap(op, WT_AOP_INSERT));
err: API_END_RET(session, ret);
}
@@ -140,7 +140,7 @@ __async_update(WT_ASYNC_OP *asyncop)
op = (WT_ASYNC_OP_IMPL *)asyncop;
ASYNCOP_API_CALL(O2C(op), session, update);
- WT_STAT_FAST_CONN_INCR(O2S(op), async_op_update);
+ WT_STAT_CONN_INCR(O2S(op), async_op_update);
WT_ERR(__async_op_wrap(op, WT_AOP_UPDATE));
err: API_END_RET(session, ret);
}
@@ -158,7 +158,7 @@ __async_remove(WT_ASYNC_OP *asyncop)
op = (WT_ASYNC_OP_IMPL *)asyncop;
ASYNCOP_API_CALL(O2C(op), session, remove);
- WT_STAT_FAST_CONN_INCR(O2S(op), async_op_remove);
+ WT_STAT_CONN_INCR(O2S(op), async_op_remove);
WT_ERR(__async_op_wrap(op, WT_AOP_REMOVE));
err: API_END_RET(session, ret);
}
@@ -176,7 +176,7 @@ __async_compact(WT_ASYNC_OP *asyncop)
op = (WT_ASYNC_OP_IMPL *)asyncop;
ASYNCOP_API_CALL(O2C(op), session, compact);
- WT_STAT_FAST_CONN_INCR(O2S(op), async_op_compact);
+ WT_STAT_CONN_INCR(O2S(op), async_op_compact);
WT_ERR(__async_op_wrap(op, WT_AOP_COMPACT));
err: API_END_RET(session, ret);
}
diff --git a/src/async/async_worker.c b/src/async/async_worker.c
index cf83d797738..401d0616eab 100644
--- a/src/async/async_worker.c
+++ b/src/async/async_worker.c
@@ -37,7 +37,7 @@ retry:
*/
while (last_consume == async->head &&
async->flush_state != WT_ASYNC_FLUSHING) {
- WT_STAT_FAST_CONN_INCR(session, async_nowork);
+ WT_STAT_CONN_INCR(session, async_nowork);
if (++tries < MAX_ASYNC_YIELD)
/*
* Initially when we find no work, allow other
diff --git a/src/block/block_ext.c b/src/block/block_ext.c
index 8a4d2b08bef..b02fea8707d 100644
--- a/src/block/block_ext.c
+++ b/src/block/block_ext.c
@@ -485,7 +485,7 @@ __block_extend(
*offp = block->size;
block->size += size;
- WT_STAT_FAST_DATA_INCR(session, block_extension);
+ WT_STAT_DATA_INCR(session, block_extension);
__wt_verbose(session, WT_VERB_BLOCK,
"file extend %" PRIdMAX "B @ %" PRIdMAX,
(intmax_t)size, (intmax_t)*offp);
@@ -507,7 +507,7 @@ __wt_block_alloc(
/* Assert we're maintaining the by-size skiplist. */
WT_ASSERT(session, block->live.avail.track_size != 0);
- WT_STAT_FAST_DATA_INCR(session, block_alloc);
+ WT_STAT_DATA_INCR(session, block_alloc);
if (size % block->allocsize != 0)
WT_RET_MSG(session, EINVAL,
"cannot allocate a block size %" PRIdMAX " that is not "
@@ -590,7 +590,7 @@ __wt_block_free(WT_SESSION_IMPL *session,
uint32_t checksum, size;
WT_UNUSED(addr_size);
- WT_STAT_FAST_DATA_INCR(session, block_free);
+ WT_STAT_DATA_INCR(session, block_free);
/* Crack the cookie. */
WT_RET(
diff --git a/src/block/block_open.c b/src/block/block_open.c
index e369d013437..4d15942709a 100644
--- a/src/block/block_open.c
+++ b/src/block/block_open.c
@@ -382,21 +382,19 @@ err: __wt_scr_free(session, &buf);
void
__wt_block_stat(WT_SESSION_IMPL *session, WT_BLOCK *block, WT_DSRC_STATS *stats)
{
- WT_UNUSED(session);
-
/*
* Reading from the live system's structure normally requires locking,
* but it's an 8B statistics read, there's no need.
*/
- WT_STAT_WRITE(stats, allocation_size, block->allocsize);
- WT_STAT_WRITE(
+ WT_STAT_WRITE(session, stats, allocation_size, block->allocsize);
+ WT_STAT_WRITE(session,
stats, block_checkpoint_size, (int64_t)block->live.ckpt_size);
- WT_STAT_WRITE(stats, block_magic, WT_BLOCK_MAGIC);
- WT_STAT_WRITE(stats, block_major, WT_BLOCK_MAJOR_VERSION);
- WT_STAT_WRITE(stats, block_minor, WT_BLOCK_MINOR_VERSION);
- WT_STAT_WRITE(
+ WT_STAT_WRITE(session, stats, block_magic, WT_BLOCK_MAGIC);
+ WT_STAT_WRITE(session, stats, block_major, WT_BLOCK_MAJOR_VERSION);
+ WT_STAT_WRITE(session, stats, block_minor, WT_BLOCK_MINOR_VERSION);
+ WT_STAT_WRITE(session,
stats, block_reuse_bytes, (int64_t)block->live.avail.bytes);
- WT_STAT_WRITE(stats, block_size, block->size);
+ WT_STAT_WRITE(session, stats, block_size, block->size);
}
/*
diff --git a/src/block/block_read.c b/src/block/block_read.c
index c6005b1f60a..1eeabd63d92 100644
--- a/src/block/block_read.c
+++ b/src/block/block_read.c
@@ -28,7 +28,7 @@ __wt_bm_preload(
block = bm->block;
- WT_STAT_FAST_CONN_INCR(session, block_preload);
+ WT_STAT_CONN_INCR(session, block_preload);
/* Crack the cookie. */
WT_RET(
@@ -86,8 +86,8 @@ __wt_bm_read(WT_BM *bm, WT_SESSION_IMPL *session,
ret = handle->fh_map_preload(handle, (WT_SESSION *)session,
buf->data, buf->size,bm->mapped_cookie);
- WT_STAT_FAST_CONN_INCR(session, block_map_read);
- WT_STAT_FAST_CONN_INCRV(session, block_byte_map_read, size);
+ WT_STAT_CONN_INCR(session, block_map_read);
+ WT_STAT_CONN_INCRV(session, block_byte_map_read, size);
return (ret);
}
@@ -164,8 +164,8 @@ __wt_block_read_off(WT_SESSION_IMPL *session, WT_BLOCK *block,
"off %" PRIuMAX ", size %" PRIu32 ", checksum %" PRIu32,
(uintmax_t)offset, size, checksum);
- WT_STAT_FAST_CONN_INCR(session, block_read);
- WT_STAT_FAST_CONN_INCRV(session, block_byte_read, size);
+ WT_STAT_CONN_INCR(session, block_read);
+ WT_STAT_CONN_INCRV(session, block_byte_read, size);
/*
* Grow the buffer as necessary and read the block. Buffers should be
diff --git a/src/block/block_vrfy.c b/src/block/block_vrfy.c
index 58b62247044..94824ad19f8 100644
--- a/src/block/block_vrfy.c
+++ b/src/block/block_vrfy.c
@@ -352,7 +352,7 @@ __wt_block_verify_addr(WT_SESSION_IMPL *session,
WT_RET(
__wt_block_buffer_to_addr(block, addr, &offset, &size, &checksum));
- /* Add to the per-file list. */
+ /* Add to the per-file list. */
WT_RET(
__verify_filefrag_add(session, block, NULL, offset, size, false));
diff --git a/src/block/block_write.c b/src/block/block_write.c
index 032f72d551b..d08aba45920 100644
--- a/src/block/block_write.c
+++ b/src/block/block_write.c
@@ -236,6 +236,10 @@ __block_write_off(WT_SESSION_IMPL *session, WT_BLOCK *block,
uint32_t checksum;
bool local_locked;
+ *offsetp = 0; /* -Werror=maybe-uninitialized */
+ *sizep = 0; /* -Werror=maybe-uninitialized */
+ *checksump = 0; /* -Werror=maybe-uninitialized */
+
fh = block->fh;
/*
@@ -363,10 +367,10 @@ __block_write_off(WT_SESSION_IMPL *session, WT_BLOCK *block,
/* Optionally discard blocks from the buffer cache. */
WT_RET(__wt_block_discard(session, block, align_size));
- WT_STAT_FAST_CONN_INCR(session, block_write);
- WT_STAT_FAST_CONN_INCRV(session, block_byte_write, align_size);
+ WT_STAT_CONN_INCR(session, block_write);
+ WT_STAT_CONN_INCRV(session, block_byte_write, align_size);
if (checkpoint_io)
- WT_STAT_FAST_CONN_INCRV(
+ WT_STAT_CONN_INCRV(
session, block_byte_write_checkpoint, align_size);
__wt_verbose(session, WT_VERB_WRITE,
diff --git a/src/btree/bt_compact.c b/src/btree/bt_compact.c
index bb1261d94b0..7ba45f29b76 100644
--- a/src/btree/bt_compact.c
+++ b/src/btree/bt_compact.c
@@ -104,7 +104,7 @@ __wt_compact(WT_SESSION_IMPL *session, const char *cfg[])
bm = btree->bm;
ref = NULL;
- WT_STAT_FAST_DATA_INCR(session, session_compact);
+ WT_STAT_DATA_INCR(session, session_compact);
/*
* Check if compaction might be useful -- the API layer will quit trying
@@ -151,7 +151,7 @@ __wt_compact(WT_SESSION_IMPL *session, const char *cfg[])
WT_ERR(__wt_page_modify_init(session, ref->page));
__wt_page_modify_set(session, ref->page);
- WT_STAT_FAST_DATA_INCR(session, btree_compact_rewrite);
+ WT_STAT_DATA_INCR(session, btree_compact_rewrite);
}
err: if (ref != NULL)
diff --git a/src/btree/bt_curnext.c b/src/btree/bt_curnext.c
index c6955dd9ed6..4d3976f9647 100644
--- a/src/btree/bt_curnext.c
+++ b/src/btree/bt_curnext.c
@@ -587,8 +587,8 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating)
session = (WT_SESSION_IMPL *)cbt->iface.session;
- WT_STAT_FAST_CONN_INCR(session, cursor_next);
- WT_STAT_FAST_DATA_INCR(session, cursor_next);
+ WT_STAT_CONN_INCR(session, cursor_next);
+ WT_STAT_DATA_INCR(session, cursor_next);
flags = WT_READ_SKIP_INTL; /* Tree walk flags. */
if (truncating)
diff --git a/src/btree/bt_curprev.c b/src/btree/bt_curprev.c
index 79fd067ac7b..2dd443ffac1 100644
--- a/src/btree/bt_curprev.c
+++ b/src/btree/bt_curprev.c
@@ -543,8 +543,8 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating)
session = (WT_SESSION_IMPL *)cbt->iface.session;
- WT_STAT_FAST_CONN_INCR(session, cursor_prev);
- WT_STAT_FAST_DATA_INCR(session, cursor_prev);
+ WT_STAT_CONN_INCR(session, cursor_prev);
+ WT_STAT_DATA_INCR(session, cursor_prev);
flags = WT_READ_PREV | WT_READ_SKIP_INTL; /* Tree walk flags. */
if (truncating)
diff --git a/src/btree/bt_cursor.c b/src/btree/bt_cursor.c
index 982226f589f..3690b41ead4 100644
--- a/src/btree/bt_cursor.c
+++ b/src/btree/bt_cursor.c
@@ -235,7 +235,7 @@ __cursor_col_search(
{
WT_DECL_RET;
- WT_WITH_PAGE_INDEX(session,
+ WT_WITH_PAGE_INDEX(session,
ret = __wt_col_search(session, cbt->iface.recno, leaf, cbt));
return (ret);
}
@@ -250,7 +250,7 @@ __cursor_row_search(
{
WT_DECL_RET;
- WT_WITH_PAGE_INDEX(session,
+ WT_WITH_PAGE_INDEX(session,
ret = __wt_row_search(session, &cbt->iface.key, leaf, cbt, insert));
return (ret);
}
@@ -290,8 +290,8 @@ __wt_btcur_reset(WT_CURSOR_BTREE *cbt)
session = (WT_SESSION_IMPL *)cbt->iface.session;
- WT_STAT_FAST_CONN_INCR(session, cursor_reset);
- WT_STAT_FAST_DATA_INCR(session, cursor_reset);
+ WT_STAT_CONN_INCR(session, cursor_reset);
+ WT_STAT_DATA_INCR(session, cursor_reset);
return (__cursor_reset(cbt));
}
@@ -315,8 +315,8 @@ __wt_btcur_search(WT_CURSOR_BTREE *cbt)
session = (WT_SESSION_IMPL *)cursor->session;
upd = NULL; /* -Wuninitialized */
- WT_STAT_FAST_CONN_INCR(session, cursor_search);
- WT_STAT_FAST_DATA_INCR(session, cursor_search);
+ WT_STAT_CONN_INCR(session, cursor_search);
+ WT_STAT_DATA_INCR(session, cursor_search);
/*
* If we have a page pinned, search it; if we don't have a page pinned,
@@ -387,8 +387,8 @@ __wt_btcur_search_near(WT_CURSOR_BTREE *cbt, int *exactp)
upd = NULL; /* -Wuninitialized */
exact = 0;
- WT_STAT_FAST_CONN_INCR(session, cursor_search_near);
- WT_STAT_FAST_DATA_INCR(session, cursor_search_near);
+ WT_STAT_CONN_INCR(session, cursor_search_near);
+ WT_STAT_DATA_INCR(session, cursor_search_near);
/*
* If we have a row-store page pinned, search it; if we don't have a
@@ -499,9 +499,9 @@ __wt_btcur_insert(WT_CURSOR_BTREE *cbt)
cursor = &cbt->iface;
session = (WT_SESSION_IMPL *)cursor->session;
- WT_STAT_FAST_CONN_INCR(session, cursor_insert);
- WT_STAT_FAST_DATA_INCR(session, cursor_insert);
- WT_STAT_FAST_DATA_INCRV(session,
+ WT_STAT_CONN_INCR(session, cursor_insert);
+ WT_STAT_DATA_INCR(session, cursor_insert);
+ WT_STAT_DATA_INCRV(session,
cursor_insert_bytes, cursor->key.size + cursor->value.size);
if (btree->type == BTREE_ROW)
@@ -562,8 +562,8 @@ retry: WT_RET(__cursor_func_init(cbt, true));
}
err: if (ret == WT_RESTART) {
- WT_STAT_FAST_CONN_INCR(session, cursor_restart);
- WT_STAT_FAST_DATA_INCR(session, cursor_restart);
+ WT_STAT_CONN_INCR(session, cursor_restart);
+ WT_STAT_DATA_INCR(session, cursor_restart);
goto retry;
}
/* Insert doesn't maintain a position across calls, clear resources. */
@@ -644,8 +644,8 @@ retry: WT_RET(__cursor_func_init(cbt, true));
}
err: if (ret == WT_RESTART) {
- WT_STAT_FAST_CONN_INCR(session, cursor_restart);
- WT_STAT_FAST_DATA_INCR(session, cursor_restart);
+ WT_STAT_CONN_INCR(session, cursor_restart);
+ WT_STAT_DATA_INCR(session, cursor_restart);
goto retry;
}
WT_TRET(__curfile_leave(cbt));
@@ -670,9 +670,9 @@ __wt_btcur_remove(WT_CURSOR_BTREE *cbt)
cursor = &cbt->iface;
session = (WT_SESSION_IMPL *)cursor->session;
- WT_STAT_FAST_CONN_INCR(session, cursor_remove);
- WT_STAT_FAST_DATA_INCR(session, cursor_remove);
- WT_STAT_FAST_DATA_INCRV(session, cursor_remove_bytes, cursor->key.size);
+ WT_STAT_CONN_INCR(session, cursor_remove);
+ WT_STAT_DATA_INCR(session, cursor_remove);
+ WT_STAT_DATA_INCRV(session, cursor_remove_bytes, cursor->key.size);
retry: WT_RET(__cursor_func_init(cbt, true));
@@ -721,8 +721,8 @@ retry: WT_RET(__cursor_func_init(cbt, true));
}
err: if (ret == WT_RESTART) {
- WT_STAT_FAST_CONN_INCR(session, cursor_restart);
- WT_STAT_FAST_DATA_INCR(session, cursor_restart);
+ WT_STAT_CONN_INCR(session, cursor_restart);
+ WT_STAT_DATA_INCR(session, cursor_restart);
goto retry;
}
/*
@@ -754,10 +754,9 @@ __wt_btcur_update(WT_CURSOR_BTREE *cbt)
cursor = &cbt->iface;
session = (WT_SESSION_IMPL *)cursor->session;
- WT_STAT_FAST_CONN_INCR(session, cursor_update);
- WT_STAT_FAST_DATA_INCR(session, cursor_update);
- WT_STAT_FAST_DATA_INCRV(
- session, cursor_update_bytes, cursor->value.size);
+ WT_STAT_CONN_INCR(session, cursor_update);
+ WT_STAT_DATA_INCR(session, cursor_update);
+ WT_STAT_DATA_INCRV(session, cursor_update_bytes, cursor->value.size);
if (btree->type == BTREE_ROW)
WT_RET(__cursor_size_chk(session, &cursor->key));
@@ -811,8 +810,8 @@ retry: WT_RET(__cursor_func_init(cbt, true));
}
err: if (ret == WT_RESTART) {
- WT_STAT_FAST_CONN_INCR(session, cursor_restart);
- WT_STAT_FAST_DATA_INCR(session, cursor_restart);
+ WT_STAT_CONN_INCR(session, cursor_restart);
+ WT_STAT_DATA_INCR(session, cursor_restart);
goto retry;
}
@@ -861,8 +860,8 @@ __wt_btcur_next_random(WT_CURSOR_BTREE *cbt)
if (btree->type != BTREE_ROW)
WT_RET(ENOTSUP);
- WT_STAT_FAST_CONN_INCR(session, cursor_next);
- WT_STAT_FAST_DATA_INCR(session, cursor_next);
+ WT_STAT_CONN_INCR(session, cursor_next);
+ WT_STAT_DATA_INCR(session, cursor_next);
/*
* If retrieving random values without sampling, or we don't have a
@@ -1093,8 +1092,8 @@ retry: WT_RET(__wt_btcur_remove(start));
}
if (ret == WT_RESTART) {
- WT_STAT_FAST_CONN_INCR(session, cursor_restart);
- WT_STAT_FAST_DATA_INCR(session, cursor_restart);
+ WT_STAT_CONN_INCR(session, cursor_restart);
+ WT_STAT_DATA_INCR(session, cursor_restart);
goto retry;
}
@@ -1148,8 +1147,8 @@ retry: WT_RET(__wt_btcur_remove(start));
}
if (ret == WT_RESTART) {
- WT_STAT_FAST_CONN_INCR(session, cursor_restart);
- WT_STAT_FAST_DATA_INCR(session, cursor_restart);
+ WT_STAT_CONN_INCR(session, cursor_restart);
+ WT_STAT_DATA_INCR(session, cursor_restart);
goto retry;
}
@@ -1170,7 +1169,7 @@ __wt_btcur_range_truncate(WT_CURSOR_BTREE *start, WT_CURSOR_BTREE *stop)
session = (WT_SESSION_IMPL *)start->iface.session;
btree = start->btree;
- WT_STAT_FAST_DATA_INCR(session, cursor_truncate);
+ WT_STAT_DATA_INCR(session, cursor_truncate);
/*
* For recovery, log the start and stop keys for a truncate operation,
diff --git a/src/btree/bt_delete.c b/src/btree/bt_delete.c
index 54b7fedb31d..00e41475de9 100644
--- a/src/btree/bt_delete.c
+++ b/src/btree/bt_delete.c
@@ -131,8 +131,8 @@ __wt_delete_page(WT_SESSION_IMPL *session, WT_REF *ref, bool *skipp)
WT_ERR(__wt_txn_modify_ref(session, ref));
*skipp = true;
- WT_STAT_FAST_CONN_INCR(session, rec_page_delete_fast);
- WT_STAT_FAST_DATA_INCR(session, rec_page_delete_fast);
+ WT_STAT_CONN_INCR(session, rec_page_delete_fast);
+ WT_STAT_DATA_INCR(session, rec_page_delete_fast);
WT_PUBLISH(ref->state, WT_REF_DELETED);
return (0);
diff --git a/src/btree/bt_io.c b/src/btree/bt_io.c
index 8053417f838..42c3a849a88 100644
--- a/src/btree/bt_io.c
+++ b/src/btree/bt_io.c
@@ -139,12 +139,12 @@ __wt_bt_read(WT_SESSION_IMPL *session,
WT_ERR(__wt_verify_dsk(session, tmp->data, buf));
}
- WT_STAT_FAST_CONN_INCR(session, cache_read);
- WT_STAT_FAST_DATA_INCR(session, cache_read);
+ WT_STAT_CONN_INCR(session, cache_read);
+ WT_STAT_DATA_INCR(session, cache_read);
if (F_ISSET(dsk, WT_PAGE_COMPRESSED))
- WT_STAT_FAST_DATA_INCR(session, compress_read);
- WT_STAT_FAST_CONN_INCRV(session, cache_bytes_read, dsk->mem_size);
- WT_STAT_FAST_DATA_INCRV(session, cache_bytes_read, dsk->mem_size);
+ WT_STAT_DATA_INCR(session, compress_read);
+ WT_STAT_CONN_INCRV(session, cache_bytes_read, dsk->mem_size);
+ WT_STAT_DATA_INCRV(session, cache_bytes_read, dsk->mem_size);
if (0) {
corrupt: if (ret == 0)
@@ -234,7 +234,7 @@ __wt_bt_write(WT_SESSION_IMPL *session, WT_ITEM *buf,
ip = buf;
else if (buf->size <= btree->allocsize) {
ip = buf;
- WT_STAT_FAST_DATA_INCR(session, compress_write_too_small);
+ WT_STAT_DATA_INCR(session, compress_write_too_small);
} else {
/* Skip the header bytes of the source data. */
src = (uint8_t *)buf->mem + WT_BLOCK_COMPRESS_SKIP;
@@ -283,10 +283,10 @@ __wt_bt_write(WT_SESSION_IMPL *session, WT_ITEM *buf,
buf->size / btree->allocsize <=
result_len / btree->allocsize) {
ip = buf;
- WT_STAT_FAST_DATA_INCR(session, compress_write_fail);
+ WT_STAT_DATA_INCR(session, compress_write_fail);
} else {
compressed = true;
- WT_STAT_FAST_DATA_INCR(session, compress_write);
+ WT_STAT_DATA_INCR(session, compress_write);
/*
* Copy in the skipped header bytes, set the final data
@@ -363,11 +363,11 @@ __wt_bt_write(WT_SESSION_IMPL *session, WT_ITEM *buf,
bm->write(
bm, session, ip, addr, addr_sizep, data_checksum, checkpoint_io));
- WT_STAT_FAST_CONN_INCR(session, cache_write);
- WT_STAT_FAST_DATA_INCR(session, cache_write);
+ WT_STAT_CONN_INCR(session, cache_write);
+ WT_STAT_DATA_INCR(session, cache_write);
S2C(session)->cache->bytes_written += dsk->mem_size;
- WT_STAT_FAST_CONN_INCRV(session, cache_bytes_write, dsk->mem_size);
- WT_STAT_FAST_DATA_INCRV(session, cache_bytes_write, dsk->mem_size);
+ WT_STAT_CONN_INCRV(session, cache_bytes_write, dsk->mem_size);
+ WT_STAT_DATA_INCRV(session, cache_bytes_write, dsk->mem_size);
err: __wt_scr_free(session, &ctmp);
__wt_scr_free(session, &etmp);
diff --git a/src/btree/bt_ovfl.c b/src/btree/bt_ovfl.c
index feb78df75e2..29ea561db3a 100644
--- a/src/btree/bt_ovfl.c
+++ b/src/btree/bt_ovfl.c
@@ -33,8 +33,8 @@ __ovfl_read(WT_SESSION_IMPL *session,
store->data = WT_PAGE_HEADER_BYTE(btree, dsk);
store->size = dsk->u.datalen;
- WT_STAT_FAST_CONN_INCR(session, cache_read_overflow);
- WT_STAT_FAST_DATA_INCR(session, cache_read_overflow);
+ WT_STAT_CONN_INCR(session, cache_read_overflow);
+ WT_STAT_DATA_INCR(session, cache_read_overflow);
return (0);
}
@@ -209,8 +209,8 @@ __wt_ovfl_cache(WT_SESSION_IMPL *session,
*/
if (!visible) {
WT_RET(__ovfl_cache(session, page, vpack));
- WT_STAT_FAST_CONN_INCR(session, cache_overflow_value);
- WT_STAT_FAST_DATA_INCR(session, cache_overflow_value);
+ WT_STAT_CONN_INCR(session, cache_overflow_value);
+ WT_STAT_DATA_INCR(session, cache_overflow_value);
}
/*
diff --git a/src/btree/bt_read.c b/src/btree/bt_read.c
index a23ab0f091f..c54eaa69c43 100644
--- a/src/btree/bt_read.c
+++ b/src/btree/bt_read.c
@@ -431,8 +431,8 @@ __page_read(WT_SESSION_IMPL *session, WT_REF *ref)
*/
dsk = tmp.data;
if (F_ISSET(dsk, WT_PAGE_LAS_UPDATE) && __wt_las_is_written(session)) {
- WT_STAT_FAST_CONN_INCR(session, cache_read_lookaside);
- WT_STAT_FAST_DATA_INCR(session, cache_read_lookaside);
+ WT_STAT_CONN_INCR(session, cache_read_lookaside);
+ WT_STAT_DATA_INCR(session, cache_read_lookaside);
WT_ERR(__las_page_instantiate(
session, ref, btree->id, addr, addr_size));
@@ -481,8 +481,8 @@ __wt_page_in_func(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags
* eviction server can dominate these statistics.
*/
if (!LF_ISSET(WT_READ_CACHE)) {
- WT_STAT_FAST_CONN_INCR(session, cache_pages_requested);
- WT_STAT_FAST_DATA_INCR(session, cache_pages_requested);
+ WT_STAT_CONN_INCR(session, cache_pages_requested);
+ WT_STAT_DATA_INCR(session, cache_pages_requested);
}
for (evict_soon = stalled = false,
@@ -525,7 +525,7 @@ __wt_page_in_func(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags
return (WT_NOTFOUND);
/* Waiting on another thread's read, stall. */
- WT_STAT_FAST_CONN_INCR(session, page_read_blocked);
+ WT_STAT_CONN_INCR(session, page_read_blocked);
stalled = true;
break;
case WT_REF_LOCKED:
@@ -533,7 +533,7 @@ __wt_page_in_func(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags
return (WT_NOTFOUND);
/* Waiting on eviction, stall. */
- WT_STAT_FAST_CONN_INCR(session, page_locked_blocked);
+ WT_STAT_CONN_INCR(session, page_locked_blocked);
stalled = true;
break;
case WT_REF_SPLIT:
@@ -560,8 +560,7 @@ __wt_page_in_func(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags
WT_RET(__wt_hazard_set(session, ref, &busy));
#endif
if (busy) {
- WT_STAT_FAST_CONN_INCR(
- session, page_busy_blocked);
+ WT_STAT_CONN_INCR(session, page_busy_blocked);
break;
}
@@ -590,7 +589,7 @@ __wt_page_in_func(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags
/* If forced eviction fails, stall. */
if (ret == EBUSY) {
ret = 0;
- WT_STAT_FAST_CONN_INCR(session,
+ WT_STAT_CONN_INCR(session,
page_forcible_evict_blocked);
stalled = true;
break;
@@ -661,7 +660,7 @@ skip_evict:
continue;
}
sleep_cnt = WT_MIN(sleep_cnt + WT_THOUSAND, 10000);
- WT_STAT_FAST_CONN_INCRV(session, page_sleep, sleep_cnt);
+ WT_STAT_CONN_INCRV(session, page_sleep, sleep_cnt);
__wt_sleep(0, sleep_cnt);
}
}
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c
index e05f3746052..ea667460966 100644
--- a/src/btree/bt_split.c
+++ b/src/btree/bt_split.c
@@ -542,10 +542,10 @@ __split_root(WT_SESSION_IMPL *session, WT_PAGE *root)
uint32_t slots;
void *p;
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_deepen);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_deepen);
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_split_internal);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_split_internal);
+ WT_STAT_CONN_INCR(session, cache_eviction_deepen);
+ WT_STAT_DATA_INCR(session, cache_eviction_deepen);
+ WT_STAT_CONN_INCR(session, cache_eviction_split_internal);
+ WT_STAT_DATA_INCR(session, cache_eviction_split_internal);
btree = S2BT(session);
alloc_index = NULL;
@@ -1028,8 +1028,8 @@ __split_internal(WT_SESSION_IMPL *session, WT_PAGE *parent, WT_PAGE *page)
uint32_t slots;
void *p;
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_split_internal);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_split_internal);
+ WT_STAT_CONN_INCR(session, cache_eviction_split_internal);
+ WT_STAT_DATA_INCR(session, cache_eviction_split_internal);
/* The page will be marked dirty, make sure that will succeed. */
WT_RET(__wt_page_modify_init(session, page));
@@ -1742,8 +1742,8 @@ __split_insert(WT_SESSION_IMPL *session, WT_REF *ref)
uint8_t type;
int i;
- WT_STAT_FAST_CONN_INCR(session, cache_inmem_split);
- WT_STAT_FAST_DATA_INCR(session, cache_inmem_split);
+ WT_STAT_CONN_INCR(session, cache_inmem_split);
+ WT_STAT_DATA_INCR(session, cache_inmem_split);
page = ref->page;
right = NULL;
@@ -2110,8 +2110,8 @@ __split_multi(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
size_t parent_incr;
uint32_t i, new_entries;
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_split_leaf);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_split_leaf);
+ WT_STAT_CONN_INCR(session, cache_eviction_split_leaf);
+ WT_STAT_DATA_INCR(session, cache_eviction_split_leaf);
page = ref->page;
mod = page->modify;
diff --git a/src/btree/col_srch.c b/src/btree/col_srch.c
index 6c96181d3bf..64ee9e94f4c 100644
--- a/src/btree/col_srch.c
+++ b/src/btree/col_srch.c
@@ -210,7 +210,7 @@ leaf_only:
page = current->page;
cbt->ref = current;
- /*
+ /*
* Don't bother searching if the caller is appending a new record where
* we'll allocate the record number; we're not going to find a match by
* definition, and we figure out the record number and position when we
diff --git a/src/checksum/arm64/crc32-arm64.c b/src/checksum/arm64/crc32-arm64.c
index 5d6c5f69c58..38b4f623044 100644
--- a/src/checksum/arm64/crc32-arm64.c
+++ b/src/checksum/arm64/crc32-arm64.c
@@ -32,14 +32,18 @@
#include <asm/hwcap.h>
#include <sys/auxv.h>
+#ifndef __GNUC__
+#define __asm__ asm
+#endif
+
#define CRC32CX(crc,value) \
- asm("crc32cx %w[c], %w[c], %x[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32cx %w[c], %w[c], %x[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
#define CRC32CW(crc,value) \
- asm("crc32cw %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32cw %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
#define CRC32CH(crc,value) \
- asm("crc32ch %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32ch %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
#define CRC32CB(crc,value) \
- asm("crc32cb %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32cb %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
/*
* __wt_checksum_hw --
diff --git a/src/config/config_api.c b/src/config/config_api.c
index 8655057e94d..8820b81a410 100644
--- a/src/config/config_api.c
+++ b/src/config/config_api.c
@@ -113,7 +113,7 @@ wiredtiger_config_validate(WT_SESSION *wt_session,
session = (WT_SESSION_IMPL *)wt_session;
- /*
+ /*
* It's a logic error to specify both a session and an event handler.
*/
if (session != NULL && handler != NULL)
diff --git a/src/config/config_def.c b/src/config/config_def.c
index f231d7fc5d9..7bad5f12a9f 100644
--- a/src/config/config_def.c
+++ b/src/config/config_def.c
@@ -1005,7 +1005,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {
"async=(enabled=false,ops_max=1024,threads=2),cache_overhead=8,"
"cache_size=100MB,checkpoint=(log_size=0,wait=0),error_prefix=,"
"eviction=(threads_max=1,threads_min=1),"
- "eviction_checkpoint_target=15,eviction_dirty_target=5,"
+ "eviction_checkpoint_target=5,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",file_manager=(close_handle_minimum=250,close_idle_time=30,"
"close_scan_interval=10),log=(archive=true,prealloc=true,"
@@ -1207,7 +1207,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {
"wait=0),checkpoint_sync=true,config_base=true,create=false,"
"direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
"eviction=(threads_max=1,threads_min=1),"
- "eviction_checkpoint_target=15,eviction_dirty_target=5,"
+ "eviction_checkpoint_target=5,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",exclusive=false,extensions=,file_extend=,"
"file_manager=(close_handle_minimum=250,close_idle_time=30,"
@@ -1230,7 +1230,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {
"wait=0),checkpoint_sync=true,config_base=true,create=false,"
"direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
"eviction=(threads_max=1,threads_min=1),"
- "eviction_checkpoint_target=15,eviction_dirty_target=5,"
+ "eviction_checkpoint_target=5,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",exclusive=false,extensions=,file_extend=,"
"file_manager=(close_handle_minimum=250,close_idle_time=30,"
@@ -1252,7 +1252,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {
",cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0,"
"wait=0),checkpoint_sync=true,direct_io=,encryption=(keyid=,name="
",secretkey=),error_prefix=,eviction=(threads_max=1,"
- "threads_min=1),eviction_checkpoint_target=15,"
+ "threads_min=1),eviction_checkpoint_target=5,"
"eviction_dirty_target=5,eviction_dirty_trigger=20,"
"eviction_target=80,eviction_trigger=95,extensions=,file_extend=,"
"file_manager=(close_handle_minimum=250,close_idle_time=30,"
@@ -1273,7 +1273,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {
",cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0,"
"wait=0),checkpoint_sync=true,direct_io=,encryption=(keyid=,name="
",secretkey=),error_prefix=,eviction=(threads_max=1,"
- "threads_min=1),eviction_checkpoint_target=15,"
+ "threads_min=1),eviction_checkpoint_target=5,"
"eviction_dirty_target=5,eviction_dirty_trigger=20,"
"eviction_target=80,eviction_trigger=95,extensions=,file_extend=,"
"file_manager=(close_handle_minimum=250,close_idle_time=30,"
@@ -1323,7 +1323,7 @@ __wt_conn_config_discard(WT_SESSION_IMPL *session)
__wt_free(session, conn->config_entries);
}
-/*
+/*
* __wt_conn_config_match --
* Return the static configuration entry for a method.
*/
diff --git a/src/conn/conn_api.c b/src/conn/conn_api.c
index 61683f3394e..faec72a4ac0 100644
--- a/src/conn/conn_api.c
+++ b/src/conn/conn_api.c
@@ -1657,7 +1657,7 @@ __conn_statistics_config(WT_SESSION_IMPL *session, const char *cfg[])
set = 0;
if ((ret = __wt_config_subgets(
session, &cval, "none", &sval)) == 0 && sval.val != 0) {
- LF_SET(WT_CONN_STAT_NONE);
+ flags = 0;
++set;
}
WT_RET_NOTFOUND_OK(ret);
@@ -1677,8 +1677,13 @@ __conn_statistics_config(WT_SESSION_IMPL *session, const char *cfg[])
WT_RET_NOTFOUND_OK(ret);
if ((ret = __wt_config_subgets(
- session, &cval, "clear", &sval)) == 0 && sval.val != 0)
+ session, &cval, "clear", &sval)) == 0 && sval.val != 0) {
+ if (!LF_ISSET(WT_CONN_STAT_FAST | WT_CONN_STAT_ALL))
+ WT_RET_MSG(session, EINVAL,
+ "the value \"clear\" can be specified only if "
+ "either \"all\" or \"fast\" is specified");
LF_SET(WT_CONN_STAT_CLEAR);
+ }
WT_RET_NOTFOUND_OK(ret);
if (set > 1)
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c
index 7e94e9e87dc..6788b1f7f47 100644
--- a/src/conn/conn_cache.c
+++ b/src/conn/conn_cache.c
@@ -56,6 +56,13 @@ __cache_config_local(WT_SESSION_IMPL *session, bool shared, const char *cfg[])
cache->eviction_dirty_target = (u_int)cval.val;
/*
+ * Don't allow the dirty target to be larger than the overall
+ * target.
+ */
+ if (cache->eviction_dirty_target > cache->eviction_target)
+ cache->eviction_dirty_target = cache->eviction_target;
+
+ /*
* Sanity check the checkpoint target: don't allow a value
* lower than the dirty target.
*/
@@ -68,6 +75,13 @@ __cache_config_local(WT_SESSION_IMPL *session, bool shared, const char *cfg[])
WT_RET(__wt_config_gets(
session, cfg, "eviction_dirty_trigger", &cval));
cache->eviction_dirty_trigger = (u_int)cval.val;
+
+ /*
+ * Don't allow the dirty trigger to be larger than the overall
+ * trigger or we can get stuck with a cache full of dirty data.
+ */
+ if (cache->eviction_dirty_trigger > cache->eviction_trigger)
+ cache->eviction_dirty_trigger = cache->eviction_trigger;
}
WT_RET(__wt_config_gets(session, cfg, "eviction.threads_max", &cval));
diff --git a/src/conn/conn_log.c b/src/conn/conn_log.c
index a8f0fe4810b..2786526c2fa 100644
--- a/src/conn/conn_log.c
+++ b/src/conn/conn_log.c
@@ -137,7 +137,7 @@ __logmgr_config(
if (!reconfig) {
WT_RET(__wt_config_gets(session, cfg, "log.file_max", &cval));
conn->log_file_max = (wt_off_t)cval.val;
- WT_STAT_FAST_CONN_SET(session,
+ WT_STAT_CONN_SET(session,
log_max_filesize, conn->log_file_max);
}
@@ -299,14 +299,14 @@ __log_prealloc_once(WT_SESSION_IMPL *session)
"Missed %" PRIu32 ". Now pre-allocating up to %" PRIu32,
log->prep_missed, conn->log_prealloc);
}
- WT_STAT_FAST_CONN_SET(session, log_prealloc_max, conn->log_prealloc);
+ WT_STAT_CONN_SET(session, log_prealloc_max, conn->log_prealloc);
/*
* Allocate up to the maximum number that we just computed and detected.
*/
for (i = reccount; i < (u_int)conn->log_prealloc; i++) {
WT_ERR(__wt_log_allocfile(
session, ++log->prep_fileid, WT_LOG_PREPNAME));
- WT_STAT_FAST_CONN_INCR(session, log_prealloc_files);
+ WT_STAT_CONN_INCR(session, log_prealloc_files);
}
/*
* Reset the missed count now. If we missed during pre-allocating
@@ -632,8 +632,7 @@ restart:
coalescing->slot_last_offset =
slot->slot_last_offset;
coalescing->slot_end_lsn = slot->slot_end_lsn;
- WT_STAT_FAST_CONN_INCR(
- session, log_slot_coalesced);
+ WT_STAT_CONN_INCR(session, log_slot_coalesced);
/*
* Copy the flag for later closing.
*/
@@ -674,7 +673,7 @@ restart:
log->write_start_lsn = slot->slot_start_lsn;
log->write_lsn = slot->slot_end_lsn;
__wt_cond_signal(session, log->log_write_cond);
- WT_STAT_FAST_CONN_INCR(session, log_write_lsn);
+ WT_STAT_CONN_INCR(session, log_write_lsn);
/*
* Signal the close thread if needed.
*/
@@ -720,7 +719,7 @@ __log_wrlsn_server(void *arg)
__wt_log_cmp(&log->write_lsn, &log->alloc_lsn) != 0)
__wt_log_wrlsn(session, &yield);
else
- WT_STAT_FAST_CONN_INCR(session, log_write_lsn_skip);
+ WT_STAT_CONN_INCR(session, log_write_lsn_skip);
prev = log->alloc_lsn;
did_work = yield == 0;
@@ -926,7 +925,7 @@ __wt_logmgr_open(WT_SESSION_IMPL *session)
conn = S2C(session);
- /* If no log thread services are configured, we're done. */
+ /* If no log thread services are configured, we're done. */
if (!FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED))
return (0);
diff --git a/src/conn/conn_stat.c b/src/conn/conn_stat.c
index 530bbfcd2db..66979dfd023 100644
--- a/src/conn/conn_stat.c
+++ b/src/conn/conn_stat.c
@@ -530,7 +530,7 @@ __statlog_server(void *arg)
/* Wait until the next event. */
__wt_cond_wait(session, conn->stat_cond, conn->stat_usecs);
- if (!FLD_ISSET(conn->stat_flags, WT_CONN_STAT_NONE))
+ if (WT_STAT_ENABLED(session))
WT_ERR(__statlog_log_one(session, &path, &tmp));
}
diff --git a/src/conn/conn_sweep.c b/src/conn/conn_sweep.c
index 25057d73564..03593f8951a 100644
--- a/src/conn/conn_sweep.c
+++ b/src/conn/conn_sweep.c
@@ -48,7 +48,7 @@ __sweep_mark(WT_SESSION_IMPL *session, time_t now)
continue;
dhandle->timeofdeath = now;
- WT_STAT_FAST_CONN_INCR(session, dh_sweep_tod);
+ WT_STAT_CONN_INCR(session, dh_sweep_tod);
}
}
@@ -167,10 +167,10 @@ __sweep_discard_trees(WT_SESSION_IMPL *session, u_int *dead_handlesp)
/* We closed the btree handle. */
if (ret == 0) {
- WT_STAT_FAST_CONN_INCR(session, dh_sweep_close);
+ WT_STAT_CONN_INCR(session, dh_sweep_close);
++*dead_handlesp;
} else
- WT_STAT_FAST_CONN_INCR(session, dh_sweep_ref);
+ WT_STAT_CONN_INCR(session, dh_sweep_ref);
WT_RET_BUSY_OK(ret);
}
@@ -236,9 +236,9 @@ __sweep_remove_handles(WT_SESSION_IMPL *session)
WT_WITH_HANDLE_LIST_LOCK(session,
ret = __sweep_remove_one(session, dhandle));
if (ret == 0)
- WT_STAT_FAST_CONN_INCR(session, dh_sweep_remove);
+ WT_STAT_CONN_INCR(session, dh_sweep_remove);
else
- WT_STAT_FAST_CONN_INCR(session, dh_sweep_ref);
+ WT_STAT_CONN_INCR(session, dh_sweep_ref);
WT_RET_BUSY_OK(ret);
}
@@ -273,7 +273,7 @@ __sweep_server(void *arg)
conn->sweep_cond, conn->sweep_interval * WT_MILLION);
WT_ERR(__wt_seconds(session, &now));
- WT_STAT_FAST_CONN_INCR(session, dh_sweeps);
+ WT_STAT_CONN_INCR(session, dh_sweeps);
/*
* Sweep the lookaside table. If the lookaside table hasn't yet
diff --git a/src/cursor/cur_bulk.c b/src/cursor/cur_bulk.c
index d1a53057650..68611e30ff1 100644
--- a/src/cursor/cur_bulk.c
+++ b/src/cursor/cur_bulk.c
@@ -49,7 +49,7 @@ __curbulk_insert_fix(WT_CURSOR *cursor)
* until the bulk cursor is closed.
*/
CURSOR_API_CALL(cursor, session, insert, btree);
- WT_STAT_FAST_DATA_INCR(session, cursor_insert_bulk);
+ WT_STAT_DATA_INCR(session, cursor_insert_bulk);
/*
* If the "append" flag was configured, the application doesn't have to
@@ -99,7 +99,7 @@ __curbulk_insert_fix_bitmap(WT_CURSOR *cursor)
* until the bulk cursor is closed.
*/
CURSOR_API_CALL(cursor, session, insert, btree);
- WT_STAT_FAST_DATA_INCR(session, cursor_insert_bulk);
+ WT_STAT_DATA_INCR(session, cursor_insert_bulk);
WT_CURSOR_CHECKVALUE(cursor);
@@ -131,7 +131,7 @@ __curbulk_insert_var(WT_CURSOR *cursor)
* until the bulk cursor is closed.
*/
CURSOR_API_CALL(cursor, session, insert, btree);
- WT_STAT_FAST_DATA_INCR(session, cursor_insert_bulk);
+ WT_STAT_DATA_INCR(session, cursor_insert_bulk);
/*
* If the "append" flag was configured, the application doesn't have to
@@ -239,7 +239,7 @@ __curbulk_insert_row(WT_CURSOR *cursor)
* until the bulk cursor is closed.
*/
CURSOR_API_CALL(cursor, session, insert, btree);
- WT_STAT_FAST_DATA_INCR(session, cursor_insert_bulk);
+ WT_STAT_DATA_INCR(session, cursor_insert_bulk);
WT_CURSOR_CHECKKEY(cursor);
WT_CURSOR_CHECKVALUE(cursor);
@@ -286,7 +286,7 @@ __curbulk_insert_row_skip_check(WT_CURSOR *cursor)
* until the bulk cursor is closed.
*/
CURSOR_API_CALL(cursor, session, insert, btree);
- WT_STAT_FAST_DATA_INCR(session, cursor_insert_bulk);
+ WT_STAT_DATA_INCR(session, cursor_insert_bulk);
WT_CURSOR_CHECKKEY(cursor);
WT_CURSOR_CHECKVALUE(cursor);
diff --git a/src/cursor/cur_ds.c b/src/cursor/cur_ds.c
index 8d4b7a9384b..458e0f1b1f0 100644
--- a/src/cursor/cur_ds.c
+++ b/src/cursor/cur_ds.c
@@ -184,12 +184,12 @@ __curds_next(WT_CURSOR *cursor)
CURSOR_API_CALL(cursor, session, next, NULL);
- WT_STAT_FAST_CONN_INCR(session, cursor_next);
- WT_STAT_FAST_DATA_INCR(session, cursor_next);
+ WT_STAT_CONN_INCR(session, cursor_next);
+ WT_STAT_DATA_INCR(session, cursor_next);
WT_ERR(__curds_txn_enter(session));
- F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
+ F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
ret = __curds_cursor_resolve(cursor, source->next(source));
err: __curds_txn_leave(session);
@@ -212,12 +212,12 @@ __curds_prev(WT_CURSOR *cursor)
CURSOR_API_CALL(cursor, session, prev, NULL);
- WT_STAT_FAST_CONN_INCR(session, cursor_prev);
- WT_STAT_FAST_DATA_INCR(session, cursor_prev);
+ WT_STAT_CONN_INCR(session, cursor_prev);
+ WT_STAT_DATA_INCR(session, cursor_prev);
WT_ERR(__curds_txn_enter(session));
- F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
+ F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
ret = __curds_cursor_resolve(cursor, source->prev(source));
err: __curds_txn_leave(session);
@@ -239,8 +239,8 @@ __curds_reset(WT_CURSOR *cursor)
CURSOR_API_CALL(cursor, session, reset, NULL);
- WT_STAT_FAST_CONN_INCR(session, cursor_reset);
- WT_STAT_FAST_DATA_INCR(session, cursor_reset);
+ WT_STAT_CONN_INCR(session, cursor_reset);
+ WT_STAT_DATA_INCR(session, cursor_reset);
WT_ERR(source->reset(source));
@@ -264,8 +264,8 @@ __curds_search(WT_CURSOR *cursor)
CURSOR_API_CALL(cursor, session, search, NULL);
- WT_STAT_FAST_CONN_INCR(session, cursor_search);
- WT_STAT_FAST_DATA_INCR(session, cursor_search);
+ WT_STAT_CONN_INCR(session, cursor_search);
+ WT_STAT_DATA_INCR(session, cursor_search);
WT_ERR(__curds_txn_enter(session));
@@ -292,8 +292,8 @@ __curds_search_near(WT_CURSOR *cursor, int *exact)
CURSOR_API_CALL(cursor, session, search_near, NULL);
- WT_STAT_FAST_CONN_INCR(session, cursor_search_near);
- WT_STAT_FAST_DATA_INCR(session, cursor_search_near);
+ WT_STAT_CONN_INCR(session, cursor_search_near);
+ WT_STAT_DATA_INCR(session, cursor_search_near);
WT_ERR(__curds_txn_enter(session));
@@ -323,9 +323,9 @@ __curds_insert(WT_CURSOR *cursor)
WT_ERR(__curds_txn_enter(session));
- WT_STAT_FAST_CONN_INCR(session, cursor_insert);
- WT_STAT_FAST_DATA_INCR(session, cursor_insert);
- WT_STAT_FAST_DATA_INCRV(session,
+ WT_STAT_CONN_INCR(session, cursor_insert);
+ WT_STAT_DATA_INCR(session, cursor_insert);
+ WT_STAT_DATA_INCRV(session,
cursor_insert_bytes, cursor->key.size + cursor->value.size);
if (!F_ISSET(cursor, WT_CURSTD_APPEND))
@@ -354,10 +354,9 @@ __curds_update(WT_CURSOR *cursor)
CURSOR_UPDATE_API_CALL(cursor, session, update, NULL);
- WT_STAT_FAST_CONN_INCR(session, cursor_update);
- WT_STAT_FAST_DATA_INCR(session, cursor_update);
- WT_STAT_FAST_DATA_INCRV(
- session, cursor_update_bytes, cursor->value.size);
+ WT_STAT_CONN_INCR(session, cursor_update);
+ WT_STAT_DATA_INCR(session, cursor_update);
+ WT_STAT_DATA_INCRV(session, cursor_update_bytes, cursor->value.size);
WT_ERR(__curds_txn_enter(session));
@@ -386,9 +385,9 @@ __curds_remove(WT_CURSOR *cursor)
CURSOR_REMOVE_API_CALL(cursor, session, NULL);
- WT_STAT_FAST_CONN_INCR(session, cursor_remove);
- WT_STAT_FAST_DATA_INCR(session, cursor_remove);
- WT_STAT_FAST_DATA_INCRV(session, cursor_remove_bytes, cursor->key.size);
+ WT_STAT_CONN_INCR(session, cursor_remove);
+ WT_STAT_DATA_INCR(session, cursor_remove);
+ WT_STAT_DATA_INCRV(session, cursor_remove_bytes, cursor->key.size);
WT_ERR(__curds_txn_enter(session));
diff --git a/src/cursor/cur_file.c b/src/cursor/cur_file.c
index 8e7bd4bbea5..e304cf7b775 100644
--- a/src/cursor/cur_file.c
+++ b/src/cursor/cur_file.c
@@ -488,8 +488,8 @@ __curfile_create(WT_SESSION_IMPL *session,
WT_ERR(__wt_cursor_init(
cursor, cursor->internal_uri, owner, cfg, cursorp));
- WT_STAT_FAST_CONN_INCR(session, cursor_create);
- WT_STAT_FAST_DATA_INCR(session, cursor_create);
+ WT_STAT_CONN_INCR(session, cursor_create);
+ WT_STAT_DATA_INCR(session, cursor_create);
if (0) {
err: WT_TRET(__curfile_close(cursor));
diff --git a/src/cursor/cur_log.c b/src/cursor/cur_log.c
index 76f31b417a6..21a7f674c68 100644
--- a/src/cursor/cur_log.c
+++ b/src/cursor/cur_log.c
@@ -246,8 +246,8 @@ __curlog_next(WT_CURSOR *cursor)
}
WT_ASSERT(session, cl->logrec->data != NULL);
WT_ERR(__curlog_kv(session, cursor));
- WT_STAT_FAST_CONN_INCR(session, cursor_next);
- WT_STAT_FAST_DATA_INCR(session, cursor_next);
+ WT_STAT_CONN_INCR(session, cursor_next);
+ WT_STAT_DATA_INCR(session, cursor_next);
err: API_END_RET(session, ret);
@@ -282,8 +282,8 @@ __curlog_search(WT_CURSOR *cursor)
ret = WT_NOTFOUND;
WT_ERR(ret);
WT_ERR(__curlog_kv(session, cursor));
- WT_STAT_FAST_CONN_INCR(session, cursor_search);
- WT_STAT_FAST_DATA_INCR(session, cursor_search);
+ WT_STAT_CONN_INCR(session, cursor_search);
+ WT_STAT_DATA_INCR(session, cursor_search);
err: API_END_RET(session, ret);
}
diff --git a/src/cursor/cur_stat.c b/src/cursor/cur_stat.c
index 5c9159a4c0b..700cc366ff0 100644
--- a/src/cursor/cur_stat.c
+++ b/src/cursor/cur_stat.c
@@ -599,7 +599,7 @@ __wt_curstat_open(WT_SESSION_IMPL *session,
* Statistics cursor configuration: must match (and defaults to), the
* database configuration.
*/
- if (FLD_ISSET(conn->stat_flags, WT_CONN_STAT_NONE))
+ if (!WT_STAT_ENABLED(session))
goto config_err;
if ((ret = __wt_config_gets(session, cfg, "statistics", &cval)) == 0) {
if ((ret = __wt_config_subgets(
diff --git a/src/cursor/cur_std.c b/src/cursor/cur_std.c
index bf7280f796b..6264de89df9 100644
--- a/src/cursor/cur_std.c
+++ b/src/cursor/cur_std.c
@@ -547,7 +547,7 @@ __wt_cursor_close(WT_CURSOR *cursor)
TAILQ_REMOVE(&session->cursors, cursor, q);
(void)__wt_atomic_sub32(&S2C(session)->open_cursor_count, 1);
- WT_STAT_FAST_DATA_DECR(session, session_cursor_open);
+ WT_STAT_DATA_DECR(session, session_cursor_open);
}
__wt_buf_free(session, &cursor->key);
@@ -763,7 +763,7 @@ __wt_cursor_init(WT_CURSOR *cursor,
F_SET(cursor, WT_CURSTD_OPEN);
(void)__wt_atomic_add32(&S2C(session)->open_cursor_count, 1);
- WT_STAT_FAST_DATA_INCR(session, session_cursor_open);
+ WT_STAT_DATA_INCR(session, session_cursor_open);
*cursorp = (cdump != NULL) ? cdump : cursor;
return (0);
diff --git a/src/cursor/cur_table.c b/src/cursor/cur_table.c
index 0498c89fcbe..1b93b27f564 100644
--- a/src/cursor/cur_table.c
+++ b/src/cursor/cur_table.c
@@ -646,7 +646,7 @@ __wt_table_range_truncate(WT_CURSOR_TABLE *start, WT_CURSOR_TABLE *stop)
/* Open any indices. */
WT_RET(__curtable_open_indices(ctable));
WT_RET(__wt_scr_alloc(session, 128, &key));
- WT_STAT_FAST_DATA_INCR(session, cursor_truncate);
+ WT_STAT_DATA_INCR(session, cursor_truncate);
/*
* Step through the cursor range, removing the index entries.
diff --git a/src/docs/upgrading.dox b/src/docs/upgrading.dox
index 3a448818230..caa6b036892 100644
--- a/src/docs/upgrading.dox
+++ b/src/docs/upgrading.dox
@@ -566,7 +566,7 @@ statistics will be logged to the file; if the database is configured
with "all" or "fast", the corresponding statistics will be logged to the
file.
-In previous releases, the WT_SESSION::cursor method took
+In previous releases, the WT_SESSION::cursor method took
\c statistics_clear and a \c statistics_fast configurations. The
\c statistics_clear configuration defaulted to false; when set to true,
statistics counters were reset after they were gathered by the cursor.
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 69fff96fef5..35c057c9767 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -17,24 +17,24 @@ static int __evict_pass(WT_SESSION_IMPL *);
static int __evict_server(WT_SESSION_IMPL *, bool *);
static int __evict_walk(WT_SESSION_IMPL *, WT_EVICT_QUEUE *);
static int __evict_walk_file(
- WT_SESSION_IMPL *, WT_EVICT_QUEUE *, u_int, u_int *, bool *);
+ WT_SESSION_IMPL *, WT_EVICT_QUEUE *, u_int, u_int *);
#define WT_EVICT_HAS_WORKERS(s) \
(S2C(s)->evict_threads.current_threads > 1)
/*
- * __evict_read_gen --
+ * __evict_entry_priority --
* Get the adjusted read generation for an eviction entry.
*/
static inline uint64_t
-__evict_read_gen(const WT_EVICT_ENTRY *entry)
+__evict_entry_priority(WT_SESSION_IMPL *session, WT_REF *ref)
{
WT_BTREE *btree;
WT_PAGE *page;
uint64_t read_gen;
- btree = entry->btree;
- page = entry->ref->page;
+ btree = S2BT(session);
+ page = ref->page;
/* Any page set to the oldest generation should be discarded. */
if (page->read_gen == WT_READGEN_OLDEST)
@@ -60,7 +60,14 @@ __evict_read_gen(const WT_EVICT_ENTRY *entry)
* The base read-generation is skewed by the eviction priority.
* Internal pages are also adjusted, we prefer to evict leaf pages.
*/
- read_gen = page->read_gen + btree->evict_priority;
+ if (page->modify != NULL &&
+ F_ISSET(S2C(session)->cache, WT_CACHE_EVICT_DIRTY) &&
+ !F_ISSET(S2C(session)->cache, WT_CACHE_EVICT_CLEAN))
+ read_gen = page->modify->update_txn;
+ else
+ read_gen = page->read_gen;
+
+ read_gen += btree->evict_priority;
if (WT_PAGE_IS_INTERNAL(page))
read_gen += WT_EVICT_INT_SKEW;
@@ -327,8 +334,6 @@ __evict_server(WT_SESSION_IMPL *session, bool *did_work)
__wt_spin_unlock(session, &conn->dhandle_lock);
WT_RET(ret);
- /* Next time we wake up, reverse the sweep direction. */
- cache->flags ^= WT_CACHE_WALK_REVERSE;
cache->pages_evicted = 0;
} else if (cache->pages_evicted != cache->pages_evict) {
cache->pages_evicted = cache->pages_evict;
@@ -371,7 +376,7 @@ __wt_evict_create(WT_SESSION_IMPL *session)
conn->evict_threads_max, WT_THREAD_CAN_WAIT | WT_THREAD_PANIC_FAIL,
__wt_evict_thread_run));
- /*
+ /*
* Allow queues to be populated now that the eviction threads
* are running.
*/
@@ -463,6 +468,14 @@ __evict_update_work(WT_SESSION_IMPL *session)
F_SET(cache, WT_CACHE_EVICT_DIRTY_HARD);
/*
+ * If application threads are blocked by the total volume of data in
+ * cache, try dirty pages as well.
+ */
+ if (__wt_cache_aggressive(session) &&
+ F_ISSET(cache, WT_CACHE_EVICT_CLEAN_HARD))
+ F_SET(cache, WT_CACHE_EVICT_DIRTY);
+
+ /*
* Scrub dirty pages and keep them in cache if we are less than half
* way to the clean or dirty trigger.
*/
@@ -472,7 +485,19 @@ __evict_update_work(WT_SESSION_IMPL *session)
bytes_max) / 200)
F_SET(cache, WT_CACHE_EVICT_SCRUB);
- WT_STAT_FAST_CONN_SET(session, cache_eviction_state,
+ /*
+ * With an in-memory cache, we only do dirty eviction in order to scrub
+ * pages.
+ */
+ if (F_ISSET(conn, WT_CONN_IN_MEMORY)) {
+ if (F_ISSET(cache, WT_CACHE_EVICT_CLEAN))
+ F_SET(cache, WT_CACHE_EVICT_DIRTY);
+ if (F_ISSET(cache, WT_CACHE_EVICT_CLEAN_HARD))
+ F_SET(cache, WT_CACHE_EVICT_DIRTY_HARD);
+ F_CLR(cache, WT_CACHE_EVICT_CLEAN | WT_CACHE_EVICT_CLEAN_HARD);
+ }
+
+ WT_STAT_CONN_SET(session, cache_eviction_state,
F_MASK(cache, WT_CACHE_EVICT_MASK));
return (F_ISSET(cache, WT_CACHE_EVICT_ALL | WT_CACHE_EVICT_URGENT));
@@ -589,7 +614,7 @@ __evict_pass(WT_SESSION_IMPL *session)
txn_global->current != oldest_id &&
cache->evict_aggressive_score < 100)
++cache->evict_aggressive_score;
- WT_STAT_FAST_CONN_SET(session,
+ WT_STAT_CONN_SET(session,
cache_eviction_aggressive_set,
cache->evict_aggressive_score);
prev = now;
@@ -611,21 +636,21 @@ __evict_pass(WT_SESSION_IMPL *session)
* checkpoint completes): make sure we wait for
* a non-zero number of microseconds).
*/
- WT_STAT_FAST_CONN_INCR(session,
+ WT_STAT_CONN_INCR(session,
cache_eviction_server_slept);
__wt_cond_wait(
session, cache->evict_cond, WT_THOUSAND);
continue;
}
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_slow);
+ WT_STAT_CONN_INCR(session, cache_eviction_slow);
__wt_verbose(session, WT_VERB_EVICTSERVER,
"unable to reach eviction goal");
break;
} else {
if (cache->evict_aggressive_score > 0) {
--cache->evict_aggressive_score;
- WT_STAT_FAST_CONN_SET(session,
+ WT_STAT_CONN_SET(session,
cache_eviction_aggressive_set,
cache->evict_aggressive_score);
}
@@ -641,7 +666,7 @@ __evict_pass(WT_SESSION_IMPL *session)
* Clear a single walk point.
*/
static int
-__evict_clear_walk(WT_SESSION_IMPL *session)
+__evict_clear_walk(WT_SESSION_IMPL *session, bool count_stat)
{
WT_BTREE *btree;
WT_CACHE *cache;
@@ -658,6 +683,9 @@ __evict_clear_walk(WT_SESSION_IMPL *session)
if ((ref = btree->evict_ref) == NULL)
return (0);
+ if (count_stat)
+ WT_STAT_CONN_INCR(session, cache_eviction_walks_abandoned);
+
/*
* Clear evict_ref first, in case releasing it forces eviction (we
* assert we never try to evict the current eviction walk point).
@@ -684,8 +712,8 @@ __evict_clear_all_walks(WT_SESSION_IMPL *session)
TAILQ_FOREACH(dhandle, &conn->dhqh, q)
if (WT_PREFIX_MATCH(dhandle->name, "file:"))
- WT_WITH_DHANDLE(session,
- dhandle, WT_TRET(__evict_clear_walk(session)));
+ WT_WITH_DHANDLE(session, dhandle,
+ WT_TRET(__evict_clear_walk(session, true)));
return (ret);
}
@@ -730,7 +758,7 @@ __wt_evict_file_exclusive_on(WT_SESSION_IMPL *session)
/* Clear any existing LRU eviction walk for the file. */
WT_WITH_PASS_LOCK(session, ret,
- ret = __evict_clear_walk(session));
+ ret = __evict_clear_walk(session, true));
(void)__wt_atomic_subv32(&cache->pass_intr, 1);
WT_ERR(ret);
@@ -843,8 +871,11 @@ __evict_lru_walk(WT_SESSION_IMPL *session)
cache = S2C(session)->cache;
/* Age out the score of how much the queue has been empty recently. */
- if (cache->evict_empty_score > 0)
+ if (cache->evict_empty_score > 0) {
--cache->evict_empty_score;
+ WT_STAT_CONN_SET(session, cache_eviction_empty_score,
+ cache->evict_empty_score);
+ }
/* Fill the next queue (that isn't the urgent queue). */
queue = cache->evict_fill_queue;
@@ -865,27 +896,25 @@ __evict_lru_walk(WT_SESSION_IMPL *session)
return (0);
/* Get some more pages to consider for eviction. */
- switch (ret = __evict_walk(cache->walk_session, queue)) {
- case 0:
- break;
- case EBUSY:
- return (0);
- case WT_NOTFOUND:
- /*
- * If we found no pages at all during the walk, something is
- * wrong. Be more aggressive next time.
- */
+ if ((ret = __evict_walk(cache->walk_session, queue)) == EBUSY)
+ return (0); /* An interrupt was requested, give up. */
+ WT_RET_NOTFOUND_OK(ret);
+
+ /*
+ * If we found no pages at all during the walk, something is wrong.
+ * Be more aggressive next time.
+ *
+ * Continue on to sort the queue, in case there are pages left from a
+ * previous walk.
+ */
+ if (ret == WT_NOTFOUND) {
if (F_ISSET(cache,
WT_CACHE_EVICT_CLEAN_HARD | WT_CACHE_EVICT_DIRTY_HARD))
cache->evict_aggressive_score = WT_MIN(
cache->evict_aggressive_score + WT_EVICT_SCORE_BUMP,
WT_EVICT_SCORE_MAX);
- WT_STAT_FAST_CONN_SET(session,
- cache_eviction_aggressive_set,
+ WT_STAT_CONN_SET(session, cache_eviction_aggressive_set,
cache->evict_aggressive_score);
- return (0);
- default:
- return (ret);
}
/*
@@ -894,13 +923,17 @@ __evict_lru_walk(WT_SESSION_IMPL *session)
*/
if (__evict_queue_empty(queue)) {
if (F_ISSET(cache,
- WT_CACHE_EVICT_CLEAN_HARD | WT_CACHE_EVICT_DIRTY_HARD))
+ WT_CACHE_EVICT_CLEAN_HARD | WT_CACHE_EVICT_DIRTY_HARD)) {
cache->evict_empty_score = WT_MIN(
cache->evict_empty_score + WT_EVICT_SCORE_BUMP,
WT_EVICT_SCORE_MAX);
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_queue_empty);
+ WT_STAT_CONN_SET(session,
+ cache_eviction_empty_score,
+ cache->evict_empty_score);
+ }
+ WT_STAT_CONN_INCR(session, cache_eviction_queue_empty);
} else
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_queue_not_empty);
+ WT_STAT_CONN_INCR(session, cache_eviction_queue_not_empty);
/* Sort the list into LRU order and restart. */
__wt_spin_lock(session, &queue->evict_lock);
@@ -917,6 +950,7 @@ __evict_lru_walk(WT_SESSION_IMPL *session)
qsort(queue->evict_queue,
entries, sizeof(WT_EVICT_ENTRY), __evict_lru_cmp);
+ /* Trim empty entries from the end. */
while (entries > 0 && queue->evict_queue[entries - 1].ref == NULL)
--entries;
@@ -926,8 +960,7 @@ __evict_lru_walk(WT_SESSION_IMPL *session)
* candidates so we never end up with more candidates than entries.
*/
while (entries > WT_EVICT_WALK_BASE)
- __evict_list_clear(session,
- &queue->evict_queue[--entries]);
+ __evict_list_clear(session, &queue->evict_queue[--entries]);
queue->evict_entries = entries;
@@ -948,14 +981,14 @@ __evict_lru_walk(WT_SESSION_IMPL *session)
queue->evict_candidates = entries;
else {
/*
- * Find the oldest read generation we have in the queue, used
- * to set the initial value for pages read into the system.
- * The queue is sorted, find the first "normal" generation.
+ * Find the oldest read generation apart that we have in the
+ * queue, used to set the initial value for pages read into the
+ * system. The queue is sorted, find the first "normal"
+ * generation.
*/
read_gen_oldest = WT_READGEN_OLDEST;
for (candidates = 0; candidates < entries; ++candidates) {
- read_gen_oldest =
- queue->evict_queue[candidates].score;
+ read_gen_oldest = queue->evict_queue[candidates].score;
if (read_gen_oldest != WT_READGEN_OLDEST)
break;
}
@@ -1014,8 +1047,8 @@ __evict_walk(WT_SESSION_IMPL *session, WT_EVICT_QUEUE *queue)
WT_CONNECTION_IMPL *conn;
WT_DATA_HANDLE *dhandle;
WT_DECL_RET;
- u_int max_entries, prev_slot, retries, slot, start_slot, spins;
- bool dhandle_locked, incr, progress;
+ u_int max_entries, retries, slot, start_slot, spins;
+ bool dhandle_locked, incr;
conn = S2C(session);
cache = S2C(session)->cache;
@@ -1121,8 +1154,6 @@ retry: while (slot < max_entries) {
btree->evict_walk_skips++ < btree->evict_walk_period)
continue;
btree->evict_walk_skips = 0;
- prev_slot = slot;
- progress = false;
(void)__wt_atomic_addi32(&dhandle->session_inuse, 1);
incr = true;
@@ -1145,22 +1176,12 @@ retry: while (slot < max_entries) {
cache->evict_file_next = dhandle;
WT_WITH_DHANDLE(session, dhandle, ret =
__evict_walk_file(session, queue,
- max_entries, &slot, &progress));
+ max_entries, &slot));
WT_ASSERT(session, session->split_gen == 0);
}
__wt_spin_unlock(session, &cache->evict_walk_lock);
WT_ERR(ret);
}
-
- /*
- * If we didn't find any candidates in the file, skip it next
- * time.
- */
- if (slot == prev_slot && !progress)
- btree->evict_walk_period = WT_MIN(
- WT_MAX(1, 2 * btree->evict_walk_period), 100);
- else
- btree->evict_walk_period = 0;
}
if (incr) {
@@ -1229,7 +1250,7 @@ __evict_push_candidate(WT_SESSION_IMPL *session,
evict->btree = S2BT(session);
evict->ref = ref;
- evict->score = __evict_read_gen(evict);
+ evict->score = __evict_entry_priority(session, ref);
/* Adjust for size when doing dirty eviction. */
if (F_ISSET(S2C(session)->cache, WT_CACHE_EVICT_DIRTY) &&
@@ -1247,7 +1268,7 @@ __evict_push_candidate(WT_SESSION_IMPL *session,
*/
static int
__evict_walk_file(WT_SESSION_IMPL *session,
- WT_EVICT_QUEUE *queue, u_int max_entries, u_int *slotp, bool *progressp)
+ WT_EVICT_QUEUE *queue, u_int max_entries, u_int *slotp)
{
WT_BTREE *btree;
WT_CACHE *cache;
@@ -1259,17 +1280,18 @@ __evict_walk_file(WT_SESSION_IMPL *session,
WT_REF *ref;
WT_TXN_GLOBAL *txn_global;
uint64_t btree_inuse, bytes_per_slot, cache_inuse;
- uint64_t pages_seen, refs_walked;
+ uint64_t pages_seen, pages_queued, refs_walked;
uint32_t remaining_slots, total_slots, walk_flags;
uint32_t target_pages_clean, target_pages_dirty, target_pages;
int internal_pages, restarts;
- bool modified;
+ bool give_up, modified, urgent_queued;
conn = S2C(session);
btree = S2BT(session);
cache = conn->cache;
- internal_pages = restarts = 0;
txn_global = &conn->txn_global;
+ internal_pages = restarts = 0;
+ give_up = urgent_queued = false;
/*
* Figure out how many slots to fill from this tree.
@@ -1324,8 +1346,10 @@ __evict_walk_file(WT_SESSION_IMPL *session,
walk_flags =
WT_READ_CACHE | WT_READ_NO_EVICT | WT_READ_NO_GEN | WT_READ_NO_WAIT;
- if (F_ISSET(cache, WT_CACHE_WALK_REVERSE))
- walk_flags |= WT_READ_PREV;
+
+ /* Randomize the walk direction. */
+ if (btree->evict_walk_reverse)
+ FLD_SET(walk_flags, WT_READ_PREV);
/*
* Get some more eviction candidate pages.
@@ -1339,14 +1363,26 @@ __evict_walk_file(WT_SESSION_IMPL *session,
* Once we hit the page limit, do one more step through the walk in
* case we are appending and only the last page in the file is live.
*/
- for (evict = start, pages_seen = refs_walked = 0;
+ for (evict = start, pages_queued = pages_seen = refs_walked = 0;
evict < end && (ret == 0 || ret == WT_NOTFOUND);
ret = __wt_tree_walk_count(
session, &btree->evict_ref, &refs_walked, walk_flags)) {
+ /*
+ * Check whether we're finding a good ratio of candidates vs
+ * pages seen. Some workloads create "deserts" in trees where
+ * no good eviction candidates can be found. Abandon the walk
+ * if we get into that situation.
+ */
+ give_up = !__wt_cache_aggressive(session) && pages_seen > 100 &&
+ (pages_queued == 0 || (pages_seen / pages_queued) >
+ (10 * total_slots / target_pages));
+ if (give_up)
+ break;
+
if ((ref = btree->evict_ref) == NULL) {
if (++restarts == 2)
break;
- WT_STAT_FAST_CONN_INCR(
+ WT_STAT_CONN_INCR(
session, cache_eviction_walks_started);
continue;
}
@@ -1379,27 +1415,30 @@ __evict_walk_file(WT_SESSION_IMPL *session,
/* Pages we no longer need (clean or dirty), are found money. */
if (page->read_gen == WT_READGEN_OLDEST ||
page->memory_footprint >= btree->splitmempage) {
- WT_STAT_FAST_CONN_INCR(
+ WT_STAT_CONN_INCR(
session, cache_eviction_pages_queued_oldest);
if (__wt_page_evict_urgent(session, ref))
- *progressp = true;
+ urgent_queued = true;
continue;
}
+ /* Pages that are empty or from dead trees are also good. */
if (__wt_page_is_empty(page) ||
- F_ISSET(session->dhandle, WT_DHANDLE_DEAD) ||
- __wt_cache_aggressive(session))
+ F_ISSET(session->dhandle, WT_DHANDLE_DEAD))
goto fast;
/* Skip clean pages if appropriate. */
- if (!modified && (F_ISSET(conn, WT_CONN_IN_MEMORY) ||
- !F_ISSET(cache, WT_CACHE_EVICT_CLEAN)))
+ if (!modified && !F_ISSET(cache, WT_CACHE_EVICT_CLEAN))
continue;
/* Skip dirty pages if appropriate. */
if (modified && !F_ISSET(cache, WT_CACHE_EVICT_DIRTY))
continue;
+ /* If eviction gets aggressive, anything else is fair game. */
+ if (__wt_cache_aggressive(session))
+ goto fast;
+
/* Limit internal pages to 50% of the total. */
if (WT_PAGE_IS_INTERNAL(page) &&
internal_pages >= (int)(evict - start) / 2)
@@ -1426,6 +1465,7 @@ fast: /* If the page can't be evicted, give up. */
if (!__evict_push_candidate(session, queue, evict, ref))
continue;
++evict;
+ ++pages_queued;
if (WT_PAGE_IS_INTERNAL(page))
++internal_pages;
@@ -1437,10 +1477,22 @@ fast: /* If the page can't be evicted, give up. */
WT_RET_NOTFOUND_OK(ret);
*slotp += (u_int)(evict - start);
- WT_STAT_FAST_CONN_INCRV(
+ WT_STAT_CONN_INCRV(
session, cache_eviction_pages_queued, (u_int)(evict - start));
/*
+ * If we didn't find any candidates in the file, reverse the direction
+ * of the walk and skip it next time.
+ */
+ if (give_up)
+ btree->evict_walk_reverse = !btree->evict_walk_reverse;
+ if (give_up && !urgent_queued)
+ btree->evict_walk_period = WT_MIN(
+ WT_MAX(1, 2 * btree->evict_walk_period), 100);
+ else if (pages_queued == target_pages)
+ btree->evict_walk_period = 0;
+
+ /*
* If we happen to end up on the root page, clear it. We have to track
* hazard pointers, and the root page complicates that calculation.
*
@@ -1452,16 +1504,17 @@ fast: /* If the page can't be evicted, give up. */
* page: we want this page evicted as quickly as possible.
*/
if ((ref = btree->evict_ref) != NULL) {
- if (__wt_ref_is_root(ref) || evict == start)
- WT_RET(__evict_clear_walk(session));
+ /* Give up the walk occasionally. */
+ if (__wt_ref_is_root(ref) || evict == start || give_up)
+ WT_RET(__evict_clear_walk(session, restarts == 0));
else if (ref->page->read_gen == WT_READGEN_OLDEST)
WT_RET_NOTFOUND_OK(__wt_tree_walk_count(
session, &btree->evict_ref,
&refs_walked, walk_flags));
}
- WT_STAT_FAST_CONN_INCRV(session, cache_eviction_walk, refs_walked);
- WT_STAT_FAST_CONN_INCRV(session, cache_eviction_pages_seen, pages_seen);
+ WT_STAT_CONN_INCRV(session, cache_eviction_walk, refs_walked);
+ WT_STAT_CONN_INCRV(session, cache_eviction_pages_seen, pages_seen);
return (0);
}
@@ -1490,13 +1543,13 @@ __evict_get_ref(
*btreep = NULL;
*refp = NULL;
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_get_ref);
+ WT_STAT_CONN_INCR(session, cache_eviction_get_ref);
/* Avoid the LRU lock if no pages are available. */
if (__evict_queue_empty(cache->evict_current_queue) &&
__evict_queue_empty(cache->evict_other_queue) &&
__evict_queue_empty(urgent_queue)) {
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_get_ref_empty);
+ WT_STAT_CONN_INCR(session, cache_eviction_get_ref_empty);
return (WT_NOTFOUND);
}
@@ -1557,7 +1610,7 @@ __evict_get_ref(
/* Verify there are still pages available. */
if (__evict_queue_empty(queue) || (uint32_t)
(queue->evict_current - queue->evict_queue) >= candidates) {
- WT_STAT_FAST_CONN_INCR(
+ WT_STAT_CONN_INCR(
session, cache_eviction_get_ref_empty2);
return (WT_NOTFOUND);
}
@@ -1587,8 +1640,8 @@ __evict_get_ref(
* Don't force application threads to evict dirty pages if they
* aren't stalled by the amount of dirty data in cache.
*/
- if (!urgent_ok && (is_server || (is_app &&
- !F_ISSET(cache, WT_CACHE_EVICT_DIRTY_HARD))) &&
+ if (!urgent_ok && (is_server ||
+ !F_ISSET(cache, WT_CACHE_EVICT_DIRTY_HARD)) &&
__wt_page_is_modified(evict->ref->page)) {
--evict;
break;
@@ -1655,18 +1708,15 @@ __evict_page(WT_SESSION_IMPL *session, bool is_server)
* worker thread.
*/
if (is_server) {
- WT_STAT_FAST_CONN_INCR(
- session, cache_eviction_server_evicting);
+ WT_STAT_CONN_INCR(session, cache_eviction_server_evicting);
cache->server_evicts++;
} else if (F_ISSET(session, WT_SESSION_INTERNAL)) {
- WT_STAT_FAST_CONN_INCR(
- session, cache_eviction_worker_evicting);
+ WT_STAT_CONN_INCR(session, cache_eviction_worker_evicting);
cache->worker_evicts++;
} else {
if (__wt_page_is_modified(ref->page))
- WT_STAT_FAST_CONN_INCR(
- session, cache_eviction_app_dirty);
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_app);
+ WT_STAT_CONN_INCR(session, cache_eviction_app_dirty);
+ WT_STAT_CONN_INCR(session, cache_eviction_app);
cache->app_evicts++;
}
@@ -1745,7 +1795,7 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, u_int pct_full)
*/
if (__wt_cache_stuck(session) && __wt_txn_am_oldest(session)) {
--cache->evict_aggressive_score;
- WT_STAT_FAST_CONN_INCR(session, txn_fail_cache);
+ WT_STAT_CONN_INCR(session, txn_fail_cache);
return (WT_ROLLBACK);
}
@@ -1833,8 +1883,7 @@ __wt_page_evict_urgent(WT_SESSION_IMPL *session, WT_REF *ref)
done: __wt_spin_unlock(session, &cache->evict_queue_lock);
if (queued) {
- WT_STAT_FAST_CONN_INCR(
- session, cache_eviction_pages_queued_urgent);
+ WT_STAT_CONN_INCR(session, cache_eviction_pages_queued_urgent);
if (WT_EVICT_HAS_WORKERS(session))
__wt_cond_signal(session,
S2C(session)->evict_threads.wait_cond);
diff --git a/src/evict/evict_page.c b/src/evict/evict_page.c
index 5ddf787c1f5..092f80cc000 100644
--- a/src/evict/evict_page.c
+++ b/src/evict/evict_page.c
@@ -49,8 +49,8 @@ __evict_exclusive(WT_SESSION_IMPL *session, WT_REF *ref)
__wt_sleep(0, WT_THOUSAND);
}
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_hazard);
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_hazard);
+ WT_STAT_DATA_INCR(session, cache_eviction_hazard);
+ WT_STAT_CONN_INCR(session, cache_eviction_hazard);
return (EBUSY);
}
@@ -86,17 +86,17 @@ __wt_page_release_evict(WT_SESSION_IMPL *session, WT_REF *ref)
too_big = page->memory_footprint >= btree->splitmempage;
if ((ret = __wt_evict(session, ref, false)) == 0) {
if (too_big)
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_force);
+ WT_STAT_CONN_INCR(session, cache_eviction_force);
else
/*
* If the page isn't too big, we are evicting it because
* it had a chain of deleted entries that make traversal
* expensive.
*/
- WT_STAT_FAST_CONN_INCR(
+ WT_STAT_CONN_INCR(
session, cache_eviction_force_delete);
} else
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_force_fail);
+ WT_STAT_CONN_INCR(session, cache_eviction_force_fail);
(void)__wt_atomic_subv32(&btree->evict_busy, 1);
@@ -146,8 +146,8 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
/* Count evictions of internal pages during normal operation. */
if (!closing && WT_PAGE_IS_INTERNAL(page)) {
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_internal);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_internal);
+ WT_STAT_CONN_INCR(session, cache_eviction_internal);
+ WT_STAT_DATA_INCR(session, cache_eviction_internal);
}
/*
@@ -176,19 +176,19 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
WT_ERR(__evict_page_dirty_update(session, ref, closing));
if (clean_page) {
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_clean);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_clean);
+ WT_STAT_CONN_INCR(session, cache_eviction_clean);
+ WT_STAT_DATA_INCR(session, cache_eviction_clean);
} else {
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_dirty);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_dirty);
+ WT_STAT_CONN_INCR(session, cache_eviction_dirty);
+ WT_STAT_DATA_INCR(session, cache_eviction_dirty);
}
if (0) {
err: if (!closing)
__evict_exclusive_clear(session, ref);
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_fail);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_fail);
+ WT_STAT_CONN_INCR(session, cache_eviction_fail);
+ WT_STAT_DATA_INCR(session, cache_eviction_fail);
}
return (ret);
diff --git a/src/include/btree.h b/src/include/btree.h
index f1365c6c933..cfaf59e70e1 100644
--- a/src/include/btree.h
+++ b/src/include/btree.h
@@ -140,6 +140,7 @@ struct __wt_btree {
u_int evict_walk_skips; /* Number of walks skipped */
u_int evict_disabled; /* Eviction disabled count */
volatile uint32_t evict_busy; /* Count of threads in eviction */
+ bool evict_walk_reverse; /* Walk direction */
enum {
WT_CKPT_OFF, WT_CKPT_PREPARE, WT_CKPT_RUNNING
diff --git a/src/include/btree.i b/src/include/btree.i
index c07966a4453..6e32c1bc195 100644
--- a/src/include/btree.i
+++ b/src/include/btree.i
@@ -1183,8 +1183,8 @@ __wt_leaf_page_can_split(WT_SESSION_IMPL *session, WT_PAGE *page)
(WT_INSERT_KEY_SIZE(ins) + WT_UPDATE_MEMSIZE(ins->upd));
if (count > WT_MIN_SPLIT_COUNT &&
size > (size_t)btree->maxleafpage) {
- WT_STAT_FAST_CONN_INCR(session, cache_inmem_splittable);
- WT_STAT_FAST_DATA_INCR(session, cache_inmem_splittable);
+ WT_STAT_CONN_INCR(session, cache_inmem_splittable);
+ WT_STAT_DATA_INCR(session, cache_inmem_splittable);
return (true);
}
}
@@ -1233,8 +1233,8 @@ __wt_page_can_evict(
* been written in the checkpoint, leaving the checkpoint inconsistent.
*/
if (modified && btree->checkpointing != WT_CKPT_OFF) {
- WT_STAT_FAST_CONN_INCR(session, cache_eviction_checkpoint);
- WT_STAT_FAST_DATA_INCR(session, cache_eviction_checkpoint);
+ WT_STAT_CONN_INCR(session, cache_eviction_checkpoint);
+ WT_STAT_DATA_INCR(session, cache_eviction_checkpoint);
return (false);
}
@@ -1411,7 +1411,7 @@ __wt_page_hazard_check(WT_SESSION_IMPL *session, WT_PAGE *page)
* come or go, we'll check the slots for all of the sessions that could
* have been active when we started our check.
*/
- WT_STAT_FAST_CONN_INCR(session, cache_hazard_checks);
+ WT_STAT_CONN_INCR(session, cache_hazard_checks);
WT_ORDERED_READ(session_cnt, conn->session_cnt);
for (s = conn->sessions, i = 0, j = 0, max = 0;
i < session_cnt; ++s, ++i) {
@@ -1420,19 +1420,19 @@ __wt_page_hazard_check(WT_SESSION_IMPL *session, WT_PAGE *page)
WT_ORDERED_READ(hazard_size, s->hazard_size);
if (s->hazard_size > max) {
max = s->hazard_size;
- WT_STAT_FAST_CONN_SET(session,
+ WT_STAT_CONN_SET(session,
cache_hazard_max, max);
}
for (hp = s->hazard; hp < s->hazard + hazard_size; ++hp) {
++j;
if (hp->page == page) {
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCRV(session,
cache_hazard_walks, j);
return (hp);
}
}
}
- WT_STAT_FAST_CONN_INCRV(session, cache_hazard_walks, j);
+ WT_STAT_CONN_INCRV(session, cache_hazard_walks, j);
return (NULL);
}
diff --git a/src/include/cache.h b/src/include/cache.h
index 0cb61f01435..515135f26ab 100644
--- a/src/include/cache.h
+++ b/src/include/cache.h
@@ -181,7 +181,6 @@ struct __wt_cache {
#define WT_CACHE_EVICT_MASK 0x0FF
#define WT_CACHE_POOL_MANAGER 0x100 /* The active cache pool manager */
#define WT_CACHE_POOL_RUN 0x200 /* Cache pool thread running */
-#define WT_CACHE_WALK_REVERSE 0x400 /* Scan backwards for candidates */
uint32_t flags;
};
diff --git a/src/include/connection.h b/src/include/connection.h
index 77dbc87b114..e19ad684b24 100644
--- a/src/include/connection.h
+++ b/src/include/connection.h
@@ -289,9 +289,8 @@ struct __wt_connection_impl {
#define WT_CONN_STAT_CLEAR 0x02 /* clear after gathering */
#define WT_CONN_STAT_FAST 0x04 /* "fast" statistics configured */
#define WT_CONN_STAT_JSON 0x08 /* output JSON format */
-#define WT_CONN_STAT_NONE 0x10 /* don't gather statistics */
-#define WT_CONN_STAT_ON_CLOSE 0x20 /* output statistics on close */
-#define WT_CONN_STAT_SIZE 0x40 /* "size" statistics configured */
+#define WT_CONN_STAT_ON_CLOSE 0x10 /* output statistics on close */
+#define WT_CONN_STAT_SIZE 0x20 /* "size" statistics configured */
uint32_t stat_flags;
/* Connection statistics */
diff --git a/src/include/lsm.h b/src/include/lsm.h
index 444073087df..2550ca444c1 100644
--- a/src/include/lsm.h
+++ b/src/include/lsm.h
@@ -228,11 +228,11 @@ struct __wt_lsm_tree {
* area, copying them into place when a statistics cursor is created.
*/
#define WT_LSM_TREE_STAT_INCR(session, fld) do { \
- if (FLD_ISSET(S2C(session)->stat_flags, WT_CONN_STAT_FAST)) \
+ if (WT_STAT_ENABLED(session)) \
++(fld); \
} while (0)
#define WT_LSM_TREE_STAT_INCRV(session, fld, v) do { \
- if (FLD_ISSET(S2C(session)->stat_flags, WT_CONN_STAT_FAST)) \
+ if (WT_STAT_ENABLED(session)) \
(fld) += (int64_t)(v); \
} while (0)
int64_t bloom_false_positive;
diff --git a/src/include/os_fhandle.i b/src/include/os_fhandle.i
index a9150279a85..428b14556d9 100644
--- a/src/include/os_fhandle.i
+++ b/src/include/os_fhandle.i
@@ -26,15 +26,15 @@ __wt_fsync(WT_SESSION_IMPL *session, WT_FH *fh, bool block)
* There is no way to check when the non-blocking sync-file-range is
* complete, but we track the time taken in the call for completeness.
*/
- WT_STAT_FAST_CONN_INCR_ATOMIC(session, thread_fsync_active);
- WT_STAT_FAST_CONN_INCR(session, fsync_io);
+ WT_STAT_CONN_INCR_ATOMIC(session, thread_fsync_active);
+ WT_STAT_CONN_INCR(session, fsync_io);
if (block)
ret = (handle->fh_sync == NULL ? 0 :
handle->fh_sync(handle, (WT_SESSION *)session));
else
ret = (handle->fh_sync_nowait == NULL ? 0 :
handle->fh_sync_nowait(handle, (WT_SESSION *)session));
- WT_STAT_FAST_CONN_DECR_ATOMIC(session, thread_fsync_active);
+ WT_STAT_CONN_DECR_ATOMIC(session, thread_fsync_active);
return (ret);
}
@@ -99,13 +99,13 @@ __wt_read(
"%s: handle-read: %" WT_SIZET_FMT " at %" PRIuMAX,
fh->handle->name, len, (uintmax_t)offset);
- WT_STAT_FAST_CONN_INCR_ATOMIC(session, thread_read_active);
- WT_STAT_FAST_CONN_INCR(session, read_io);
+ WT_STAT_CONN_INCR_ATOMIC(session, thread_read_active);
+ WT_STAT_CONN_INCR(session, read_io);
ret = fh->handle->fh_read(
fh->handle, (WT_SESSION *)session, offset, len, buf);
- WT_STAT_FAST_CONN_DECR_ATOMIC(session, thread_read_active);
+ WT_STAT_CONN_DECR_ATOMIC(session, thread_read_active);
return (ret);
}
@@ -173,12 +173,12 @@ __wt_write(WT_SESSION_IMPL *session,
*/
WT_RET(WT_SESSION_CHECK_PANIC(session));
- WT_STAT_FAST_CONN_INCR(session, write_io);
- WT_STAT_FAST_CONN_INCR_ATOMIC(session, thread_write_active);
+ WT_STAT_CONN_INCR(session, write_io);
+ WT_STAT_CONN_INCR_ATOMIC(session, thread_write_active);
ret = fh->handle->fh_write(
fh->handle, (WT_SESSION *)session, offset, len, buf);
- WT_STAT_FAST_CONN_DECR_ATOMIC(session, thread_write_active);
+ WT_STAT_CONN_DECR_ATOMIC(session, thread_write_active);
return (ret);
}
diff --git a/src/include/stat.h b/src/include/stat.h
index b61c568783b..cd0cae16826 100644
--- a/src/include/stat.h
+++ b/src/include/stat.h
@@ -133,105 +133,92 @@ __wt_stats_clear(void *stats_arg, int slot)
}
/*
- * Read/write statistics without any test for statistics configuration. Reading
- * and writing the field requires different actions: reading sums the values
+ * Read/write statistics if statistics gathering is enabled. Reading and
+ * writing the field requires different actions: reading sums the values
* across the array of structures, writing updates a single structure's value.
*/
+#define WT_STAT_ENABLED(session) (S2C(session)->stat_flags != 0)
+
#define WT_STAT_READ(stats, fld) \
__wt_stats_aggregate(stats, WT_STATS_FIELD_TO_SLOT(stats, fld))
-#define WT_STAT_WRITE(stats, fld, v) \
- (stats)->fld = (int64_t)(v)
-
-#define WT_STAT_DECRV(session, stats, fld, value) \
- (stats)[WT_STATS_SLOT_ID(session)]->fld -= (int64_t)(value)
-#define WT_STAT_DECRV_ATOMIC(session, stats, fld, value) \
- __wt_atomic_subi64( \
- &(stats)[WT_STATS_SLOT_ID(session)]->fld, (int64_t)(value))
-#define WT_STAT_DECR(session, stats, fld) \
- WT_STAT_DECRV(session, stats, fld, 1)
-#define WT_STAT_INCRV(session, stats, fld, value) \
- (stats)[WT_STATS_SLOT_ID(session)]->fld += (int64_t)(value)
-#define WT_STAT_INCRV_ATOMIC(session, stats, fld, value) \
- __wt_atomic_addi64( \
- &(stats)[WT_STATS_SLOT_ID(session)]->fld, (int64_t)(value))
-#define WT_STAT_INCR(session, stats, fld) \
- WT_STAT_INCRV(session, stats, fld, 1)
-#define WT_STAT_SET(session, stats, fld, value) do { \
- __wt_stats_clear(stats, WT_STATS_FIELD_TO_SLOT(stats, fld)); \
- (stats)[0]->fld = (int64_t)(value); \
+#define WT_STAT_WRITE(session, stats, fld, v) do { \
+ if (WT_STAT_ENABLED(session)) \
+ (stats)->fld = (int64_t)(v); \
} while (0)
-/*
- * Update statistics if "fast" statistics are configured.
- */
-#define WT_STAT_FAST_DECRV(session, stats, fld, value) do { \
- if (FLD_ISSET(S2C(session)->stat_flags, WT_CONN_STAT_FAST)) \
- WT_STAT_DECRV(session, stats, fld, value); \
+#define WT_STAT_DECRV(session, stats, fld, value) do { \
+ if (WT_STAT_ENABLED(session)) \
+ (stats)[WT_STATS_SLOT_ID(session)]->fld -= (int64_t)(value); \
} while (0)
-#define WT_STAT_FAST_DECR(session, stats, fld) \
- WT_STAT_FAST_DECRV(session, stats, fld, 1)
-#define WT_STAT_FAST_DECRV_ATOMIC(session, stats, fld, value) do { \
- if (FLD_ISSET(S2C(session)->stat_flags, WT_CONN_STAT_FAST)) \
- WT_STAT_DECRV_ATOMIC(session, stats, fld, value); \
+#define WT_STAT_DECRV_ATOMIC(session, stats, fld, value) do { \
+ if (WT_STAT_ENABLED(session)) \
+ __wt_atomic_subi64(&(stats)[WT_STATS_SLOT_ID(session)]->fld, \
+ (int64_t)(value)); \
} while (0)
-#define WT_STAT_FAST_INCRV(session, stats, fld, value) do { \
- if (FLD_ISSET(S2C(session)->stat_flags, WT_CONN_STAT_FAST)) \
- WT_STAT_INCRV(session, stats, fld, value); \
+#define WT_STAT_DECR(session, stats, fld) \
+ WT_STAT_DECRV(session, stats, fld, 1)
+#define WT_STAT_INCRV(session, stats, fld, value) do { \
+ if (WT_STAT_ENABLED(session)) \
+ (stats)[WT_STATS_SLOT_ID(session)]->fld += (int64_t)(value); \
} while (0)
-#define WT_STAT_FAST_INCR(session, stats, fld) \
- WT_STAT_FAST_INCRV(session, stats, fld, 1)
-#define WT_STAT_FAST_INCRV_ATOMIC(session, stats, fld, value) do { \
- if (FLD_ISSET(S2C(session)->stat_flags, WT_CONN_STAT_FAST)) \
- WT_STAT_INCRV_ATOMIC(session, stats, fld, value); \
+#define WT_STAT_INCRV_ATOMIC(session, stats, fld, value) do { \
+ if (WT_STAT_ENABLED(session)) \
+ __wt_atomic_addi64(&(stats)[WT_STATS_SLOT_ID(session)]->fld, \
+ (int64_t)(value)); \
} while (0)
-#define WT_STAT_FAST_SET(session, stats, fld, value) do { \
- if (FLD_ISSET(S2C(session)->stat_flags, WT_CONN_STAT_FAST)) \
- WT_STAT_SET(session, stats, fld, value); \
+#define WT_STAT_INCR(session, stats, fld) \
+ WT_STAT_INCRV(session, stats, fld, 1)
+#define WT_STAT_SET(session, stats, fld, value) do { \
+ if (WT_STAT_ENABLED(session)) { \
+ __wt_stats_clear(stats, \
+ WT_STATS_FIELD_TO_SLOT(stats, fld)); \
+ (stats)[0]->fld = (int64_t)(value); \
+ } \
} while (0)
/*
- * Update connection handle statistics if "fast" statistics are configured.
+ * Update connection handle statistics if statistics gathering is enabled.
*/
-#define WT_STAT_FAST_CONN_DECR(session, fld) \
- WT_STAT_FAST_DECR(session, S2C(session)->stats, fld)
-#define WT_STAT_FAST_CONN_DECR_ATOMIC(session, fld) \
- WT_STAT_FAST_DECRV_ATOMIC(session, S2C(session)->stats, fld, 1)
-#define WT_STAT_FAST_CONN_DECRV(session, fld, value) \
- WT_STAT_FAST_DECRV(session, S2C(session)->stats, fld, value)
-#define WT_STAT_FAST_CONN_INCR(session, fld) \
- WT_STAT_FAST_INCR(session, S2C(session)->stats, fld)
-#define WT_STAT_FAST_CONN_INCR_ATOMIC(session, fld) \
- WT_STAT_FAST_INCRV_ATOMIC(session, S2C(session)->stats, fld, 1)
-#define WT_STAT_FAST_CONN_INCRV(session, fld, value) \
- WT_STAT_FAST_INCRV(session, S2C(session)->stats, fld, value)
-#define WT_STAT_FAST_CONN_SET(session, fld, value) \
- WT_STAT_FAST_SET(session, S2C(session)->stats, fld, value)
+#define WT_STAT_CONN_DECR(session, fld) \
+ WT_STAT_DECR(session, S2C(session)->stats, fld)
+#define WT_STAT_CONN_DECR_ATOMIC(session, fld) \
+ WT_STAT_DECRV_ATOMIC(session, S2C(session)->stats, fld, 1)
+#define WT_STAT_CONN_DECRV(session, fld, value) \
+ WT_STAT_DECRV(session, S2C(session)->stats, fld, value)
+#define WT_STAT_CONN_INCR(session, fld) \
+ WT_STAT_INCR(session, S2C(session)->stats, fld)
+#define WT_STAT_CONN_INCR_ATOMIC(session, fld) \
+ WT_STAT_INCRV_ATOMIC(session, S2C(session)->stats, fld, 1)
+#define WT_STAT_CONN_INCRV(session, fld, value) \
+ WT_STAT_INCRV(session, S2C(session)->stats, fld, value)
+#define WT_STAT_CONN_SET(session, fld, value) \
+ WT_STAT_SET(session, S2C(session)->stats, fld, value)
/*
- * Update data-source handle statistics if "fast" statistics are configured
+ * Update data-source handle statistics if statistics gathering is enabled
* and the data-source handle is set.
*
* XXX
* We shouldn't have to check if the data-source handle is NULL, but it's
* necessary until everything is converted to using data-source handles.
*/
-#define WT_STAT_FAST_DATA_DECRV(session, fld, value) do { \
+#define WT_STAT_DATA_DECRV(session, fld, value) do { \
if ((session)->dhandle != NULL) \
- WT_STAT_FAST_DECRV( \
+ WT_STAT_DECRV( \
session, (session)->dhandle->stats, fld, value); \
} while (0)
-#define WT_STAT_FAST_DATA_DECR(session, fld) \
- WT_STAT_FAST_DATA_DECRV(session, fld, 1)
-#define WT_STAT_FAST_DATA_INCRV(session, fld, value) do { \
+#define WT_STAT_DATA_DECR(session, fld) \
+ WT_STAT_DATA_DECRV(session, fld, 1)
+#define WT_STAT_DATA_INCRV(session, fld, value) do { \
if ((session)->dhandle != NULL) \
- WT_STAT_FAST_INCRV( \
+ WT_STAT_INCRV( \
session, (session)->dhandle->stats, fld, value); \
} while (0)
-#define WT_STAT_FAST_DATA_INCR(session, fld) \
- WT_STAT_FAST_DATA_INCRV(session, fld, 1)
-#define WT_STAT_FAST_DATA_SET(session, fld, value) do { \
+#define WT_STAT_DATA_INCR(session, fld) \
+ WT_STAT_DATA_INCRV(session, fld, 1)
+#define WT_STAT_DATA_SET(session, fld, value) do { \
if ((session)->dhandle != NULL) \
- WT_STAT_FAST_SET( \
+ WT_STAT_SET( \
session, (session)->dhandle->stats, fld, value); \
} while (0)
@@ -286,12 +273,14 @@ struct __wt_connection_stats {
int64_t cache_eviction_get_ref_empty;
int64_t cache_eviction_get_ref_empty2;
int64_t cache_eviction_aggressive_set;
+ int64_t cache_eviction_empty_score;
int64_t cache_eviction_queue_empty;
int64_t cache_eviction_queue_not_empty;
int64_t cache_eviction_server_evicting;
int64_t cache_eviction_server_slept;
int64_t cache_eviction_slow;
int64_t cache_eviction_state;
+ int64_t cache_eviction_walks_abandoned;
int64_t cache_eviction_worker_evicting;
int64_t cache_eviction_force_fail;
int64_t cache_eviction_walks_active;
diff --git a/src/include/txn.i b/src/include/txn.i
index ffd319fd5c1..1a8851a9a2a 100644
--- a/src/include/txn.i
+++ b/src/include/txn.i
@@ -21,7 +21,7 @@ __txn_next_op(WT_SESSION_IMPL *session, WT_TXN_OP **opp)
txn = &session->txn;
*opp = NULL;
- /*
+ /*
* We're about to perform an update.
* Make sure we have allocated a transaction ID.
*/
@@ -414,7 +414,7 @@ __wt_txn_update_check(WT_SESSION_IMPL *session, WT_UPDATE *upd)
if (txn->isolation == WT_ISO_SNAPSHOT)
while (upd != NULL && !__wt_txn_visible(session, upd->txnid)) {
if (upd->txnid != WT_TXN_ABORTED) {
- WT_STAT_FAST_DATA_INCR(
+ WT_STAT_DATA_INCR(
session, txn_update_conflict);
return (WT_ROLLBACK);
}
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index 61a66bd4086..f4763a113f1 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -1812,7 +1812,7 @@ struct __wt_connection {
* of checkpoints to bring the dirty content in cache to this level\,
* expressed as a percentage of the total cache size. Ignored if set to
* zero or \c in_memory is \c true., an integer between 0 and 99;
- * default \c 15.}
+ * default \c 5.}
* @config{eviction_dirty_target, perform eviction in worker threads
* when the cache contains at least this much dirty content\, expressed
* as a percentage of the total cache size. Ignored if \c in_memory is
@@ -2278,7 +2278,7 @@ struct __wt_connection {
* @config{eviction_checkpoint_target, perform eviction at the beginning of
* checkpoints to bring the dirty content in cache to this level\, expressed as
* a percentage of the total cache size. Ignored if set to zero or \c in_memory
- * is \c true., an integer between 0 and 99; default \c 15.}
+ * is \c true., an integer between 0 and 99; default \c 5.}
* @config{eviction_dirty_target, perform eviction in worker threads when the
* cache contains at least this much dirty content\, expressed as a percentage
* of the total cache size. Ignored if \c in_memory is \c true., an integer
@@ -4294,360 +4294,364 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2 1039
/*! cache: eviction currently operating in aggressive mode */
#define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET 1040
+/*! cache: eviction empty score */
+#define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE 1041
/*! cache: eviction server candidate queue empty when topping up */
-#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1041
+#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1042
/*! cache: eviction server candidate queue not empty when topping up */
-#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1042
+#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1043
/*! cache: eviction server evicting pages */
-#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1043
+#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1044
/*!
* cache: eviction server slept, because we did not make progress with
* eviction
*/
-#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1044
+#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1045
/*! cache: eviction server unable to reach eviction goal */
-#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1045
+#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1046
/*! cache: eviction state */
-#define WT_STAT_CONN_CACHE_EVICTION_STATE 1046
+#define WT_STAT_CONN_CACHE_EVICTION_STATE 1047
+/*! cache: eviction walks abandoned */
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1048
/*! cache: eviction worker thread evicting pages */
-#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1047
+#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1049
/*! cache: failed eviction of pages that exceeded the in-memory maximum */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1048
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1050
/*! cache: files with active eviction walks */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1049
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1051
/*! cache: files with new eviction walks started */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1050
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1052
/*! cache: hazard pointer blocked page eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1051
+#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1053
/*! cache: hazard pointer check calls */
-#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1052
+#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1054
/*! cache: hazard pointer check entries walked */
-#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1053
+#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1055
/*! cache: hazard pointer maximum array length */
-#define WT_STAT_CONN_CACHE_HAZARD_MAX 1054
+#define WT_STAT_CONN_CACHE_HAZARD_MAX 1056
/*! cache: in-memory page passed criteria to be split */
-#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1055
+#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1057
/*! cache: in-memory page splits */
-#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1056
+#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1058
/*! cache: internal pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1057
+#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1059
/*! cache: internal pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1058
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1060
/*! cache: leaf pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1059
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1061
/*! cache: lookaside table insert calls */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_INSERT 1060
+#define WT_STAT_CONN_CACHE_LOOKASIDE_INSERT 1062
/*! cache: lookaside table remove calls */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_REMOVE 1061
+#define WT_STAT_CONN_CACHE_LOOKASIDE_REMOVE 1063
/*! cache: maximum bytes configured */
-#define WT_STAT_CONN_CACHE_BYTES_MAX 1062
+#define WT_STAT_CONN_CACHE_BYTES_MAX 1064
/*! cache: maximum page size at eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1063
+#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1065
/*! cache: modified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1064
+#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1066
/*! cache: modified pages evicted by application threads */
-#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1065
+#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1067
/*! cache: overflow pages read into cache */
-#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1066
+#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1068
/*! cache: overflow values cached in memory */
-#define WT_STAT_CONN_CACHE_OVERFLOW_VALUE 1067
+#define WT_STAT_CONN_CACHE_OVERFLOW_VALUE 1069
/*! cache: page split during eviction deepened the tree */
-#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1068
+#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1070
/*! cache: page written requiring lookaside records */
-#define WT_STAT_CONN_CACHE_WRITE_LOOKASIDE 1069
+#define WT_STAT_CONN_CACHE_WRITE_LOOKASIDE 1071
/*! cache: pages currently held in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_INUSE 1070
+#define WT_STAT_CONN_CACHE_PAGES_INUSE 1072
/*! cache: pages evicted because they exceeded the in-memory maximum */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1071
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1073
/*! cache: pages evicted because they had chains of deleted items */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1072
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1074
/*! cache: pages evicted by application threads */
-#define WT_STAT_CONN_CACHE_EVICTION_APP 1073
+#define WT_STAT_CONN_CACHE_EVICTION_APP 1075
/*! cache: pages queued for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1074
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1076
/*! cache: pages queued for urgent eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1075
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1077
/*! cache: pages queued for urgent eviction during walk */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1076
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1078
/*! cache: pages read into cache */
-#define WT_STAT_CONN_CACHE_READ 1077
+#define WT_STAT_CONN_CACHE_READ 1079
/*! cache: pages read into cache requiring lookaside entries */
-#define WT_STAT_CONN_CACHE_READ_LOOKASIDE 1078
+#define WT_STAT_CONN_CACHE_READ_LOOKASIDE 1080
/*! cache: pages requested from the cache */
-#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1079
+#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1081
/*! cache: pages seen by eviction walk */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1080
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1082
/*! cache: pages selected for eviction unable to be evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1081
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1083
/*! cache: pages walked for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK 1082
+#define WT_STAT_CONN_CACHE_EVICTION_WALK 1084
/*! cache: pages written from cache */
-#define WT_STAT_CONN_CACHE_WRITE 1083
+#define WT_STAT_CONN_CACHE_WRITE 1085
/*! cache: pages written requiring in-memory restoration */
-#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1084
+#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1086
/*! cache: percentage overhead */
-#define WT_STAT_CONN_CACHE_OVERHEAD 1085
+#define WT_STAT_CONN_CACHE_OVERHEAD 1087
/*! cache: tracked bytes belonging to internal pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1086
+#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1088
/*! cache: tracked bytes belonging to leaf pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_LEAF 1087
+#define WT_STAT_CONN_CACHE_BYTES_LEAF 1089
/*! cache: tracked dirty bytes in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1088
+#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1090
/*! cache: tracked dirty pages in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1089
+#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1091
/*! cache: unmodified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1090
+#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1092
/*! connection: auto adjusting condition resets */
-#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1091
+#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1093
/*! connection: auto adjusting condition wait calls */
-#define WT_STAT_CONN_COND_AUTO_WAIT 1092
+#define WT_STAT_CONN_COND_AUTO_WAIT 1094
/*! connection: files currently open */
-#define WT_STAT_CONN_FILE_OPEN 1093
+#define WT_STAT_CONN_FILE_OPEN 1095
/*! connection: memory allocations */
-#define WT_STAT_CONN_MEMORY_ALLOCATION 1094
+#define WT_STAT_CONN_MEMORY_ALLOCATION 1096
/*! connection: memory frees */
-#define WT_STAT_CONN_MEMORY_FREE 1095
+#define WT_STAT_CONN_MEMORY_FREE 1097
/*! connection: memory re-allocations */
-#define WT_STAT_CONN_MEMORY_GROW 1096
+#define WT_STAT_CONN_MEMORY_GROW 1098
/*! connection: pthread mutex condition wait calls */
-#define WT_STAT_CONN_COND_WAIT 1097
+#define WT_STAT_CONN_COND_WAIT 1099
/*! connection: pthread mutex shared lock read-lock calls */
-#define WT_STAT_CONN_RWLOCK_READ 1098
+#define WT_STAT_CONN_RWLOCK_READ 1100
/*! connection: pthread mutex shared lock write-lock calls */
-#define WT_STAT_CONN_RWLOCK_WRITE 1099
+#define WT_STAT_CONN_RWLOCK_WRITE 1101
/*! connection: total fsync I/Os */
-#define WT_STAT_CONN_FSYNC_IO 1100
+#define WT_STAT_CONN_FSYNC_IO 1102
/*! connection: total read I/Os */
-#define WT_STAT_CONN_READ_IO 1101
+#define WT_STAT_CONN_READ_IO 1103
/*! connection: total write I/Os */
-#define WT_STAT_CONN_WRITE_IO 1102
+#define WT_STAT_CONN_WRITE_IO 1104
/*! cursor: cursor create calls */
-#define WT_STAT_CONN_CURSOR_CREATE 1103
+#define WT_STAT_CONN_CURSOR_CREATE 1105
/*! cursor: cursor insert calls */
-#define WT_STAT_CONN_CURSOR_INSERT 1104
+#define WT_STAT_CONN_CURSOR_INSERT 1106
/*! cursor: cursor next calls */
-#define WT_STAT_CONN_CURSOR_NEXT 1105
+#define WT_STAT_CONN_CURSOR_NEXT 1107
/*! cursor: cursor prev calls */
-#define WT_STAT_CONN_CURSOR_PREV 1106
+#define WT_STAT_CONN_CURSOR_PREV 1108
/*! cursor: cursor remove calls */
-#define WT_STAT_CONN_CURSOR_REMOVE 1107
+#define WT_STAT_CONN_CURSOR_REMOVE 1109
/*! cursor: cursor reset calls */
-#define WT_STAT_CONN_CURSOR_RESET 1108
+#define WT_STAT_CONN_CURSOR_RESET 1110
/*! cursor: cursor restarted searches */
-#define WT_STAT_CONN_CURSOR_RESTART 1109
+#define WT_STAT_CONN_CURSOR_RESTART 1111
/*! cursor: cursor search calls */
-#define WT_STAT_CONN_CURSOR_SEARCH 1110
+#define WT_STAT_CONN_CURSOR_SEARCH 1112
/*! cursor: cursor search near calls */
-#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1111
+#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1113
/*! cursor: cursor update calls */
-#define WT_STAT_CONN_CURSOR_UPDATE 1112
+#define WT_STAT_CONN_CURSOR_UPDATE 1114
/*! cursor: truncate calls */
-#define WT_STAT_CONN_CURSOR_TRUNCATE 1113
+#define WT_STAT_CONN_CURSOR_TRUNCATE 1115
/*! data-handle: connection data handles currently active */
-#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1114
+#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1116
/*! data-handle: connection sweep candidate became referenced */
-#define WT_STAT_CONN_DH_SWEEP_REF 1115
+#define WT_STAT_CONN_DH_SWEEP_REF 1117
/*! data-handle: connection sweep dhandles closed */
-#define WT_STAT_CONN_DH_SWEEP_CLOSE 1116
+#define WT_STAT_CONN_DH_SWEEP_CLOSE 1118
/*! data-handle: connection sweep dhandles removed from hash list */
-#define WT_STAT_CONN_DH_SWEEP_REMOVE 1117
+#define WT_STAT_CONN_DH_SWEEP_REMOVE 1119
/*! data-handle: connection sweep time-of-death sets */
-#define WT_STAT_CONN_DH_SWEEP_TOD 1118
+#define WT_STAT_CONN_DH_SWEEP_TOD 1120
/*! data-handle: connection sweeps */
-#define WT_STAT_CONN_DH_SWEEPS 1119
+#define WT_STAT_CONN_DH_SWEEPS 1121
/*! data-handle: session dhandles swept */
-#define WT_STAT_CONN_DH_SESSION_HANDLES 1120
+#define WT_STAT_CONN_DH_SESSION_HANDLES 1122
/*! data-handle: session sweep attempts */
-#define WT_STAT_CONN_DH_SESSION_SWEEPS 1121
+#define WT_STAT_CONN_DH_SESSION_SWEEPS 1123
/*! log: busy returns attempting to switch slots */
-#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1122
+#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1124
/*! log: consolidated slot closures */
-#define WT_STAT_CONN_LOG_SLOT_CLOSES 1123
+#define WT_STAT_CONN_LOG_SLOT_CLOSES 1125
/*! log: consolidated slot join races */
-#define WT_STAT_CONN_LOG_SLOT_RACES 1124
+#define WT_STAT_CONN_LOG_SLOT_RACES 1126
/*! log: consolidated slot join transitions */
-#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1125
+#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1127
/*! log: consolidated slot joins */
-#define WT_STAT_CONN_LOG_SLOT_JOINS 1126
+#define WT_STAT_CONN_LOG_SLOT_JOINS 1128
/*! log: consolidated slot unbuffered writes */
-#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1127
+#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1129
/*! log: log bytes of payload data */
-#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1128
+#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1130
/*! log: log bytes written */
-#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1129
+#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1131
/*! log: log files manually zero-filled */
-#define WT_STAT_CONN_LOG_ZERO_FILLS 1130
+#define WT_STAT_CONN_LOG_ZERO_FILLS 1132
/*! log: log flush operations */
-#define WT_STAT_CONN_LOG_FLUSH 1131
+#define WT_STAT_CONN_LOG_FLUSH 1133
/*! log: log force write operations */
-#define WT_STAT_CONN_LOG_FORCE_WRITE 1132
+#define WT_STAT_CONN_LOG_FORCE_WRITE 1134
/*! log: log force write operations skipped */
-#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1133
+#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1135
/*! log: log records compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1134
+#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1136
/*! log: log records not compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1135
+#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1137
/*! log: log records too small to compress */
-#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1136
+#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1138
/*! log: log release advances write LSN */
-#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1137
+#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1139
/*! log: log scan operations */
-#define WT_STAT_CONN_LOG_SCANS 1138
+#define WT_STAT_CONN_LOG_SCANS 1140
/*! log: log scan records requiring two reads */
-#define WT_STAT_CONN_LOG_SCAN_REREADS 1139
+#define WT_STAT_CONN_LOG_SCAN_REREADS 1141
/*! log: log server thread advances write LSN */
-#define WT_STAT_CONN_LOG_WRITE_LSN 1140
+#define WT_STAT_CONN_LOG_WRITE_LSN 1142
/*! log: log server thread write LSN walk skipped */
-#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1141
+#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1143
/*! log: log sync operations */
-#define WT_STAT_CONN_LOG_SYNC 1142
+#define WT_STAT_CONN_LOG_SYNC 1144
/*! log: log sync time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DURATION 1143
+#define WT_STAT_CONN_LOG_SYNC_DURATION 1145
/*! log: log sync_dir operations */
-#define WT_STAT_CONN_LOG_SYNC_DIR 1144
+#define WT_STAT_CONN_LOG_SYNC_DIR 1146
/*! log: log sync_dir time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1145
+#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1147
/*! log: log write operations */
-#define WT_STAT_CONN_LOG_WRITES 1146
+#define WT_STAT_CONN_LOG_WRITES 1148
/*! log: logging bytes consolidated */
-#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1147
+#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1149
/*! log: maximum log file size */
-#define WT_STAT_CONN_LOG_MAX_FILESIZE 1148
+#define WT_STAT_CONN_LOG_MAX_FILESIZE 1150
/*! log: number of pre-allocated log files to create */
-#define WT_STAT_CONN_LOG_PREALLOC_MAX 1149
+#define WT_STAT_CONN_LOG_PREALLOC_MAX 1151
/*! log: pre-allocated log files not ready and missed */
-#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1150
+#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1152
/*! log: pre-allocated log files prepared */
-#define WT_STAT_CONN_LOG_PREALLOC_FILES 1151
+#define WT_STAT_CONN_LOG_PREALLOC_FILES 1153
/*! log: pre-allocated log files used */
-#define WT_STAT_CONN_LOG_PREALLOC_USED 1152
+#define WT_STAT_CONN_LOG_PREALLOC_USED 1154
/*! log: records processed by log scan */
-#define WT_STAT_CONN_LOG_SCAN_RECORDS 1153
+#define WT_STAT_CONN_LOG_SCAN_RECORDS 1155
/*! log: total in-memory size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_MEM 1154
+#define WT_STAT_CONN_LOG_COMPRESS_MEM 1156
/*! log: total log buffer size */
-#define WT_STAT_CONN_LOG_BUFFER_SIZE 1155
+#define WT_STAT_CONN_LOG_BUFFER_SIZE 1157
/*! log: total size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_LEN 1156
+#define WT_STAT_CONN_LOG_COMPRESS_LEN 1158
/*! log: written slots coalesced */
-#define WT_STAT_CONN_LOG_SLOT_COALESCED 1157
+#define WT_STAT_CONN_LOG_SLOT_COALESCED 1159
/*! log: yields waiting for previous log file close */
-#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1158
+#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1160
/*! reconciliation: fast-path pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1159
+#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1161
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_CONN_REC_PAGES 1160
+#define WT_STAT_CONN_REC_PAGES 1162
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_CONN_REC_PAGES_EVICTION 1161
+#define WT_STAT_CONN_REC_PAGES_EVICTION 1163
/*! reconciliation: pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE 1162
+#define WT_STAT_CONN_REC_PAGE_DELETE 1164
/*! reconciliation: split bytes currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1163
+#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1165
/*! reconciliation: split objects currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1164
+#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1166
/*! session: open cursor count */
-#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1165
+#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1167
/*! session: open session count */
-#define WT_STAT_CONN_SESSION_OPEN 1166
+#define WT_STAT_CONN_SESSION_OPEN 1168
/*! session: table compact failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1167
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1169
/*! session: table compact successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1168
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1170
/*! session: table create failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1169
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1171
/*! session: table create successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1170
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1172
/*! session: table drop failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1171
+#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1173
/*! session: table drop successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1172
+#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1174
/*! session: table rebalance failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1173
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1175
/*! session: table rebalance successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1174
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1176
/*! session: table rename failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1175
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1177
/*! session: table rename successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1176
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1178
/*! session: table salvage failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1177
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1179
/*! session: table salvage successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1178
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1180
/*! session: table truncate failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1179
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1181
/*! session: table truncate successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1180
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1182
/*! session: table verify failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1181
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1183
/*! session: table verify successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1182
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1184
/*! thread-state: active filesystem fsync calls */
-#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1183
+#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1185
/*! thread-state: active filesystem read calls */
-#define WT_STAT_CONN_THREAD_READ_ACTIVE 1184
+#define WT_STAT_CONN_THREAD_READ_ACTIVE 1186
/*! thread-state: active filesystem write calls */
-#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1185
+#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1187
/*! thread-yield: page acquire busy blocked */
-#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1186
+#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1188
/*! thread-yield: page acquire eviction blocked */
-#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1187
+#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1189
/*! thread-yield: page acquire locked blocked */
-#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1188
+#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1190
/*! thread-yield: page acquire read blocked */
-#define WT_STAT_CONN_PAGE_READ_BLOCKED 1189
+#define WT_STAT_CONN_PAGE_READ_BLOCKED 1191
/*! thread-yield: page acquire time sleeping (usecs) */
-#define WT_STAT_CONN_PAGE_SLEEP 1190
+#define WT_STAT_CONN_PAGE_SLEEP 1192
/*! transaction: number of named snapshots created */
-#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1191
+#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1193
/*! transaction: number of named snapshots dropped */
-#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1192
+#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1194
/*! transaction: transaction begins */
-#define WT_STAT_CONN_TXN_BEGIN 1193
+#define WT_STAT_CONN_TXN_BEGIN 1195
/*! transaction: transaction checkpoint currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1194
+#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1196
/*! transaction: transaction checkpoint generation */
-#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1195
+#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1197
/*! transaction: transaction checkpoint max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1196
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1198
/*! transaction: transaction checkpoint min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1197
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1199
/*! transaction: transaction checkpoint most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1198
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1200
/*! transaction: transaction checkpoint scrub dirty target */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1199
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1201
/*! transaction: transaction checkpoint scrub time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1200
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1202
/*! transaction: transaction checkpoint total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1201
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1203
/*! transaction: transaction checkpoints */
-#define WT_STAT_CONN_TXN_CHECKPOINT 1202
+#define WT_STAT_CONN_TXN_CHECKPOINT 1204
/*! transaction: transaction failures due to cache overflow */
-#define WT_STAT_CONN_TXN_FAIL_CACHE 1203
+#define WT_STAT_CONN_TXN_FAIL_CACHE 1205
/*!
* transaction: transaction fsync calls for checkpoint after allocating
* the transaction ID
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1204
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1206
/*!
* transaction: transaction fsync duration for checkpoint after
* allocating the transaction ID (usecs)
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1205
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1207
/*! transaction: transaction range of IDs currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_RANGE 1206
+#define WT_STAT_CONN_TXN_PINNED_RANGE 1208
/*! transaction: transaction range of IDs currently pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1207
+#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1209
/*!
* transaction: transaction range of IDs currently pinned by named
* snapshots
*/
-#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1208
+#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1210
/*! transaction: transaction sync calls */
-#define WT_STAT_CONN_TXN_SYNC 1209
+#define WT_STAT_CONN_TXN_SYNC 1211
/*! transaction: transactions committed */
-#define WT_STAT_CONN_TXN_COMMIT 1210
+#define WT_STAT_CONN_TXN_COMMIT 1212
/*! transaction: transactions rolled back */
-#define WT_STAT_CONN_TXN_ROLLBACK 1211
+#define WT_STAT_CONN_TXN_ROLLBACK 1213
/*!
* @}
diff --git a/src/log/log.c b/src/log/log.c
index b17f31d5d16..b0c789f0f9e 100644
--- a/src/log/log.c
+++ b/src/log/log.c
@@ -133,8 +133,8 @@ __wt_log_force_sync(WT_SESSION_IMPL *session, WT_LSN *min_lsn)
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start);
log->sync_dir_lsn = *min_lsn;
- WT_STAT_FAST_CONN_INCR(session, log_sync_dir);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCR(session, log_sync_dir);
+ WT_STAT_CONN_INCRV(session,
log_sync_dir_duration, fsync_duration_usecs);
}
/*
@@ -157,8 +157,8 @@ __wt_log_force_sync(WT_SESSION_IMPL *session, WT_LSN *min_lsn)
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start);
log->sync_lsn = *min_lsn;
- WT_STAT_FAST_CONN_INCR(session, log_sync);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCR(session, log_sync);
+ WT_STAT_CONN_INCRV(session,
log_sync_duration, fsync_duration_usecs);
WT_ERR(__wt_close(session, &log_fh));
__wt_cond_signal(session, log->log_sync_cond);
@@ -410,7 +410,7 @@ __log_zero(WT_SESSION_IMPL *session,
bufsz = (uint32_t)conn->log_file_max;
WT_RET(__wt_scr_alloc(session, bufsz, &zerobuf));
memset(zerobuf->mem, 0, zerobuf->memsize);
- WT_STAT_FAST_CONN_INCR(session, log_zero_fills);
+ WT_STAT_CONN_INCR(session, log_zero_fills);
/*
* Read in a chunk starting at the end of the file. Keep going until
@@ -580,7 +580,7 @@ __log_fill(WT_SESSION_IMPL *session,
myslot->offset + myslot->slot->slot_start_offset,
record->size, record->mem));
- WT_STAT_FAST_CONN_INCRV(session, log_bytes_written, record->size);
+ WT_STAT_CONN_INCRV(session, log_bytes_written, record->size);
if (lsnp != NULL) {
*lsnp = myslot->slot->slot_start_lsn;
lsnp->l.offset += (uint32_t)myslot->offset;
@@ -774,7 +774,7 @@ __log_alloc_prealloc(WT_SESSION_IMPL *session, uint32_t to_num)
__wt_verbose(session, WT_VERB_LOG,
"log_alloc_prealloc: rename log %s to %s",
(const char *)from_path->data, (const char *)to_path->data);
- WT_STAT_FAST_CONN_INCR(session, log_prealloc_used);
+ WT_STAT_CONN_INCR(session, log_prealloc_used);
/*
* All file setup, writing the header and pre-allocation was done
* before. We only need to rename it.
@@ -813,7 +813,7 @@ __log_newfile(WT_SESSION_IMPL *session, bool conn_open, bool *created)
*/
WT_ASSERT(session, F_ISSET(session, WT_SESSION_LOCKED_SLOT));
for (yield_cnt = 0; log->log_close_fh != NULL;) {
- WT_STAT_FAST_CONN_INCR(session, log_close_yields);
+ WT_STAT_CONN_INCR(session, log_close_yields);
__wt_log_wrlsn(session, NULL);
if (++yield_cnt > 10000)
return (EBUSY);
@@ -859,8 +859,7 @@ __log_newfile(WT_SESSION_IMPL *session, bool conn_open, bool *created)
if (ret == 0)
create_log = false;
else {
- WT_STAT_FAST_CONN_INCR(
- session, log_prealloc_missed);
+ WT_STAT_CONN_INCR(session, log_prealloc_missed);
if (conn->log_cond != NULL)
__wt_cond_auto_signal(
session, conn->log_cond);
@@ -1411,7 +1410,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep)
* Wait for earlier groups to finish, otherwise there could
* be holes in the log file.
*/
- WT_STAT_FAST_CONN_INCR(session, log_release_write_lsn);
+ WT_STAT_CONN_INCR(session, log_release_write_lsn);
while (__wt_log_cmp(&log->write_lsn, &slot->slot_release_lsn) != 0) {
/*
* If we're on a locked path and the write LSN is not advancing,
@@ -1485,8 +1484,8 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep)
fsync_duration_usecs =
WT_TIMEDIFF_US(fsync_stop, fsync_start);
log->sync_dir_lsn = sync_lsn;
- WT_STAT_FAST_CONN_INCR(session, log_sync_dir);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCR(session, log_sync_dir);
+ WT_STAT_CONN_INCRV(session,
log_sync_dir_duration, fsync_duration_usecs);
}
@@ -1500,13 +1499,13 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep)
"/%" PRIu32,
log->log_fh->name,
sync_lsn.l.file, sync_lsn.l.offset);
- WT_STAT_FAST_CONN_INCR(session, log_sync);
+ WT_STAT_CONN_INCR(session, log_sync);
WT_ERR(__wt_epoch(session, &fsync_start));
WT_ERR(__wt_fsync(session, log->log_fh, true));
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs =
WT_TIMEDIFF_US(fsync_stop, fsync_start);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCRV(session,
log_sync_duration, fsync_duration_usecs);
log->sync_lsn = sync_lsn;
__wt_cond_signal(session, log->log_sync_cond);
@@ -1745,7 +1744,7 @@ advance:
WT_ERR(__wt_buf_grow(session, buf, rdup_len));
WT_ERR(__wt_read(session, log_fh,
rd_lsn.l.offset, (size_t)rdup_len, buf->mem));
- WT_STAT_FAST_CONN_INCR(session, log_scan_rereads);
+ WT_STAT_CONN_INCR(session, log_scan_rereads);
}
/*
* We read in the record, verify checksum.
@@ -1787,7 +1786,7 @@ advance:
* We have a valid log record. If it is not the log file
* header, invoke the callback.
*/
- WT_STAT_FAST_CONN_INCR(session, log_scan_records);
+ WT_STAT_CONN_INCR(session, log_scan_records);
next_lsn = rd_lsn;
next_lsn.l.offset += rdup_len;
if (rd_lsn.l.offset != 0) {
@@ -1828,7 +1827,7 @@ advance:
WT_ERR(__log_truncate(session,
&rd_lsn, WT_LOG_FILENAME, 0));
-err: WT_STAT_FAST_CONN_INCR(session, log_scans);
+err: WT_STAT_CONN_INCR(session, log_scans);
/*
* If the first attempt to read a log record results in
* an error recovery is likely going to fail. Try to provide
@@ -1875,13 +1874,13 @@ __wt_log_force_write(WT_SESSION_IMPL *session, bool retry, bool *did_work)
log = S2C(session)->log;
memset(&myslot, 0, sizeof(myslot));
- WT_STAT_FAST_CONN_INCR(session, log_force_write);
+ WT_STAT_CONN_INCR(session, log_force_write);
if (did_work != NULL)
*did_work = true;
myslot.slot = log->active_slot;
joined = WT_LOG_SLOT_JOINED(log->active_slot->slot_state);
if (joined == 0) {
- WT_STAT_FAST_CONN_INCR(session, log_force_write_skip);
+ WT_STAT_CONN_INCR(session, log_force_write_skip);
if (did_work != NULL)
*did_work = false;
return (0);
@@ -1923,7 +1922,7 @@ __wt_log_write(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
ip = record;
if ((compressor = conn->log_compressor) != NULL &&
record->size < log->allocsize) {
- WT_STAT_FAST_CONN_INCR(session, log_compress_small);
+ WT_STAT_CONN_INCR(session, log_compress_small);
} else if (compressor != NULL) {
/* Skip the log header */
src = (uint8_t *)record->mem + WT_LOG_COMPRESS_SKIP;
@@ -1968,13 +1967,13 @@ __wt_log_write(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
if (compression_failed ||
result_len / log->allocsize >=
record->size / log->allocsize)
- WT_STAT_FAST_CONN_INCR(session,
+ WT_STAT_CONN_INCR(session,
log_compress_write_fails);
else {
- WT_STAT_FAST_CONN_INCR(session, log_compress_writes);
- WT_STAT_FAST_CONN_INCRV(session, log_compress_mem,
+ WT_STAT_CONN_INCR(session, log_compress_writes);
+ WT_STAT_CONN_INCRV(session, log_compress_mem,
record->size);
- WT_STAT_FAST_CONN_INCRV(session, log_compress_len,
+ WT_STAT_CONN_INCRV(session, log_compress_len,
result_len);
/*
@@ -2056,7 +2055,7 @@ __log_write_internal(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
* that we can write the full amount. Do this whether or not
* direct_io is in use because it makes the reading code cleaner.
*/
- WT_STAT_FAST_CONN_INCRV(session, log_bytes_payload, record->size);
+ WT_STAT_CONN_INCRV(session, log_bytes_payload, record->size);
rdup_len = __wt_rduppo2((uint32_t)record->size, log->allocsize);
WT_ERR(__wt_buf_grow(session, record, rdup_len));
WT_ASSERT(session, record->data == record->mem);
@@ -2083,7 +2082,7 @@ __log_write_internal(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
logrec->checksum = __wt_bswap32(logrec->checksum);
#endif
- WT_STAT_FAST_CONN_INCR(session, log_writes);
+ WT_STAT_CONN_INCR(session, log_writes);
__wt_log_slot_join(session, rdup_len, flags, &myslot);
/*
diff --git a/src/log/log_slot.c b/src/log/log_slot.c
index 58377aff6f5..c79805f5371 100644
--- a/src/log/log_slot.c
+++ b/src/log/log_slot.c
@@ -90,7 +90,7 @@ retry:
* We own the slot now. No one else can join.
* Set the end LSN.
*/
- WT_STAT_FAST_CONN_INCR(session, log_slot_closes);
+ WT_STAT_CONN_INCR(session, log_slot_closes);
if (WT_LOG_SLOT_DONE(new_state))
*releasep = 1;
slot->slot_end_lsn = slot->slot_start_lsn;
@@ -108,7 +108,7 @@ retry:
end_offset =
WT_LOG_SLOT_JOINED_BUFFERED(old_state) + slot->slot_unbuffered;
slot->slot_end_lsn.l.offset += (uint32_t)end_offset;
- WT_STAT_FAST_CONN_INCRV(session, log_slot_consolidated, end_offset);
+ WT_STAT_CONN_INCRV(session, log_slot_consolidated, end_offset);
/*
* XXX Would like to change so one piece of code advances the LSN.
*/
@@ -200,7 +200,7 @@ __wt_log_slot_switch(
WT_WITH_SLOT_LOCK(session, log, ret,
ret = __log_slot_switch_internal(session, myslot, forced));
if (ret == EBUSY) {
- WT_STAT_FAST_CONN_INCR(session, log_slot_switch_busy);
+ WT_STAT_CONN_INCR(session, log_slot_switch_busy);
__wt_yield();
}
} while (F_ISSET(myslot, WT_MYSLOT_CLOSE) || (retry && ret == EBUSY));
@@ -253,7 +253,7 @@ __wt_log_slot_new(WT_SESSION_IMPL *session)
* We have a new, initialized slot to use.
* Set it as the active slot.
*/
- WT_STAT_FAST_CONN_INCR(session,
+ WT_STAT_CONN_INCR(session,
log_slot_transitions);
log->active_slot = slot;
return (0);
@@ -303,7 +303,7 @@ __wt_log_slot_init(WT_SESSION_IMPL *session)
&log->slot_pool[i].slot_buf, log->slot_buf_size));
F_SET(&log->slot_pool[i], WT_SLOT_INIT_FLAGS);
}
- WT_STAT_FAST_CONN_SET(session,
+ WT_STAT_CONN_SET(session,
log_buffer_size, log->slot_buf_size * WT_SLOT_POOL);
/*
* Set up the available slot from the pool the first time.
@@ -428,7 +428,7 @@ __wt_log_slot_join(WT_SESSION_IMPL *session, uint64_t mysize,
* The slot is no longer open or we lost the race to
* update it. Yield and try again.
*/
- WT_STAT_FAST_CONN_INCR(session, log_slot_races);
+ WT_STAT_CONN_INCR(session, log_slot_races);
__wt_yield();
}
/*
@@ -436,7 +436,7 @@ __wt_log_slot_join(WT_SESSION_IMPL *session, uint64_t mysize,
* the caller.
*/
if (mysize != 0)
- WT_STAT_FAST_CONN_INCR(session, log_slot_joins);
+ WT_STAT_CONN_INCR(session, log_slot_joins);
if (LF_ISSET(WT_LOG_DSYNC | WT_LOG_FSYNC))
F_SET(slot, WT_SLOT_SYNC_DIR);
if (LF_ISSET(WT_LOG_FLUSH))
@@ -445,7 +445,7 @@ __wt_log_slot_join(WT_SESSION_IMPL *session, uint64_t mysize,
F_SET(slot, WT_SLOT_SYNC);
if (F_ISSET(myslot, WT_MYSLOT_UNBUFFERED)) {
WT_ASSERT(session, slot->slot_unbuffered == 0);
- WT_STAT_FAST_CONN_INCR(session, log_slot_unbuffered);
+ WT_STAT_CONN_INCR(session, log_slot_unbuffered);
slot->slot_unbuffered = (int64_t)mysize;
}
myslot->slot = slot;
diff --git a/src/lsm/lsm_cursor.c b/src/lsm/lsm_cursor.c
index bf591d8dbe6..e98f59e7b05 100644
--- a/src/lsm/lsm_cursor.c
+++ b/src/lsm/lsm_cursor.c
@@ -668,7 +668,7 @@ retry: if (F_ISSET(clsm, WT_CLSM_MERGE)) {
clsm->dsk_gen = lsm_tree->dsk_gen;
-err:
+err:
#ifdef HAVE_DIAGNOSTIC
/* Check that all cursors are open as expected. */
if (ret == 0 && F_ISSET(clsm, WT_CLSM_OPEN_READ)) {
@@ -1348,11 +1348,11 @@ __clsm_put(WT_SESSION_IMPL *session, WT_CURSOR_LSM *clsm,
clsm->update_count = 0;
WT_LSM_TREE_STAT_INCRV(session,
lsm_tree->lsm_checkpoint_throttle, lsm_tree->ckpt_throttle);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCRV(session,
lsm_checkpoint_throttle, lsm_tree->ckpt_throttle);
WT_LSM_TREE_STAT_INCRV(session,
lsm_tree->lsm_merge_throttle, lsm_tree->merge_throttle);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCRV(session,
lsm_merge_throttle, lsm_tree->merge_throttle);
__wt_sleep(0,
lsm_tree->ckpt_throttle + lsm_tree->merge_throttle);
diff --git a/src/lsm/lsm_manager.c b/src/lsm/lsm_manager.c
index a504acc361c..5a5140b9c3a 100644
--- a/src/lsm/lsm_manager.c
+++ b/src/lsm/lsm_manager.c
@@ -328,7 +328,7 @@ __wt_lsm_manager_destroy(WT_SESSION_IMPL *session)
WT_TRET(wt_session->close(wt_session, NULL));
}
}
- WT_STAT_FAST_CONN_INCRV(session, lsm_work_units_discarded, removed);
+ WT_STAT_CONN_INCRV(session, lsm_work_units_discarded, removed);
/* Free resources that are allocated in connection initialize */
__wt_spin_destroy(session, &manager->switch_lock);
@@ -413,7 +413,7 @@ __lsm_manager_run_server(WT_SESSION_IMPL *session)
* more.
*/
if (lsm_tree->queue_ref >= LSM_TREE_MAX_QUEUE)
- WT_STAT_FAST_CONN_INCR(session,
+ WT_STAT_CONN_INCR(session,
lsm_work_queue_max);
else if ((!lsm_tree->modified &&
lsm_tree->nchunks > 1) ||
@@ -539,7 +539,7 @@ __wt_lsm_manager_clear_tree(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree)
__wt_lsm_manager_free_work_unit(session, current);
}
__wt_spin_unlock(session, &manager->manager_lock);
- WT_STAT_FAST_CONN_INCRV(session, lsm_work_units_discarded, removed);
+ WT_STAT_CONN_INCRV(session, lsm_work_units_discarded, removed);
}
/*
@@ -554,7 +554,7 @@ __wt_lsm_manager_clear_tree(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree)
TAILQ_FOREACH(entry, (qh), q) { \
if (FLD_ISSET(type, entry->type)) { \
TAILQ_REMOVE(qh, entry, q); \
- WT_STAT_FAST_CONN_DECR(session, qlen); \
+ WT_STAT_CONN_DECR(session, qlen); \
break; \
} \
} \
@@ -590,7 +590,7 @@ __wt_lsm_manager_pop_entry(
LSM_POP_ENTRY(&manager->appqh,
&manager->app_lock, lsm_work_queue_app);
if (entry != NULL)
- WT_STAT_FAST_CONN_INCR(session, lsm_work_units_done);
+ WT_STAT_CONN_INCR(session, lsm_work_units_done);
*entryp = entry;
return (0);
}
@@ -603,7 +603,7 @@ __wt_lsm_manager_pop_entry(
#define LSM_PUSH_ENTRY(qh, qlock, qlen) do { \
__wt_spin_lock(session, qlock); \
TAILQ_INSERT_TAIL((qh), entry, q); \
- WT_STAT_FAST_CONN_INCR(session, qlen); \
+ WT_STAT_CONN_INCR(session, qlen); \
__wt_spin_unlock(session, qlock); \
} while (0)
@@ -656,7 +656,7 @@ __wt_lsm_manager_push_entry(WT_SESSION_IMPL *session,
entry->type = type;
entry->flags = flags;
entry->lsm_tree = lsm_tree;
- WT_STAT_FAST_CONN_INCR(session, lsm_work_units_created);
+ WT_STAT_CONN_INCR(session, lsm_work_units_created);
if (type == WT_LSM_WORK_SWITCH)
LSM_PUSH_ENTRY(&manager->switchqh,
diff --git a/src/lsm/lsm_merge.c b/src/lsm/lsm_merge.c
index 2276631af1e..4bbfcfd4411 100644
--- a/src/lsm/lsm_merge.c
+++ b/src/lsm/lsm_merge.c
@@ -461,7 +461,7 @@ __wt_lsm_merge(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree, u_int id)
if (!lsm_tree->active)
WT_ERR(EINTR);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCRV(session,
lsm_rows_merged, LSM_MERGE_CHECK_INTERVAL);
++lsm_tree->merge_progressing;
}
@@ -476,7 +476,7 @@ __wt_lsm_merge(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree, u_int id)
}
WT_ERR_NOTFOUND_OK(ret);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCRV(session,
lsm_rows_merged, insert_count % LSM_MERGE_CHECK_INTERVAL);
++lsm_tree->merge_progressing;
__wt_verbose(session, WT_VERB_LSM,
diff --git a/src/lsm/lsm_stat.c b/src/lsm/lsm_stat.c
index 95909ce30e8..f4f5a0acce8 100644
--- a/src/lsm/lsm_stat.c
+++ b/src/lsm/lsm_stat.c
@@ -39,7 +39,7 @@ __curstat_lsm_init(
WT_ERR(__wt_scr_alloc(session, 0, &uribuf));
/* Propagate all, fast and/or clear to the cursors we open. */
- if (!F_ISSET(cst, WT_CONN_STAT_NONE)) {
+ if (cst->flags != 0) {
(void)snprintf(config, sizeof(config),
"statistics=(%s%s%s%s)",
F_ISSET(cst, WT_CONN_STAT_ALL) ? "all," : "",
@@ -91,7 +91,8 @@ __curstat_lsm_init(
* top-level.
*/
new = (WT_DSRC_STATS *)WT_CURSOR_STATS(stat_cursor);
- WT_STAT_WRITE(new, lsm_generation_max, chunk->generation);
+ WT_STAT_WRITE(session,
+ new, lsm_generation_max, chunk->generation);
/* Aggregate statistics from each new chunk. */
__wt_stat_dsrc_aggregate_single(new, stats);
@@ -115,40 +116,41 @@ __curstat_lsm_init(
* into the top-level.
*/
new = (WT_DSRC_STATS *)WT_CURSOR_STATS(stat_cursor);
- WT_STAT_WRITE(new, bloom_size,
+ WT_STAT_WRITE(session, new, bloom_size,
(int64_t)((chunk->count * lsm_tree->bloom_bit_count) / 8));
- WT_STAT_WRITE(new, bloom_page_evict,
+ WT_STAT_WRITE(session, new, bloom_page_evict,
new->cache_eviction_clean + new->cache_eviction_dirty);
- WT_STAT_WRITE(new, bloom_page_read, new->cache_read);
+ WT_STAT_WRITE(session, new, bloom_page_read, new->cache_read);
__wt_stat_dsrc_aggregate_single(new, stats);
WT_ERR(stat_cursor->close(stat_cursor));
}
/* Set statistics that aren't aggregated directly into the cursor */
- WT_STAT_WRITE(stats, bloom_count, bloom_count);
- WT_STAT_WRITE(stats, lsm_chunk_count, lsm_tree->nchunks);
+ WT_STAT_WRITE(session, stats, bloom_count, bloom_count);
+ WT_STAT_WRITE(session, stats, lsm_chunk_count, lsm_tree->nchunks);
/* Include, and optionally clear, LSM-level specific information. */
- WT_STAT_WRITE(stats, bloom_miss, lsm_tree->bloom_miss);
+ WT_STAT_WRITE(session, stats, bloom_miss, lsm_tree->bloom_miss);
if (F_ISSET(cst, WT_CONN_STAT_CLEAR))
lsm_tree->bloom_miss = 0;
- WT_STAT_WRITE(stats, bloom_hit, lsm_tree->bloom_hit);
+ WT_STAT_WRITE(session, stats, bloom_hit, lsm_tree->bloom_hit);
if (F_ISSET(cst, WT_CONN_STAT_CLEAR))
lsm_tree->bloom_hit = 0;
- WT_STAT_WRITE(
+ WT_STAT_WRITE(session,
stats, bloom_false_positive, lsm_tree->bloom_false_positive);
if (F_ISSET(cst, WT_CONN_STAT_CLEAR))
lsm_tree->bloom_false_positive = 0;
- WT_STAT_WRITE(
+ WT_STAT_WRITE(session,
stats, lsm_lookup_no_bloom, lsm_tree->lsm_lookup_no_bloom);
if (F_ISSET(cst, WT_CONN_STAT_CLEAR))
lsm_tree->lsm_lookup_no_bloom = 0;
- WT_STAT_WRITE(
+ WT_STAT_WRITE(session,
stats, lsm_checkpoint_throttle, lsm_tree->lsm_checkpoint_throttle);
if (F_ISSET(cst, WT_CONN_STAT_CLEAR))
lsm_tree->lsm_checkpoint_throttle = 0;
- WT_STAT_WRITE(stats, lsm_merge_throttle, lsm_tree->lsm_merge_throttle);
+ WT_STAT_WRITE(session,
+ stats, lsm_merge_throttle, lsm_tree->lsm_merge_throttle);
if (F_ISSET(cst, WT_CONN_STAT_CLEAR))
lsm_tree->lsm_merge_throttle = 0;
diff --git a/src/meta/meta_table.c b/src/meta/meta_table.c
index 58842c756d1..76f4ef0c25f 100644
--- a/src/meta/meta_table.c
+++ b/src/meta/meta_table.c
@@ -54,7 +54,7 @@ __wt_metadata_cursor_open(
*/
btree = ((WT_CURSOR_BTREE *)(*cursorp))->btree;
- /*
+ /*
* Special settings for metadata: skew eviction so metadata almost
* always stays in cache and make sure metadata is logged if possible.
*
diff --git a/src/os_common/os_alloc.c b/src/os_common/os_alloc.c
index cfc7b80450e..bfe5efafc8b 100644
--- a/src/os_common/os_alloc.c
+++ b/src/os_common/os_alloc.c
@@ -46,7 +46,7 @@ __wt_calloc(WT_SESSION_IMPL *session, size_t number, size_t size, void *retp)
WT_ASSERT(session, number != 0 && size != 0);
if (session != NULL)
- WT_STAT_FAST_CONN_INCR(session, memory_allocation);
+ WT_STAT_CONN_INCR(session, memory_allocation);
if ((p = calloc(number, size)) == NULL)
WT_RET_MSG(session, __wt_errno(),
@@ -79,7 +79,7 @@ __wt_malloc(WT_SESSION_IMPL *session, size_t bytes_to_allocate, void *retp)
WT_ASSERT(session, bytes_to_allocate != 0);
if (session != NULL)
- WT_STAT_FAST_CONN_INCR(session, memory_allocation);
+ WT_STAT_CONN_INCR(session, memory_allocation);
if ((p = malloc(bytes_to_allocate)) == NULL)
WT_RET_MSG(session, __wt_errno(),
@@ -121,9 +121,9 @@ __realloc_func(WT_SESSION_IMPL *session,
if (session != NULL) {
if (p == NULL)
- WT_STAT_FAST_CONN_INCR(session, memory_allocation);
+ WT_STAT_CONN_INCR(session, memory_allocation);
else
- WT_STAT_FAST_CONN_INCR(session, memory_grow);
+ WT_STAT_CONN_INCR(session, memory_grow);
}
if ((p = realloc(p, bytes_to_allocate)) == NULL)
@@ -216,7 +216,7 @@ __wt_realloc_aligned(WT_SESSION_IMPL *session,
bytes_to_allocate =
WT_ALIGN(bytes_to_allocate, S2C(session)->buffer_alignment);
- WT_STAT_FAST_CONN_INCR(session, memory_allocation);
+ WT_STAT_CONN_INCR(session, memory_allocation);
if ((ret = posix_memalign(&newp,
S2C(session)->buffer_alignment,
@@ -302,7 +302,7 @@ __wt_free_int(WT_SESSION_IMPL *session, const void *p_arg)
* This function MUST handle a NULL WT_SESSION_IMPL handle.
*/
if (session != NULL)
- WT_STAT_FAST_CONN_INCR(session, memory_free);
+ WT_STAT_CONN_INCR(session, memory_free);
free(p);
}
diff --git a/src/os_posix/os_mtx_cond.c b/src/os_posix/os_mtx_cond.c
index 9f17d9ff381..b25bb8c25d1 100644
--- a/src/os_posix/os_mtx_cond.c
+++ b/src/os_posix/os_mtx_cond.c
@@ -57,7 +57,7 @@ __wt_cond_wait_signal(
return;
__wt_verbose(session, WT_VERB_MUTEX, "wait %s", cond->name);
- WT_STAT_FAST_CONN_INCR(session, cond_wait);
+ WT_STAT_CONN_INCR(session, cond_wait);
WT_ERR(pthread_mutex_lock(&cond->mtx));
locked = true;
diff --git a/src/os_win/os_mtx_cond.c b/src/os_win/os_mtx_cond.c
index 27207d289a6..41acec3ab4c 100644
--- a/src/os_win/os_mtx_cond.c
+++ b/src/os_win/os_mtx_cond.c
@@ -54,7 +54,7 @@ __wt_cond_wait_signal(
return;
__wt_verbose(session, WT_VERB_MUTEX, "wait %s", cond->name);
- WT_STAT_FAST_CONN_INCR(session, cond_wait);
+ WT_STAT_CONN_INCR(session, cond_wait);
EnterCriticalSection(&cond->mtx);
locked = true;
diff --git a/src/reconcile/rec_write.c b/src/reconcile/rec_write.c
index a9912628942..9c38c535301 100644
--- a/src/reconcile/rec_write.c
+++ b/src/reconcile/rec_write.c
@@ -435,19 +435,19 @@ __wt_reconcile(WT_SESSION_IMPL *session,
__wt_writeunlock(session, &page->page_lock);
/* Update statistics. */
- WT_STAT_FAST_CONN_INCR(session, rec_pages);
- WT_STAT_FAST_DATA_INCR(session, rec_pages);
+ WT_STAT_CONN_INCR(session, rec_pages);
+ WT_STAT_DATA_INCR(session, rec_pages);
if (LF_ISSET(WT_EVICTING)) {
- WT_STAT_FAST_CONN_INCR(session, rec_pages_eviction);
- WT_STAT_FAST_DATA_INCR(session, rec_pages_eviction);
+ WT_STAT_CONN_INCR(session, rec_pages_eviction);
+ WT_STAT_DATA_INCR(session, rec_pages_eviction);
}
if (r->cache_write_lookaside) {
- WT_STAT_FAST_CONN_INCR(session, cache_write_lookaside);
- WT_STAT_FAST_DATA_INCR(session, cache_write_lookaside);
+ WT_STAT_CONN_INCR(session, cache_write_lookaside);
+ WT_STAT_DATA_INCR(session, cache_write_lookaside);
}
if (r->cache_write_restore) {
- WT_STAT_FAST_CONN_INCR(session, cache_write_restore);
- WT_STAT_FAST_DATA_INCR(session, cache_write_restore);
+ WT_STAT_CONN_INCR(session, cache_write_restore);
+ WT_STAT_DATA_INCR(session, cache_write_restore);
}
/*
@@ -2273,7 +2273,7 @@ __rec_split_row_promote(
for (cnt = 1; len > 0; ++cnt, --len, ++pa, ++pb)
if (*pa != *pb) {
if (size != cnt) {
- WT_STAT_FAST_DATA_INCRV(session,
+ WT_STAT_DATA_INCRV(session,
rec_suffix_compression, size - cnt);
size = cnt;
}
@@ -2726,7 +2726,7 @@ __rec_split_raw_worker(WT_SESSION_IMPL *session,
* we were successful and have a block to write.
*/
if (result_slots == 0) {
- WT_STAT_FAST_DATA_INCR(session, compress_raw_fail);
+ WT_STAT_DATA_INCR(session, compress_raw_fail);
/*
* If there are no more rows, we can write the original
@@ -2755,7 +2755,7 @@ __rec_split_raw_worker(WT_SESSION_IMPL *session,
*/
last->already_compressed = false;
} else {
- WT_STAT_FAST_DATA_INCR(session, compress_raw_ok);
+ WT_STAT_DATA_INCR(session, compress_raw_ok);
/*
* If there are more rows and the compression function
@@ -2873,7 +2873,7 @@ no_slots:
* Compression failed and there are no more rows to accumulate,
* write the original buffer instead.
*/
- WT_STAT_FAST_DATA_INCR(session, compress_raw_fail);
+ WT_STAT_DATA_INCR(session, compress_raw_fail);
dsk->recno = last->recno;
dsk->mem_size = WT_PTRDIFF32(r->first_free, dsk);
@@ -2892,7 +2892,7 @@ no_slots:
* compression function wants to try again; increase the size of
* the "page" and try again after we accumulate some more rows.
*/
- WT_STAT_FAST_DATA_INCR(session, compress_raw_fail_temporary);
+ WT_STAT_DATA_INCR(session, compress_raw_fail_temporary);
goto split_grow;
}
@@ -3323,7 +3323,7 @@ supd_check_complete:
multi->addr.reuse = 1;
bnd->addr = multi->addr;
- WT_STAT_FAST_DATA_INCR(session, rec_page_match);
+ WT_STAT_DATA_INCR(session, rec_page_match);
goto copy_image;
}
}
@@ -5644,8 +5644,8 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page)
case 0: /* Page delete */
__wt_verbose(
session, WT_VERB_RECONCILE, "page %p empty", (void *)page);
- WT_STAT_FAST_CONN_INCR(session, rec_page_delete);
- WT_STAT_FAST_DATA_INCR(session, rec_page_delete);
+ WT_STAT_CONN_INCR(session, rec_page_delete);
+ WT_STAT_DATA_INCR(session, rec_page_delete);
/* If this is the root page, we need to create a sync point. */
ref = r->ref;
@@ -5710,13 +5710,12 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page)
switch (page->type) {
case WT_PAGE_COL_INT:
case WT_PAGE_ROW_INT:
- WT_STAT_FAST_DATA_INCR(
- session, rec_multiblock_internal);
+ WT_STAT_DATA_INCR(session, rec_multiblock_internal);
break;
case WT_PAGE_COL_FIX:
case WT_PAGE_COL_VAR:
case WT_PAGE_ROW_LEAF:
- WT_STAT_FAST_DATA_INCR(session, rec_multiblock_leaf);
+ WT_STAT_DATA_INCR(session, rec_multiblock_leaf);
break;
WT_ILLEGAL_VALUE(session);
}
@@ -5728,7 +5727,7 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page)
/* Track the largest set of page-splits. */
if (r->bnd_next > r->bnd_next_max) {
r->bnd_next_max = r->bnd_next;
- WT_STAT_FAST_DATA_SET(
+ WT_STAT_DATA_SET(
session, rec_multiblock_max, r->bnd_next_max);
}
@@ -5929,7 +5928,7 @@ __rec_cell_build_int_key(WT_SESSION_IMPL *session,
/* Create an overflow object if the data won't fit. */
if (size > btree->maxintlkey) {
- WT_STAT_FAST_DATA_INCR(session, rec_overflow_key_internal);
+ WT_STAT_DATA_INCR(session, rec_overflow_key_internal);
*is_ovflp = true;
return (__rec_cell_build_ovfl(
@@ -6008,7 +6007,7 @@ __rec_cell_build_leaf_key(WT_SESSION_IMPL *session,
if (pfx < btree->prefix_compression_min)
pfx = 0;
else
- WT_STAT_FAST_DATA_INCRV(
+ WT_STAT_DATA_INCRV(
session, rec_prefix_compression, pfx);
}
@@ -6029,7 +6028,7 @@ __rec_cell_build_leaf_key(WT_SESSION_IMPL *session,
* object that was prefix compressed.
*/
if (pfx == 0) {
- WT_STAT_FAST_DATA_INCR(session, rec_overflow_key_leaf);
+ WT_STAT_DATA_INCR(session, rec_overflow_key_leaf);
*is_ovflp = true;
return (__rec_cell_build_ovfl(
@@ -6113,7 +6112,7 @@ __rec_cell_build_val(WT_SESSION_IMPL *session,
/* Create an overflow object if the data won't fit. */
if (val->buf.size > btree->maxleafvalue) {
- WT_STAT_FAST_DATA_INCR(session, rec_overflow_value);
+ WT_STAT_DATA_INCR(session, rec_overflow_value);
return (__rec_cell_build_ovfl(
session, r, val, WT_CELL_VALUE_OVFL, rle));
@@ -6356,7 +6355,7 @@ __rec_dictionary_lookup(
WT_RET(__wt_cell_pack_data_match(
dp->cell, &val->cell, val->buf.data, &match));
if (match) {
- WT_STAT_FAST_DATA_INCR(session, rec_dictionary);
+ WT_STAT_DATA_INCR(session, rec_dictionary);
*dpp = dp;
return (0);
}
diff --git a/src/schema/schema_truncate.c b/src/schema/schema_truncate.c
index d9a798b6ed8..563bafa8ffc 100644
--- a/src/schema/schema_truncate.c
+++ b/src/schema/schema_truncate.c
@@ -20,7 +20,7 @@ __truncate_table(WT_SESSION_IMPL *session, const char *uri, const char *cfg[])
u_int i;
WT_RET(__wt_schema_get_table(session, uri, strlen(uri), false, &table));
- WT_STAT_FAST_DATA_INCR(session, cursor_truncate);
+ WT_STAT_DATA_INCR(session, cursor_truncate);
/* Truncate the column groups. */
for (i = 0; i < WT_COLGROUPS(table); i++)
@@ -55,7 +55,7 @@ __truncate_dsrc(WT_SESSION_IMPL *session, const char *uri)
while ((ret = cursor->next(cursor)) == 0)
WT_ERR(cursor->remove(cursor));
WT_ERR_NOTFOUND_OK(ret);
- WT_STAT_FAST_DATA_INCR(session, cursor_truncate);
+ WT_STAT_DATA_INCR(session, cursor_truncate);
err: WT_TRET(cursor->close(cursor));
return (ret);
diff --git a/src/session/session_api.c b/src/session/session_api.c
index 82ce934c250..0d3fcad3184 100644
--- a/src/session/session_api.c
+++ b/src/session/session_api.c
@@ -203,7 +203,7 @@ __session_close(WT_SESSION *wt_session, const char *config)
__wt_spin_lock(session, &conn->api_lock);
/* Decrement the count of open sessions. */
- WT_STAT_FAST_CONN_DECR(session, session_open);
+ WT_STAT_CONN_DECR(session, session_open);
/*
* Sessions are re-used, clear the structure: the clear sets the active
@@ -517,9 +517,9 @@ __session_create(WT_SESSION *wt_session, const char *uri, const char *config)
ret = __wt_session_create(session, uri, config);
err: if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_create_fail);
+ WT_STAT_CONN_INCR(session, session_table_create_fail);
else
- WT_STAT_FAST_CONN_INCR(session, session_table_create_success);
+ WT_STAT_CONN_INCR(session, session_table_create_success);
API_END_RET_NOTFOUND_MAP(session, ret);
}
@@ -540,7 +540,7 @@ __session_create_readonly(
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL_NOCONF(session, create);
- WT_STAT_FAST_CONN_INCR(session, session_table_create_fail);
+ WT_STAT_CONN_INCR(session, session_table_create_fail);
ret = __wt_session_notsup(session);
err: API_END_RET(session, ret);
}
@@ -560,7 +560,7 @@ __session_log_flush(WT_SESSION *wt_session, const char *config)
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL(session, log_flush, config, cfg);
- WT_STAT_FAST_CONN_INCR(session, log_flush);
+ WT_STAT_CONN_INCR(session, log_flush);
conn = S2C(session);
flags = 0;
@@ -664,9 +664,9 @@ __session_rebalance(WT_SESSION *wt_session, const char *uri, const char *config)
NULL, cfg, WT_DHANDLE_EXCLUSIVE | WT_BTREE_REBALANCE)));
err: if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_rebalance_fail);
+ WT_STAT_CONN_INCR(session, session_table_rebalance_fail);
else
- WT_STAT_FAST_CONN_INCR(session,
+ WT_STAT_CONN_INCR(session,
session_table_rebalance_success);
API_END_RET_NOTFOUND_MAP(session, ret);
}
@@ -688,7 +688,7 @@ __session_rebalance_readonly(
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL_NOCONF(session, rebalance);
- WT_STAT_FAST_CONN_INCR(session, session_table_rebalance_fail);
+ WT_STAT_CONN_INCR(session, session_table_rebalance_fail);
ret = __wt_session_notsup(session);
err: API_END_RET(session, ret);
}
@@ -717,9 +717,9 @@ __session_rename(WT_SESSION *wt_session,
ret = __wt_schema_rename(session, uri, newuri, cfg))));
err: if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_rename_fail);
+ WT_STAT_CONN_INCR(session, session_table_rename_fail);
else
- WT_STAT_FAST_CONN_INCR(session, session_table_rename_success);
+ WT_STAT_CONN_INCR(session, session_table_rename_success);
API_END_RET_NOTFOUND_MAP(session, ret);
}
@@ -741,7 +741,7 @@ __session_rename_readonly(WT_SESSION *wt_session,
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL_NOCONF(session, rename);
- WT_STAT_FAST_CONN_INCR(session, session_table_rename_fail);
+ WT_STAT_CONN_INCR(session, session_table_rename_fail);
ret = __wt_session_notsup(session);
err: API_END_RET(session, ret);
}
@@ -829,9 +829,9 @@ __session_drop(WT_SESSION *wt_session, const char *uri, const char *config)
ret = __wt_session_drop(session, uri, cfg);
err: if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_drop_fail);
+ WT_STAT_CONN_INCR(session, session_table_drop_fail);
else
- WT_STAT_FAST_CONN_INCR(session, session_table_drop_success);
+ WT_STAT_CONN_INCR(session, session_table_drop_success);
/* Note: drop operations cannot be unrolled (yet?). */
API_END_RET_NOTFOUND_MAP(session, ret);
@@ -854,7 +854,7 @@ __session_drop_readonly(
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL_NOCONF(session, drop);
- WT_STAT_FAST_CONN_INCR(session, session_table_drop_fail);
+ WT_STAT_CONN_INCR(session, session_table_drop_fail);
ret = __wt_session_notsup(session);
err: API_END_RET(session, ret);
}
@@ -1015,9 +1015,9 @@ __session_salvage(WT_SESSION *wt_session, const char *uri, const char *config)
NULL, cfg, WT_DHANDLE_EXCLUSIVE | WT_BTREE_SALVAGE)));
err: if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_salvage_fail);
+ WT_STAT_CONN_INCR(session, session_table_salvage_fail);
else
- WT_STAT_FAST_CONN_INCR(session, session_table_salvage_success);
+ WT_STAT_CONN_INCR(session, session_table_salvage_success);
API_END_RET_NOTFOUND_MAP(session, ret);
}
@@ -1038,7 +1038,7 @@ __session_salvage_readonly(
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL_NOCONF(session, salvage);
- WT_STAT_FAST_CONN_INCR(session, session_table_salvage_fail);
+ WT_STAT_CONN_INCR(session, session_table_salvage_fail);
ret = __wt_session_notsup(session);
err: API_END_RET(session, ret);
}
@@ -1172,7 +1172,7 @@ __session_truncate(WT_SESSION *wt_session,
session = (WT_SESSION_IMPL *)wt_session;
SESSION_TXN_API_CALL(session, truncate, config, cfg);
- WT_STAT_FAST_CONN_INCR(session, cursor_truncate);
+ WT_STAT_CONN_INCR(session, cursor_truncate);
/*
* If the URI is specified, we don't need a start/stop, if start/stop
@@ -1219,9 +1219,9 @@ __session_truncate(WT_SESSION *wt_session,
err: TXN_API_END_RETRY(session, ret, 0);
if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_truncate_fail);
+ WT_STAT_CONN_INCR(session, session_table_truncate_fail);
else
- WT_STAT_FAST_CONN_INCR(session, session_table_truncate_success);
+ WT_STAT_CONN_INCR(session, session_table_truncate_success);
/*
* Only map WT_NOTFOUND to ENOENT if a URI was specified.
*/
@@ -1247,7 +1247,7 @@ __session_truncate_readonly(WT_SESSION *wt_session,
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL_NOCONF(session, truncate);
- WT_STAT_FAST_CONN_INCR(session, session_table_truncate_fail);
+ WT_STAT_CONN_INCR(session, session_table_truncate_fail);
ret = __wt_session_notsup(session);
err: API_END_RET(session, ret);
}
@@ -1319,9 +1319,9 @@ __session_verify(WT_SESSION *wt_session, const char *uri, const char *config)
NULL, cfg, WT_DHANDLE_EXCLUSIVE | WT_BTREE_VERIFY)));
err: if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_verify_fail);
+ WT_STAT_CONN_INCR(session, session_table_verify_fail);
else
- WT_STAT_FAST_CONN_INCR(session, session_table_verify_success);
+ WT_STAT_CONN_INCR(session, session_table_verify_success);
API_END_RET_NOTFOUND_MAP(session, ret);
}
@@ -1337,7 +1337,7 @@ __session_begin_transaction(WT_SESSION *wt_session, const char *config)
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL(session, begin_transaction, config, cfg);
- WT_STAT_FAST_CONN_INCR(session, txn_begin);
+ WT_STAT_CONN_INCR(session, txn_begin);
if (F_ISSET(&session->txn, WT_TXN_RUNNING))
WT_ERR_MSG(session, EINVAL, "Transaction already running");
@@ -1360,7 +1360,7 @@ __session_commit_transaction(WT_SESSION *wt_session, const char *config)
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL(session, commit_transaction, config, cfg);
- WT_STAT_FAST_CONN_INCR(session, txn_commit);
+ WT_STAT_CONN_INCR(session, txn_commit);
txn = &session->txn;
if (F_ISSET(txn, WT_TXN_ERROR) && txn->mod_count != 0)
@@ -1389,7 +1389,7 @@ __session_rollback_transaction(WT_SESSION *wt_session, const char *config)
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL(session, rollback_transaction, config, cfg);
- WT_STAT_FAST_CONN_INCR(session, txn_rollback);
+ WT_STAT_CONN_INCR(session, txn_rollback);
WT_TRET(__wt_session_reset_cursors(session, false));
@@ -1449,7 +1449,7 @@ __session_transaction_sync(WT_SESSION *wt_session, const char *config)
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL(session, transaction_sync, config, cfg);
- WT_STAT_FAST_CONN_INCR(session, txn_sync);
+ WT_STAT_CONN_INCR(session, txn_sync);
conn = S2C(session);
txn = &session->txn;
@@ -1551,7 +1551,7 @@ __session_checkpoint(WT_SESSION *wt_session, const char *config)
session = (WT_SESSION_IMPL *)wt_session;
- WT_STAT_FAST_CONN_INCR(session, txn_checkpoint);
+ WT_STAT_CONN_INCR(session, txn_checkpoint);
SESSION_API_CALL(session, checkpoint, config, cfg);
if (F_ISSET(S2C(session), WT_CONN_IN_MEMORY))
@@ -1828,7 +1828,7 @@ __open_session(WT_CONNECTION_IMPL *conn,
WT_STATIC_ASSERT(offsetof(WT_SESSION_IMPL, iface) == 0);
*sessionp = session_ret;
- WT_STAT_FAST_CONN_INCR(session, session_open);
+ WT_STAT_CONN_INCR(session, session_open);
err: __wt_spin_unlock(session, &conn->api_lock);
return (ret);
diff --git a/src/session/session_compact.c b/src/session/session_compact.c
index 47ed5298304..f03d5d34bac 100644
--- a/src/session/session_compact.c
+++ b/src/session/session_compact.c
@@ -334,9 +334,9 @@ err: session->compact = NULL;
WT_TRET(__wt_session_release_resources(session));
if (ret != 0)
- WT_STAT_FAST_CONN_INCR(session, session_table_compact_fail);
+ WT_STAT_CONN_INCR(session, session_table_compact_fail);
else
- WT_STAT_FAST_CONN_INCR(session, session_table_compact_success);
+ WT_STAT_CONN_INCR(session, session_table_compact_success);
API_END_RET_NOTFOUND_MAP(session, ret);
}
@@ -357,7 +357,7 @@ __wt_session_compact_readonly(
session = (WT_SESSION_IMPL *)wt_session;
SESSION_API_CALL_NOCONF(session, compact);
- WT_STAT_FAST_CONN_INCR(session, session_table_compact_fail);
+ WT_STAT_CONN_INCR(session, session_table_compact_fail);
ret = __wt_session_notsup(session);
err: API_END_RET(session, ret);
}
diff --git a/src/session/session_dhandle.c b/src/session/session_dhandle.c
index a899bad1b1f..e76407567bc 100644
--- a/src/session/session_dhandle.c
+++ b/src/session/session_dhandle.c
@@ -390,7 +390,7 @@ __session_dhandle_sweep(WT_SESSION_IMPL *session)
return (0);
session->last_sweep = now;
- WT_STAT_FAST_CONN_INCR(session, dh_session_sweeps);
+ WT_STAT_CONN_INCR(session, dh_session_sweeps);
dhandle_cache = TAILQ_FIRST(&session->dhandles);
while (dhandle_cache != NULL) {
@@ -402,7 +402,7 @@ __session_dhandle_sweep(WT_SESSION_IMPL *session)
(dhandle->timeofdeath != 0 &&
difftime(now, dhandle->timeofdeath) >
conn->sweep_idle_time))) {
- WT_STAT_FAST_CONN_INCR(session, dh_session_handles);
+ WT_STAT_CONN_INCR(session, dh_session_handles);
WT_ASSERT(session, !WT_IS_METADATA(session, dhandle));
__session_discard_dhandle(session, dhandle_cache);
}
diff --git a/src/support/cond_auto.c b/src/support/cond_auto.c
index 69114b066ae..a3ae67f5baa 100644
--- a/src/support/cond_auto.c
+++ b/src/support/cond_auto.c
@@ -85,7 +85,7 @@ __wt_cond_auto_wait_signal(
*/
WT_ASSERT(session, cond->min_wait != 0);
- WT_STAT_FAST_CONN_INCR(session, cond_auto_wait);
+ WT_STAT_CONN_INCR(session, cond_auto_wait);
if (progress)
cond->prev_wait = cond->min_wait;
else {
@@ -97,7 +97,7 @@ __wt_cond_auto_wait_signal(
__wt_cond_wait_signal(session, cond, cond->prev_wait, signalled);
if (progress || *signalled)
- WT_STAT_FAST_CONN_INCR(session, cond_auto_wait_reset);
+ WT_STAT_CONN_INCR(session, cond_auto_wait_reset);
if (*signalled)
cond->prev_wait = cond->min_wait;
}
diff --git a/src/support/mtx_rw.c b/src/support/mtx_rw.c
index 0bdde81c32f..fefa346ac14 100644
--- a/src/support/mtx_rw.c
+++ b/src/support/mtx_rw.c
@@ -143,7 +143,7 @@ __wt_try_readlock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
{
wt_rwlock_t *l, new, old;
- WT_STAT_FAST_CONN_INCR(session, rwlock_read);
+ WT_STAT_CONN_INCR(session, rwlock_read);
l = &rwlock->rwlock;
new = old = *l;
@@ -177,7 +177,7 @@ __wt_readlock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
uint16_t ticket;
int pause_cnt;
- WT_STAT_FAST_CONN_INCR(session, rwlock_read);
+ WT_STAT_CONN_INCR(session, rwlock_read);
WT_DIAGNOSTIC_YIELD;
@@ -247,7 +247,7 @@ __wt_try_writelock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
{
wt_rwlock_t *l, new, old;
- WT_STAT_FAST_CONN_INCR(session, rwlock_write);
+ WT_STAT_CONN_INCR(session, rwlock_write);
l = &rwlock->rwlock;
old = new = *l;
@@ -278,7 +278,7 @@ __wt_writelock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
uint16_t ticket;
int pause_cnt;
- WT_STAT_FAST_CONN_INCR(session, rwlock_write);
+ WT_STAT_CONN_INCR(session, rwlock_write);
l = &rwlock->rwlock;
diff --git a/src/support/stat.c b/src/support/stat.c
index 81859ef1ca8..7150223e6cb 100644
--- a/src/support/stat.c
+++ b/src/support/stat.c
@@ -559,12 +559,14 @@ static const char * const __stats_connection_desc[] = {
"cache: eviction calls to get a page found queue empty",
"cache: eviction calls to get a page found queue empty after locking",
"cache: eviction currently operating in aggressive mode",
+ "cache: eviction empty score",
"cache: eviction server candidate queue empty when topping up",
"cache: eviction server candidate queue not empty when topping up",
"cache: eviction server evicting pages",
"cache: eviction server slept, because we did not make progress with eviction",
"cache: eviction server unable to reach eviction goal",
"cache: eviction state",
+ "cache: eviction walks abandoned",
"cache: eviction worker thread evicting pages",
"cache: failed eviction of pages that exceeded the in-memory maximum",
"cache: files with active eviction walks",
@@ -801,12 +803,14 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
stats->cache_eviction_get_ref_empty = 0;
stats->cache_eviction_get_ref_empty2 = 0;
/* not clearing cache_eviction_aggressive_set */
+ /* not clearing cache_eviction_empty_score */
stats->cache_eviction_queue_empty = 0;
stats->cache_eviction_queue_not_empty = 0;
stats->cache_eviction_server_evicting = 0;
stats->cache_eviction_server_slept = 0;
stats->cache_eviction_slow = 0;
/* not clearing cache_eviction_state */
+ stats->cache_eviction_walks_abandoned = 0;
stats->cache_eviction_worker_evicting = 0;
stats->cache_eviction_force_fail = 0;
/* not clearing cache_eviction_walks_active */
@@ -1041,6 +1045,8 @@ __wt_stat_connection_aggregate(
WT_STAT_READ(from, cache_eviction_get_ref_empty2);
to->cache_eviction_aggressive_set +=
WT_STAT_READ(from, cache_eviction_aggressive_set);
+ to->cache_eviction_empty_score +=
+ WT_STAT_READ(from, cache_eviction_empty_score);
to->cache_eviction_queue_empty +=
WT_STAT_READ(from, cache_eviction_queue_empty);
to->cache_eviction_queue_not_empty +=
@@ -1051,6 +1057,8 @@ __wt_stat_connection_aggregate(
WT_STAT_READ(from, cache_eviction_server_slept);
to->cache_eviction_slow += WT_STAT_READ(from, cache_eviction_slow);
to->cache_eviction_state += WT_STAT_READ(from, cache_eviction_state);
+ to->cache_eviction_walks_abandoned +=
+ WT_STAT_READ(from, cache_eviction_walks_abandoned);
to->cache_eviction_worker_evicting +=
WT_STAT_READ(from, cache_eviction_worker_evicting);
to->cache_eviction_force_fail +=
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c
index 91cee92b862..180a06a3aed 100644
--- a/src/txn/txn_ckpt.c
+++ b/src/txn/txn_ckpt.c
@@ -306,7 +306,7 @@ __checkpoint_update_generation(WT_SESSION_IMPL *session)
WT_PUBLISH(btree->checkpoint_gen,
S2C(session)->txn_global.checkpoint_gen);
- WT_STAT_FAST_DATA_SET(session,
+ WT_STAT_DATA_SET(session,
btree_checkpoint_generation, btree->checkpoint_gen);
}
@@ -424,14 +424,14 @@ __checkpoint_reduce_dirty_cache(WT_SESSION_IMPL *session)
*/
__wt_sleep(0, 10 * stepdown_us);
cache->eviction_scrub_limit = current_dirty - delta;
- WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_target,
+ WT_STAT_CONN_SET(session, txn_checkpoint_scrub_target,
cache->eviction_scrub_limit);
WT_RET(__wt_epoch(session, &last));
}
WT_RET(__wt_epoch(session, &stop));
total_ms = WT_TIMEDIFF_MS(stop, start);
- WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_time, total_ms);
+ WT_STAT_CONN_SET(session, txn_checkpoint_scrub_time, total_ms);
return (0);
}
@@ -619,7 +619,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
* ignore the checkpoint's transaction.
*/
(void)__wt_atomic_addv64(&txn_global->checkpoint_gen, 1);
- WT_STAT_FAST_CONN_SET(session,
+ WT_STAT_CONN_SET(session,
txn_checkpoint_generation, txn_global->checkpoint_gen);
/* Keep track of handles acquired for locking. */
@@ -705,7 +705,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
* after this point are too new to be written in the checkpoint.
*/
cache->eviction_scrub_limit = 0.0;
- WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_target, 0);
+ WT_STAT_CONN_SET(session, txn_checkpoint_scrub_target, 0);
/*
* Mark old checkpoints that are being deleted and figure out which
@@ -749,8 +749,8 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
WT_ERR(__checkpoint_apply(session, cfg, __wt_checkpoint_sync));
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start);
- WT_STAT_FAST_CONN_INCR(session, txn_checkpoint_fsync_post);
- WT_STAT_FAST_CONN_SET(session,
+ WT_STAT_CONN_INCR(session, txn_checkpoint_fsync_post);
+ WT_STAT_CONN_SET(session,
txn_checkpoint_fsync_post_duration, fsync_duration_usecs);
WT_ERR(__checkpoint_verbose_track(session,
@@ -829,7 +829,7 @@ err: /*
WT_TRET(__wt_meta_track_off(session, false, ret != 0));
cache->eviction_scrub_limit = 0.0;
- WT_STAT_FAST_CONN_SET(session, txn_checkpoint_scrub_target, 0);
+ WT_STAT_CONN_SET(session, txn_checkpoint_scrub_target, 0);
if (F_ISSET(txn, WT_TXN_RUNNING)) {
/*
@@ -903,12 +903,12 @@ __wt_txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
* calls checkpoint directly, it can be tough to avoid. Serialize here
* to ensure we don't get into trouble.
*/
- WT_STAT_FAST_CONN_SET(session, txn_checkpoint_running, 1);
+ WT_STAT_CONN_SET(session, txn_checkpoint_running, 1);
WT_WITH_CHECKPOINT_LOCK(session, ret,
ret = __txn_checkpoint(session, cfg));
- WT_STAT_FAST_CONN_SET(session, txn_checkpoint_running, 0);
+ WT_STAT_CONN_SET(session, txn_checkpoint_running, 0);
F_CLR(session, WT_SESSION_CAN_WAIT | WT_SESSION_NO_EVICTION);
diff --git a/src/txn/txn_nsnap.c b/src/txn/txn_nsnap.c
index d0110d9edd8..8f7e93238de 100644
--- a/src/txn/txn_nsnap.c
+++ b/src/txn/txn_nsnap.c
@@ -47,7 +47,7 @@ __nsnap_drop_one(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *name)
TAILQ_NEXT(found, q)->snap_min : WT_TXN_NONE;
TAILQ_REMOVE(&txn_global->nsnaph, found, q);
__nsnap_destroy(session, found);
- WT_STAT_FAST_CONN_INCR(session, txn_snapshots_dropped);
+ WT_STAT_CONN_INCR(session, txn_snapshots_dropped);
return (ret);
}
@@ -112,7 +112,7 @@ __nsnap_drop_to(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *name, bool inclusive)
WT_ASSERT(session, nsnap != NULL);
TAILQ_REMOVE(&txn_global->nsnaph, nsnap, q);
__nsnap_destroy(session, nsnap);
- WT_STAT_FAST_CONN_INCR(session, txn_snapshots_dropped);
+ WT_STAT_CONN_INCR(session, txn_snapshots_dropped);
/* Last will be NULL in the all case so it will never match */
} while (nsnap != last && !TAILQ_EMPTY(&txn_global->nsnaph));
@@ -178,7 +178,7 @@ __wt_txn_named_snapshot_begin(WT_SESSION_IMPL *session, const char *cfg[])
if (TAILQ_EMPTY(&txn_global->nsnaph))
txn_global->nsnap_oldest_id = nsnap_new->snap_min;
TAILQ_INSERT_TAIL(&txn_global->nsnaph, nsnap_new, q);
- WT_STAT_FAST_CONN_INCR(session, txn_snapshots_created);
+ WT_STAT_CONN_INCR(session, txn_snapshots_created);
nsnap_new = NULL;
err: if (started_txn)
diff --git a/src/utilities/util_stat.c b/src/utilities/util_stat.c
index e511ca4f7e8..4376f559ceb 100644
--- a/src/utilities/util_stat.c
+++ b/src/utilities/util_stat.c
@@ -70,7 +70,6 @@ util_stat(WT_SESSION *session, int argc, char *argv[])
}
snprintf(uri, urilen, "statistics:%s", objname);
-
if ((ret =
session->open_cursor(session, uri, NULL, config, &cursor)) != 0) {
fprintf(stderr, "%s: cursor open(%s) failed: %s\n",
diff --git a/test/csuite/wt2246_col_append/main.c b/test/csuite/wt2246_col_append/main.c
index 69683707d16..b795816c76f 100644
--- a/test/csuite/wt2246_col_append/main.c
+++ b/test/csuite/wt2246_col_append/main.c
@@ -111,7 +111,7 @@ main(int argc, char *argv[])
testutil_check(testutil_parse_opts(argc, argv, opts));
testutil_make_work_dir(opts->home);
- snprintf(buf, sizeof(buf),
+ snprintf(buf, sizeof(buf),
"create,"
"cache_size=%s,"
"eviction=(threads_max=5),"
diff --git a/test/csuite/wt2695_checksum/main.c b/test/csuite/wt2695_checksum/main.c
index df6f562f719..afb9d0788bd 100644
--- a/test/csuite/wt2695_checksum/main.c
+++ b/test/csuite/wt2695_checksum/main.c
@@ -44,22 +44,27 @@ check(uint32_t hw, uint32_t sw, size_t len, const char *msg)
#define DATASIZE (128 * 1024)
int
-main(void)
+main(int argc, char *argv[])
{
+ TEST_OPTS *opts, _opts;
WT_RAND_STATE rnd;
size_t len;
uint32_t hw, sw;
u_int i, j;
uint8_t *data;
- /* Allocate aligned memory for the data. */
- data = dcalloc(DATASIZE, sizeof(uint8_t));
+ opts = &_opts;
+ memset(opts, 0, sizeof(*opts));
+ testutil_check(testutil_parse_opts(argc, argv, opts));
+ testutil_make_work_dir(opts->home);
+ testutil_check(
+ wiredtiger_open(opts->home, NULL, "create", &opts->conn));
/* Initialize the RNG. */
testutil_check(__wt_random_init_seed(NULL, &rnd));
- /* Initialize the WiredTiger library checksum functions. */
- __wt_checksum_init();
+ /* Allocate aligned memory for the data. */
+ data = dcalloc(DATASIZE, sizeof(uint8_t));
/*
* Some simple known checksums.
@@ -139,5 +144,6 @@ main(void)
}
free(data);
+ testutil_cleanup(opts);
return (EXIT_SUCCESS);
}
diff --git a/test/csuite/wt2719_reconfig/main.c b/test/csuite/wt2719_reconfig/main.c
index 4ec213c85ea..1ff7b10e1c6 100644
--- a/test/csuite/wt2719_reconfig/main.c
+++ b/test/csuite/wt2719_reconfig/main.c
@@ -130,7 +130,8 @@ static const char *list[] = {
",statistics=(\"all\")",
",statistics=(\"fast\")",
",statistics=(\"none\")",
- ",statistics=(\"clear\")",
+ ",statistics=(\"all\",\"clear\")",
+ ",statistics=(\"fast\",\"clear\")",
",statistics_log=(json=0)",
",statistics_log=(json=1)",
diff --git a/test/format/config.c b/test/format/config.c
index 1b09916bd88..542adf33da2 100644
--- a/test/format/config.c
+++ b/test/format/config.c
@@ -796,7 +796,7 @@ config_find(const char *s, size_t len)
{
CONFIG *cp;
- for (cp = c; cp->name != NULL; ++cp)
+ for (cp = c; cp->name != NULL; ++cp)
if (strncmp(s, cp->name, len) == 0 && cp->name[len] == '\0')
return (cp);
diff --git a/test/format/config.h b/test/format/config.h
index 6e3f5473479..725bc7c5d97 100644
--- a/test/format/config.h
+++ b/test/format/config.h
@@ -37,7 +37,7 @@ typedef struct {
/* Value is a boolean, yes if roll of 1-to-100 is <= CONFIG->min. */
#define C_BOOL 0x001
- /* Not a simple randomization, handle outside the main loop. */
+ /* Not a simple randomization, handle outside the main loop. */
#define C_IGNORE 0x002
/* Value was set from command-line or file, ignore for all runs. */
diff --git a/test/format/format.h b/test/format/format.h
index 047be552308..363dcf9eea8 100644
--- a/test/format/format.h
+++ b/test/format/format.h
@@ -202,7 +202,7 @@ typedef struct {
uint32_t c_verify;
uint32_t c_write_pct;
-#define FIX 1
+#define FIX 1
#define ROW 2
#define VAR 3
u_int type; /* File type's flag value */
diff --git a/test/format/rebalance.c b/test/format/rebalance.c
index 5fd86ef3317..9849b7df82b 100644
--- a/test/format/rebalance.c
+++ b/test/format/rebalance.c
@@ -73,12 +73,14 @@ wts_rebalance(void)
testutil_checkfmt(system(cmd), "command failed: %s", cmd);
/* Compare the old/new versions of the object. */
- (void)snprintf(cmd, sizeof(cmd),
#ifdef _WIN32
+ (void)snprintf(cmd, sizeof(cmd),
"fc /b %s\\rebalance.orig %s\\rebalance.new > NUL",
+ g.home, g.home);
#else
+ (void)snprintf(cmd, sizeof(cmd),
"cmp %s/rebalance.orig %s/rebalance.new > /dev/null",
-#endif
g.home, g.home);
+#endif
testutil_checkfmt(system(cmd), "command failed: %s", cmd);
}
diff --git a/test/readonly/readonly.c b/test/readonly/readonly.c
index 31edc0d2a24..7a131912c31 100644
--- a/test/readonly/readonly.c
+++ b/test/readonly/readonly.c
@@ -276,18 +276,21 @@ main(int argc, char *argv[])
(void)snprintf(cmd, sizeof(cmd),
"cp -rp %s/* %s; rm -f %s/WiredTiger.lock",
home, home_wr, home_wr);
- (void)system(cmd);
+ if ((status = system(cmd)) < 0)
+ testutil_die(status, "system: %s", cmd);
(void)snprintf(cmd, sizeof(cmd),
"cp -rp %s/* %s; chmod 0555 %s; chmod -R 0444 %s/*",
home, home_rd, home_rd, home_rd);
- (void)system(cmd);
+ if ((status = system(cmd)) < 0)
+ testutil_die(status, "system: %s", cmd);
(void)snprintf(cmd, sizeof(cmd),
"cp -rp %s/* %s; rm -f %s/WiredTiger.lock; "
"chmod 0555 %s; chmod -R 0444 %s/*",
home, home_rd2, home_rd2, home_rd2, home_rd2);
- (void)system(cmd);
+ if ((status = system(cmd)) < 0)
+ testutil_die(status, "system: %s", cmd);
/*
* Run four scenarios. Sometimes expect errors, sometimes success.
@@ -326,16 +329,15 @@ main(int argc, char *argv[])
* same memory image. Therefore the WT process structure is set in
* the child even though it should not be. So use 'system' to spawn
* an entirely new process.
+ *
+ * The child will exit with success if its test passes.
*/
(void)snprintf(
cmd, sizeof(cmd), "%s -h %s -R", saved_argv0, working_dir);
if ((status = system(cmd)) < 0)
- testutil_die(status, "system");
- /*
- * The child will exit with success if its test passes.
- */
+ testutil_die(status, "system: %s", cmd);
if (WEXITSTATUS(status) != 0)
- testutil_die(WEXITSTATUS(status), "system");
+ testutil_die(WEXITSTATUS(status), "system: %s", cmd);
/*
* Scenario 2. Run child with writable config.
@@ -343,10 +345,9 @@ main(int argc, char *argv[])
(void)snprintf(
cmd, sizeof(cmd), "%s -h %s -W", saved_argv0, working_dir);
if ((status = system(cmd)) < 0)
- testutil_die(status, "system");
-
+ testutil_die(status, "system: %s", cmd);
if (WEXITSTATUS(status) != 0)
- testutil_die(WEXITSTATUS(status), "system");
+ testutil_die(WEXITSTATUS(status), "system: %s", cmd);
/*
* Reopen the two writable directories and rerun the child.
@@ -365,9 +366,9 @@ main(int argc, char *argv[])
(void)snprintf(
cmd, sizeof(cmd), "%s -h %s -R", saved_argv0, working_dir);
if ((status = system(cmd)) < 0)
- testutil_die(status, "system");
+ testutil_die(status, "system: %s", cmd);
if (WEXITSTATUS(status) != 0)
- testutil_die(WEXITSTATUS(status), "system");
+ testutil_die(WEXITSTATUS(status), "system: %s", cmd);
/*
* Scenario 4. Run child with writable config.
@@ -375,9 +376,9 @@ main(int argc, char *argv[])
(void)snprintf(
cmd, sizeof(cmd), "%s -h %s -W", saved_argv0, working_dir);
if ((status = system(cmd)) < 0)
- testutil_die(status, "system");
+ testutil_die(status, "system: %s", cmd);
if (WEXITSTATUS(status) != 0)
- testutil_die(WEXITSTATUS(status), "system");
+ testutil_die(WEXITSTATUS(status), "system: %s", cmd);
/*
* Clean-up.
@@ -395,10 +396,12 @@ main(int argc, char *argv[])
* be removed by scripts.
*/
(void)snprintf(cmd, sizeof(cmd), "chmod 0777 %s %s", home_rd, home_rd2);
- (void)system(cmd);
+ if ((status = system(cmd)) < 0)
+ testutil_die(status, "system: %s", cmd);
(void)snprintf(cmd, sizeof(cmd), "chmod -R 0666 %s/* %s/*",
home_rd, home_rd2);
- (void)system(cmd);
+ if ((status = system(cmd)) < 0)
+ testutil_die(status, "system: %s", cmd);
printf(" *** Readonly test successful ***\n");
return (EXIT_SUCCESS);
}
diff --git a/test/suite/run.py b/test/suite/run.py
index c37093a2a55..ba6d9f78503 100644
--- a/test/suite/run.py
+++ b/test/suite/run.py
@@ -82,6 +82,8 @@ Options:\n\
-D dir | --dir dir use dir rather than WT_TEST.\n\
dir is removed/recreated as a first step.\n\
-d | --debug run with \'pdb\', the python debugger\n\
+ -n | --dry-run perform a dry-run, listing all scenarios to\n\
+ be run without executing any.\n\
-g | --gdb all subprocesses (like calls to wt) use gdb\n\
-h | --help show this message\n\
-j N | --parallel N run all tests in parallel using N processes\n\
@@ -236,7 +238,7 @@ if __name__ == '__main__':
tests = unittest.TestSuite()
# Turn numbers and ranges into test module names
- preserve = timestamp = debug = gdbSub = longtest = False
+ preserve = timestamp = debug = dryRun = gdbSub = longtest = False
parallel = 0
configfile = None
configwrite = False
@@ -261,6 +263,9 @@ if __name__ == '__main__':
if option == '-debug' or option == 'd':
debug = True
continue
+ if option == '-dry-run' or option == 'n':
+ dryRun = True
+ continue
if option == '-gdb' or option == 'g':
gdbSub = True
continue
@@ -341,6 +346,15 @@ if __name__ == '__main__':
if debug:
import pdb
pdb.set_trace()
+ if dryRun:
+ # We have to de-dupe here as some scenarios overlap in the same suite
+ dryOutput = set()
+ for test in tests:
+ dryOutput.add(test.shortDesc())
+ for line in dryOutput:
+ print line
+ else:
+ result = wttest.runsuite(tests, parallel)
+ sys.exit(0 if result.wasSuccessful() else 1)
- result = wttest.runsuite(tests, parallel)
- sys.exit(0 if result.wasSuccessful() else 1)
+ sys.exit(0)
diff --git a/test/suite/test_async01.py b/test/suite/test_async01.py
index 9322748c30f..cbb3dad8de6 100644
--- a/test/suite/test_async01.py
+++ b/test/suite/test_async01.py
@@ -107,7 +107,6 @@ class Callback(wiredtiger.AsyncCallback):
return 0
-
# test_async01.py
# Async operations
# Basic smoke-test of file and table async ops: tests get/set key, insert
@@ -261,6 +260,5 @@ class test_async01(wttest.WiredTigerTestCase, suite_subprocess):
self.assertTrue(callback.nupdate == self.nentries)
self.assertTrue(callback.nerror == 0)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_async02.py b/test/suite/test_async02.py
index bc6b389fc27..50652da6dfd 100644
--- a/test/suite/test_async02.py
+++ b/test/suite/test_async02.py
@@ -104,7 +104,6 @@ class Callback(wiredtiger.AsyncCallback):
return 0
-
# test_async02.py
# Async operations
# Basic smoke-test of file and table async ops: tests get/set key, insert
@@ -219,6 +218,5 @@ class test_async02(wttest.WiredTigerTestCase, suite_subprocess):
# Make sure all callbacks went according to plan.
self.assertTrue(callback.nerror == 0)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_async03.py b/test/suite/test_async03.py
index 41939bb578a..98851885f70 100644
--- a/test/suite/test_async03.py
+++ b/test/suite/test_async03.py
@@ -36,7 +36,6 @@ class Callback(wiredtiger.AsyncCallback):
def notify(self, op, op_ret, flags):
raise AssertionError('callback should not be called in this test')
-
# test_async03.py
# Async operations
# Try to run async code with an incorrect connection config.
diff --git a/test/suite/test_backup03.py b/test/suite/test_backup03.py
index 053009c6edb..ba7ce60f519 100644
--- a/test/suite/test_backup03.py
+++ b/test/suite/test_backup03.py
@@ -149,6 +149,5 @@ class test_backup_target(wttest.WiredTigerTestCase, suite_subprocess):
self.populate()
self.backup_table_cursor(self.list)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_backup04.py b/test/suite/test_backup04.py
index 866e673dccb..dd4dbc1d60f 100644
--- a/test/suite/test_backup04.py
+++ b/test/suite/test_backup04.py
@@ -171,6 +171,5 @@ class test_backup_target(wttest.WiredTigerTestCase, suite_subprocess):
self.compare(self.uri, full_dir, self.dir)
self.compare(self.uri, None, self.dir)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_backup05.py b/test/suite/test_backup05.py
index 131732e9a89..4ecb782a0d5 100644
--- a/test/suite/test_backup05.py
+++ b/test/suite/test_backup05.py
@@ -80,7 +80,6 @@ class test_backup05(wttest.WiredTigerTestCase, suite_subprocess):
self.session.drop(self.emptyuri, None)
self.session.create(self.emptyuri, self.create_params)
-
# Open the new directory and verify
conn = self.setUpConnectionOpen(newdir)
session = self.setUpSessionOpen(conn)
diff --git a/test/suite/test_bug001.py b/test/suite/test_bug001.py
index 79ade05d2c7..4c4a722285c 100644
--- a/test/suite/test_bug001.py
+++ b/test/suite/test_bug001.py
@@ -100,7 +100,6 @@ class test_bug001(wttest.WiredTigerTestCase):
self.assertEquals(cursor.close(), 0)
self.session.drop(uri)
-
# Test a bug where cursor remove inside implicit records looped infinitely.
def test_implicit_record_cursor_remove(self):
uri='file:xxx'
@@ -149,6 +148,5 @@ class test_bug001(wttest.WiredTigerTestCase):
self.assertEquals(cursor.close(), 0)
self.session.drop(uri)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bug003.py b/test/suite/test_bug003.py
index 28d71a534e2..73d9cd13ab9 100644
--- a/test/suite/test_bug003.py
+++ b/test/suite/test_bug003.py
@@ -54,6 +54,5 @@ class test_bug003(wttest.WiredTigerTestCase):
self.session.checkpoint()
cursor = self.session.open_cursor(self.uri, None, "bulk")
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bug004.py b/test/suite/test_bug004.py
index a8b9a0a0dde..316d15d8080 100644
--- a/test/suite/test_bug004.py
+++ b/test/suite/test_bug004.py
@@ -90,6 +90,5 @@ class test_bug004(wttest.WiredTigerTestCase):
self.assertEquals(
c1.get_value(), value_populate(c1, i) + 'abcdef' * 100)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bug005.py b/test/suite/test_bug005.py
index 6e888c3b00b..6437b329096 100644
--- a/test/suite/test_bug005.py
+++ b/test/suite/test_bug005.py
@@ -59,6 +59,5 @@ class test_bug005(wttest.WiredTigerTestCase):
# Verify the object again.
self.session.verify(self.uri)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bug006.py b/test/suite/test_bug006.py
index 314ba57038f..e01333f59de 100644
--- a/test/suite/test_bug006.py
+++ b/test/suite/test_bug006.py
@@ -74,6 +74,5 @@ class test_bug006(wttest.WiredTigerTestCase):
self.session.drop(uri, None)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bug007.py b/test/suite/test_bug007.py
index 1add6512df3..16cb5da903c 100644
--- a/test/suite/test_bug007.py
+++ b/test/suite/test_bug007.py
@@ -56,6 +56,5 @@ class test_bug007(wttest.WiredTigerTestCase):
# Forced salvage should succeed.
self.session.salvage(uri, "force")
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bug008.py b/test/suite/test_bug008.py
index c4fa411f55e..8e787ae14d1 100644
--- a/test/suite/test_bug008.py
+++ b/test/suite/test_bug008.py
@@ -297,6 +297,5 @@ class test_bug008(wttest.WiredTigerTestCase):
self.assertEqual(cursor.get_key(), key_populate(cursor, 119))
self.assertEqual(cursor.get_value(), value_populate(cursor, 119))
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bug016.py b/test/suite/test_bug016.py
index f7cb3c32559..4b8867e1e93 100644
--- a/test/suite/test_bug016.py
+++ b/test/suite/test_bug016.py
@@ -104,6 +104,5 @@ class test_bug016(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: cursor.get_key(), "/requires key be set/")
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bulk01.py b/test/suite/test_bulk01.py
index 5bacfafaa20..addebe80647 100644
--- a/test/suite/test_bulk01.py
+++ b/test/suite/test_bulk01.py
@@ -214,6 +214,5 @@ class test_bulk_load(wttest.WiredTigerTestCase):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: self.session.open_cursor(uri, None, "bulk"))
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_bulk02.py b/test/suite/test_bulk02.py
index af0b6d4485d..c959098179c 100644
--- a/test/suite/test_bulk02.py
+++ b/test/suite/test_bulk02.py
@@ -126,6 +126,5 @@ class test_bulkload_backup(wttest.WiredTigerTestCase, suite_subprocess):
else:
self.check_backup(self.conn.open_session())
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_checkpoint01.py b/test/suite/test_checkpoint01.py
index 78754dc82fa..013cda96e4e 100644
--- a/test/suite/test_checkpoint01.py
+++ b/test/suite/test_checkpoint01.py
@@ -136,7 +136,6 @@ class test_checkpoint(wttest.WiredTigerTestCase):
(self.checkpoints[checkpoint_name][0], 0)
self.check()
-
# Check some specific cursor checkpoint combinations.
class test_checkpoint_cursor(wttest.WiredTigerTestCase):
scenarios = make_scenarios([
@@ -202,7 +201,6 @@ class test_checkpoint_cursor(wttest.WiredTigerTestCase):
self.session.checkpoint("drop=(checkpoint-2)")
self.session.checkpoint("drop=(from=all)")
-
# Check that you can checkpoint targets.
class test_checkpoint_target(wttest.WiredTigerTestCase):
scenarios = make_scenarios([
@@ -249,7 +247,6 @@ class test_checkpoint_target(wttest.WiredTigerTestCase):
self.check(self.uri + '2', 'UPDATE')
self.check(self.uri + '3', 'ORIGINAL')
-
# Check that you can't write checkpoint cursors.
class test_checkpoint_cursor_update(wttest.WiredTigerTestCase):
scenarios = make_scenarios([
@@ -274,7 +271,6 @@ class test_checkpoint_cursor_update(wttest.WiredTigerTestCase):
lambda: cursor.update(), msg)
cursor.close()
-
# Check that WiredTigerCheckpoint works as a checkpoint specifier.
class test_checkpoint_last(wttest.WiredTigerTestCase):
scenarios = make_scenarios([
@@ -306,7 +302,6 @@ class test_checkpoint_last(wttest.WiredTigerTestCase):
# Don't close the checkpoint cursor, we want it to remain open until
# the test completes.
-
# Check we can't use the reserved name as an application checkpoint name.
class test_checkpoint_illegal_name(wttest.WiredTigerTestCase):
def test_checkpoint_illegal_name(self):
@@ -331,7 +326,6 @@ class test_checkpoint_illegal_name(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.session.checkpoint(conf), msg)
-
# Check we can't name checkpoints that include LSM tables.
class test_checkpoint_lsm_name(wttest.WiredTigerTestCase):
def test_checkpoint_lsm_name(self):
@@ -341,7 +335,6 @@ class test_checkpoint_lsm_name(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.session.checkpoint("name=ckpt"), msg)
-
class test_checkpoint_empty(wttest.WiredTigerTestCase):
scenarios = make_scenarios([
('file', dict(uri='file:checkpoint')),
@@ -417,6 +410,5 @@ class test_checkpoint_empty(wttest.WiredTigerTestCase):
self.uri, None, "checkpoint=WiredTigerCheckpoint")
self.assertEquals(cursor.next(), wiredtiger.WT_NOTFOUND)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_checkpoint02.py b/test/suite/test_checkpoint02.py
index ac57499a9e4..0d166544472 100644
--- a/test/suite/test_checkpoint02.py
+++ b/test/suite/test_checkpoint02.py
@@ -84,6 +84,5 @@ class test_checkpoint02(wttest.WiredTigerTestCase):
self.assertEqual(i, self.nops)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_colgap.py b/test/suite/test_colgap.py
index 5cc363dbd4a..dbe748ae58f 100644
--- a/test/suite/test_colgap.py
+++ b/test/suite/test_colgap.py
@@ -119,7 +119,6 @@ class test_column_store_gap(wttest.WiredTigerTestCase):
self.forward(cursor, v)
self.backward(cursor, list(reversed(v)))
-
# Basic testing of variable-length column-store with big records.
class test_colmax(wttest.WiredTigerTestCase):
name = 'test_colmax'
@@ -204,6 +203,5 @@ class test_colmax(wttest.WiredTigerTestCase):
cursor.set_key(key_populate(cursor, recno))
self.assertEqual(cursor.search(), wiredtiger.WT_NOTFOUND)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_collator.py b/test/suite/test_collator.py
index a8103fb3671..3fae4ff47cb 100644
--- a/test/suite/test_collator.py
+++ b/test/suite/test_collator.py
@@ -155,6 +155,5 @@ class test_collator(wttest.WiredTigerTestCase):
self.create_indices()
self.check_entries()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_compact01.py b/test/suite/test_compact01.py
index 183d75f9d31..861e957d18d 100644
--- a/test/suite/test_compact01.py
+++ b/test/suite/test_compact01.py
@@ -100,6 +100,5 @@ class test_compact(wttest.WiredTigerTestCase, suite_subprocess):
self.assertLess(stat_cursor[stat.dsrc.btree_row_leaf][2], self.maxpages)
stat_cursor.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_compact02.py b/test/suite/test_compact02.py
index eb21817bd90..fe31aa1cbe1 100644
--- a/test/suite/test_compact02.py
+++ b/test/suite/test_compact02.py
@@ -147,6 +147,5 @@ class test_compact02(wttest.WiredTigerTestCase):
# After compact, the file size should be less than half the full size.
self.assertLess(sz, self.fullsize / 2)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_compress01.py b/test/suite/test_compress01.py
index 2a7e2a7e1a8..606f7b63235 100644
--- a/test/suite/test_compress01.py
+++ b/test/suite/test_compress01.py
@@ -101,6 +101,5 @@ class test_compress01(wttest.WiredTigerTestCase):
self.assertEquals(cursor.get_value(), `idx` + "abcdefg")
cursor.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_config06.py b/test/suite/test_config06.py
index d426bfe2de9..55619e8774c 100644
--- a/test/suite/test_config06.py
+++ b/test/suite/test_config06.py
@@ -88,6 +88,5 @@ class test_config06(wttest.WiredTigerTestCase):
cursor[k] = v
self.assertEquals(cursor[k[:1]], v[:1])
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_cursor02.py b/test/suite/test_cursor02.py
index a83d30def47..0771a275cd2 100644
--- a/test/suite/test_cursor02.py
+++ b/test/suite/test_cursor02.py
@@ -150,6 +150,5 @@ class test_cursor02(TestCursorTracker):
self.cur_check_forward(cursor, -1)
cursor.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_cursor_compare.py b/test/suite/test_cursor_compare.py
index 179e20682d2..4610a2f30a9 100644
--- a/test/suite/test_cursor_compare.py
+++ b/test/suite/test_cursor_compare.py
@@ -241,6 +241,5 @@ class test_cursor_comparison(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(
wiredtiger.WiredTigerError, lambda: cX.equals(c1), msg)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_cursor_pin.py b/test/suite/test_cursor_pin.py
index 1aea49c32b0..b6119a93897 100644
--- a/test/suite/test_cursor_pin.py
+++ b/test/suite/test_cursor_pin.py
@@ -114,6 +114,5 @@ class test_cursor_pin(wttest.WiredTigerTestCase):
list(range(self.nentries + 1, self.nentries + 1000) +\
range(self.nentries + 2001, self.nentries + 3000)))
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_cursor_random.py b/test/suite/test_cursor_random.py
index 8d7c230043b..205b9c3c9c5 100644
--- a/test/suite/test_cursor_random.py
+++ b/test/suite/test_cursor_random.py
@@ -147,7 +147,6 @@ class test_cursor_random_column(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda:
self.session.open_cursor(self.uri, None, "next_random=true"), msg)
-
# Check next_random works in the presence a set of updates, some or all of
# which are invisible to the cursor.
class test_cursor_random_invisible(wttest.WiredTigerTestCase):
@@ -217,6 +216,5 @@ class test_cursor_random_invisible(wttest.WiredTigerTestCase):
self.assertEquals(cursor.next(), 0)
self.assertEqual(cursor.get_key(), key_populate(cursor, 99))
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_encrypt01.py b/test/suite/test_encrypt01.py
index d48605aaa83..d314cbeadfd 100644
--- a/test/suite/test_encrypt01.py
+++ b/test/suite/test_encrypt01.py
@@ -138,6 +138,5 @@ class test_encrypt01(wttest.WiredTigerTestCase):
self.assertEquals(cursor.get_value(), val)
cursor.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_encrypt03.py b/test/suite/test_encrypt03.py
index 0dc1755d6eb..cf459190637 100644
--- a/test/suite/test_encrypt03.py
+++ b/test/suite/test_encrypt03.py
@@ -97,6 +97,5 @@ class test_encrypt03(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda:
self.session.create(self.uri, params), msg)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_encrypt04.py b/test/suite/test_encrypt04.py
index 97d2cee03a0..a244cf97961 100644
--- a/test/suite/test_encrypt04.py
+++ b/test/suite/test_encrypt04.py
@@ -230,6 +230,5 @@ class test_encrypt04(wttest.WiredTigerTestCase, suite_subprocess):
cursor.close()
self.assertEqual(self.expect_forceerror, self.got_forceerror)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_encrypt06.py b/test/suite/test_encrypt06.py
index 9300583d099..893c4ba3095 100644
--- a/test/suite/test_encrypt06.py
+++ b/test/suite/test_encrypt06.py
@@ -128,7 +128,6 @@ class test_encrypt06(wttest.WiredTigerTestCase):
else:
return ',encryption=(name=' + name + args + ')'
-
def match_string_in_file(self, fname, match):
with open(fname, 'rb') as f:
return (f.read().find(match) != -1)
@@ -223,6 +222,5 @@ class test_encrypt06(wttest.WiredTigerTestCase):
self.assertEqual(self.expected_encryption(self.encrypt1),
not self.match_string_in_rundir(txt1))
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_excl.py b/test/suite/test_excl.py
index cea5756dfbb..f8628d96ff7 100644
--- a/test/suite/test_excl.py
+++ b/test/suite/test_excl.py
@@ -44,6 +44,5 @@ class test_create_excl(wttest.WiredTigerTestCase):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: self.session.create(uri, "exclusive"))
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_home.py b/test/suite/test_home.py
index 2cdcf2429af..48bf10d7618 100644
--- a/test/suite/test_home.py
+++ b/test/suite/test_home.py
@@ -43,7 +43,6 @@ class test_isnew(wttest.WiredTigerTestCase):
self.conn = self.setUpConnectionOpen(".")
self.assertEquals(self.conn.is_new(), False)
-
# test_gethome
# database get-home method
class test_gethome(wttest.WiredTigerTestCase):
@@ -60,7 +59,6 @@ class test_gethome(wttest.WiredTigerTestCase):
self.conn = self.setUpConnectionOpen(name)
self.assertEquals(self.conn.get_home(), name)
-
# test_base_config
# test base configuration file config.
class test_base_config(wttest.WiredTigerTestCase):
@@ -74,6 +72,5 @@ class test_base_config(wttest.WiredTigerTestCase):
self.assertFalse(os.path.exists("A/WiredTiger.basecfg"))
conn.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_huffman01.py b/test/suite/test_huffman01.py
index be307550f2e..8a880f7bae7 100644
--- a/test/suite/test_huffman01.py
+++ b/test/suite/test_huffman01.py
@@ -72,7 +72,6 @@ class test_huffman01(wttest.WiredTigerTestCase, suite_subprocess):
config=self.huffkey + self.huffval
self.session.create(self.table_name, config)
-
# Test Huffman encoding ranges.
class test_huffman_range(wttest.WiredTigerTestCase):
table_name = 'table:test_huff'
@@ -123,6 +122,5 @@ class test_huffman_range(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.session.create(self.table_name, config), msg)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_join03.py b/test/suite/test_join03.py
index af19d934d70..edab7146a6b 100644
--- a/test/suite/test_join03.py
+++ b/test/suite/test_join03.py
@@ -152,6 +152,5 @@ class test_join03(wttest.WiredTigerTestCase):
for csvformat in [ 'SS', 'ii', 'Si', 'iS' ]:
self.join(csvformat, '', extraargs)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_join04.py b/test/suite/test_join04.py
index b270cb7a21c..a71418d9f05 100644
--- a/test/suite/test_join04.py
+++ b/test/suite/test_join04.py
@@ -163,6 +163,5 @@ class test_join04(wttest.WiredTigerTestCase):
for c in cursors:
c.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_join08.py b/test/suite/test_join08.py
index d389fad706b..d344653717b 100644
--- a/test/suite/test_join08.py
+++ b/test/suite/test_join08.py
@@ -259,6 +259,5 @@ class test_join08(wttest.WiredTigerTestCase):
jcursor.close()
cursor.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_jsondump02.py b/test/suite/test_jsondump02.py
index 50931f0f5e6..8482851fb94 100644
--- a/test/suite/test_jsondump02.py
+++ b/test/suite/test_jsondump02.py
@@ -398,6 +398,5 @@ class test_jsondump02(wttest.WiredTigerTestCase, suite_subprocess):
self.session.drop(self.table_uri5)
self.session.drop(self.table_uri6)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_metadata_cursor01.py b/test/suite/test_metadata_cursor01.py
index 7802f89f174..284e26bc936 100644
--- a/test/suite/test_metadata_cursor01.py
+++ b/test/suite/test_metadata_cursor01.py
@@ -83,7 +83,6 @@ class test_metadata_cursor01(wttest.WiredTigerTestCase):
self.session_create(tablearg, create_args)
self.pr('creating cursor')
-
# Forward iteration.
def test_forward_iter(self):
self.create_table()
diff --git a/test/suite/test_overwrite.py b/test/suite/test_overwrite.py
index 4972a016bec..b7af1612243 100644
--- a/test/suite/test_overwrite.py
+++ b/test/suite/test_overwrite.py
@@ -135,6 +135,5 @@ class test_overwrite(wttest.WiredTigerTestCase):
cursor.set_value('XXXXXXXXXX')
self.assertEquals(cursor.update(), 0)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_readonly03.py b/test/suite/test_readonly03.py
index d9930e8f553..a5607fcfe80 100644
--- a/test/suite/test_readonly03.py
+++ b/test/suite/test_readonly03.py
@@ -57,7 +57,6 @@ class test_readonly03(wttest.WiredTigerTestCase, suite_subprocess):
self.create = False
return conn
-
def test_readonly(self):
create_params = 'key_format=i,value_format=i'
entries = 10
diff --git a/test/suite/test_rebalance.py b/test/suite/test_rebalance.py
index 98bd81de602..acb73d82a13 100644
--- a/test/suite/test_rebalance.py
+++ b/test/suite/test_rebalance.py
@@ -76,6 +76,5 @@ class test_rebalance(wttest.WiredTigerTestCase):
self.rebalance(complex_populate, False)
self.rebalance(complex_populate, True)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_schema02.py b/test/suite/test_schema02.py
index bccc7dfc728..ffe710b7d3e 100644
--- a/test/suite/test_schema02.py
+++ b/test/suite/test_schema02.py
@@ -279,6 +279,5 @@ class test_schema02(wttest.WiredTigerTestCase):
self.populate()
self.check_entries()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_schema03.py b/test/suite/test_schema03.py
index 81556393e78..e5a6528914a 100644
--- a/test/suite/test_schema03.py
+++ b/test/suite/test_schema03.py
@@ -151,7 +151,6 @@ class tabconfig:
idx.formats += self.valueformats[colno - self.nkeys]
prob *= 0.5
-
class cgconfig:
"""
Configuration for a column group used in the test.
diff --git a/test/suite/test_schema04.py b/test/suite/test_schema04.py
index 8ac81690819..63c638b916c 100644
--- a/test/suite/test_schema04.py
+++ b/test/suite/test_schema04.py
@@ -122,6 +122,5 @@ class test_schema04(wttest.WiredTigerTestCase):
self.create_indices()
self.check_entries()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_schema05.py b/test/suite/test_schema05.py
index 89484cfc7bd..28ad51b3c92 100644
--- a/test/suite/test_schema05.py
+++ b/test/suite/test_schema05.py
@@ -169,6 +169,5 @@ class test_schema05(wttest.WiredTigerTestCase):
self.create_indices()
self.check_entries()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_stat02.py b/test/suite/test_stat02.py
index ef3907e54b1..3d2a83d1c3c 100644
--- a/test/suite/test_stat02.py
+++ b/test/suite/test_stat02.py
@@ -78,7 +78,6 @@ class test_stat_cursor_config(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda:
self.session.open_cursor('statistics:', None, config), msg)
-
# Test the connection "clear" configuration.
class test_stat_cursor_conn_clear(wttest.WiredTigerTestCase):
pfx = 'test_stat_cursor_conn_clear'
@@ -99,7 +98,6 @@ class test_stat_cursor_conn_clear(wttest.WiredTigerTestCase):
self.assertGreater(cursor[stat.conn.cache_bytes_dirty][2], 0)
self.assertEqual(cursor[stat.conn.cursor_insert][2], 0)
-
# Test the data-source "clear" configuration.
class test_stat_cursor_dsrc_clear(wttest.WiredTigerTestCase):
pfx = 'test_stat_cursor_dsrc_clear'
@@ -129,7 +127,6 @@ class test_stat_cursor_dsrc_clear(wttest.WiredTigerTestCase):
'statistics:' + self.uri, None, 'statistics=(all,clear)')
self.assertEqual(cursor[stat.dsrc.cursor_insert][2], 0)
-
# Test the "fast" configuration.
class test_stat_cursor_fast(wttest.WiredTigerTestCase):
pfx = 'test_stat_cursor_fast'
@@ -157,7 +154,6 @@ class test_stat_cursor_fast(wttest.WiredTigerTestCase):
'statistics:' + self.uri, None, 'statistics=(all)')
self.assertGreater(cursor[stat.dsrc.btree_entries][2], 0)
-
# Test connection error combinations.
class test_stat_cursor_conn_error(wttest.WiredTigerTestCase):
def setUpConnectionOpen(self, dir):
@@ -173,7 +169,6 @@ class test_stat_cursor_conn_error(wttest.WiredTigerTestCase):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.wiredtiger_open('.', config), msg)
-
# Test data-source error combinations.
class test_stat_cursor_dsrc_error(wttest.WiredTigerTestCase):
pfx = 'test_stat_cursor_dsrc_error'
@@ -198,6 +193,5 @@ class test_stat_cursor_dsrc_error(wttest.WiredTigerTestCase):
lambda: self.session.open_cursor(
'statistics:' + self.uri, None, config), msg)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_stat03.py b/test/suite/test_stat03.py
index b17fe6eb91c..1570ac4c9d8 100644
--- a/test/suite/test_stat03.py
+++ b/test/suite/test_stat03.py
@@ -99,6 +99,5 @@ class test_stat_cursor_reset(wttest.WiredTigerTestCase):
self.assertEqual(statc[stat.dsrc.btree_entries][2], n)
statc.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_truncate01.py b/test/suite/test_truncate01.py
index 9a3518c6984..37cd1f12c79 100644
--- a/test/suite/test_truncate01.py
+++ b/test/suite/test_truncate01.py
@@ -76,7 +76,6 @@ class test_truncate_arguments(wttest.WiredTigerTestCase):
c1.close()
c2.close()
-
# Test truncation of an object using its URI.
class test_truncate_uri(wttest.WiredTigerTestCase):
name = 'test_truncate'
@@ -101,7 +100,6 @@ class test_truncate_uri(wttest.WiredTigerTestCase):
confirm_empty(self, uri)
self.session.drop(uri, None)
-
# Test truncation of cursors in an illegal order.
class test_truncate_cursor_order(wttest.WiredTigerTestCase):
name = 'test_truncate'
@@ -132,7 +130,6 @@ class test_truncate_cursor_order(wttest.WiredTigerTestCase):
c2.set_key(key_populate(c2, 20))
self.session.truncate(None, c1, c2, None)
-
# Test truncation of cursors past the end of the object.
class test_truncate_cursor_end(wttest.WiredTigerTestCase):
name = 'test_truncate'
@@ -174,7 +171,6 @@ class test_truncate_cursor_end(wttest.WiredTigerTestCase):
self.assertEquals(c2.close(), 0)
self.session.drop(uri)
-
# Test session.truncate.
class test_truncate_cursor(wttest.WiredTigerTestCase):
name = 'test_truncate'
@@ -447,6 +443,5 @@ class test_truncate_cursor(wttest.WiredTigerTestCase):
self.truncateRangeAndCheck(uri, begin, end, expected)
self.session.drop(uri, None)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_truncate02.py b/test/suite/test_truncate02.py
index e57a65d2f97..7184cd67242 100644
--- a/test/suite/test_truncate02.py
+++ b/test/suite/test_truncate02.py
@@ -204,6 +204,5 @@ class test_truncate_fast_delete(wttest.WiredTigerTestCase):
self.cursor_count(cursor, self.nentries)
cursor.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_truncate03.py b/test/suite/test_truncate03.py
index e2db355f0ef..49044ac5690 100644
--- a/test/suite/test_truncate03.py
+++ b/test/suite/test_truncate03.py
@@ -135,6 +135,5 @@ class test_truncate_address_deleted(wttest.WiredTigerTestCase):
self.assertEqual(cursor.get_value(), v)
self.assertEqual(cursor.close(), 0)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_txn01.py b/test/suite/test_txn01.py
index 1ba74461088..d4ca2ac8d12 100644
--- a/test/suite/test_txn01.py
+++ b/test/suite/test_txn01.py
@@ -131,7 +131,6 @@ class test_txn01(wttest.WiredTigerTestCase):
self.session.commit_transaction()
self.check(cursor, self.nentries, self.nentries)
-
# Test that read-committed is the default isolation level.
class test_read_committed_default(wttest.WiredTigerTestCase):
uri = 'table:test_txn'
@@ -162,6 +161,5 @@ class test_read_committed_default(wttest.WiredTigerTestCase):
s.commit_transaction()
s.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_txn11.py b/test/suite/test_txn11.py
index ab87283c014..dfb02799434 100644
--- a/test/suite/test_txn11.py
+++ b/test/suite/test_txn11.py
@@ -62,7 +62,6 @@ class test_txn11(wttest.WiredTigerTestCase, suite_subprocess):
checkpoints += 1
return
-
def test_ops(self):
# Populate a table
simple_populate(self, self.source_uri, 'key_format=S', self.nrows)
diff --git a/test/suite/test_upgrade.py b/test/suite/test_upgrade.py
index e4f92f8f8d8..1c2e3f6cda8 100644
--- a/test/suite/test_upgrade.py
+++ b/test/suite/test_upgrade.py
@@ -67,6 +67,5 @@ class test_upgrade(wttest.WiredTigerTestCase):
self.upgrade(complex_populate, False)
self.upgrade(complex_populate, True)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util01.py b/test/suite/test_util01.py
index 726a53eb5ca..5795bb5b2e6 100644
--- a/test/suite/test_util01.py
+++ b/test/suite/test_util01.py
@@ -183,6 +183,5 @@ class test_util01(wttest.WiredTigerTestCase, suite_subprocess):
def test_dump_api_hex(self):
self.dump(True, True)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util02.py b/test/suite/test_util02.py
index 421b0104484..13f52d6aeea 100644
--- a/test/suite/test_util02.py
+++ b/test/suite/test_util02.py
@@ -162,7 +162,6 @@ class test_util02(wttest.WiredTigerTestCase, suite_subprocess):
def test_load_process_hex(self):
self.load_process(True)
-
# test_load_commandline --
# Test the command-line processing.
class test_load_commandline(wttest.WiredTigerTestCase, suite_subprocess):
@@ -220,6 +219,5 @@ class test_load_commandline(wttest.WiredTigerTestCase, suite_subprocess):
self.load_commandline(["table", "source=bar"], False)
self.load_commandline(["table", "version=(100,200)"], False)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util03.py b/test/suite/test_util03.py
index e341c79ff9e..ac93d04f799 100644
--- a/test/suite/test_util03.py
+++ b/test/suite/test_util03.py
@@ -69,6 +69,5 @@ class test_util03(wttest.WiredTigerTestCase, suite_subprocess):
self.fail('table should be empty')
cursor.close()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util07.py b/test/suite/test_util07.py
index 602ddbba5ff..1175ad8eb13 100644
--- a/test/suite/test_util07.py
+++ b/test/suite/test_util07.py
@@ -93,6 +93,5 @@ class test_util07(wttest.WiredTigerTestCase, suite_subprocess):
self.check_empty_file(outfile)
self.check_file_contains(errfile, 'key49: not found\n')
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util08.py b/test/suite/test_util08.py
index b2bb1e067e0..456b68675c6 100644
--- a/test/suite/test_util08.py
+++ b/test/suite/test_util08.py
@@ -42,6 +42,5 @@ class test_util08(wttest.WiredTigerTestCase, suite_subprocess):
text = f.read(1000)
self.assertTrue('Copyright' in text)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util09.py b/test/suite/test_util09.py
index ddf01b980ea..4b514401478 100644
--- a/test/suite/test_util09.py
+++ b/test/suite/test_util09.py
@@ -100,6 +100,5 @@ class test_util09(wttest.WiredTigerTestCase, suite_subprocess):
self.runWt(["loadtext", "table:" + self.tablename], infilename="loadtext.in")
self.check_keys(self.tablename, keys)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util11.py b/test/suite/test_util11.py
index 6bf87525164..d5d1cda8c39 100644
--- a/test/suite/test_util11.py
+++ b/test/suite/test_util11.py
@@ -128,6 +128,5 @@ class test_util11(wttest.WiredTigerTestCase, suite_subprocess):
self.runWt(["list"], outfilename=outfile)
self.check_file_content(outfile, filelist)
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_util12.py b/test/suite/test_util12.py
index f407c2ce7d6..3821139f266 100644
--- a/test/suite/test_util12.py
+++ b/test/suite/test_util12.py
@@ -86,6 +86,5 @@ class test_util12(wttest.WiredTigerTestCase, suite_subprocess):
'def', '456', 'abc'], errfilename=errfile, failure=True)
self.check_file_contains(errfile, 'usage:')
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_verify.py b/test/suite/test_verify.py
index 28a66415b9d..46ae667464a 100644
--- a/test/suite/test_verify.py
+++ b/test/suite/test_verify.py
@@ -197,6 +197,5 @@ class test_verify(wttest.WiredTigerTestCase, suite_subprocess):
errfilename="verifyerr.out", failure=True)
self.check_non_empty_file("verifyerr.out")
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/test_version.py b/test/suite/test_version.py
index f8835e5bd05..569f181acda 100644
--- a/test/suite/test_version.py
+++ b/test/suite/test_version.py
@@ -36,6 +36,5 @@ class test_version(wttest.WiredTigerTestCase):
def test_version(self):
version = wiredtiger.wiredtiger_version()
-
if __name__ == '__main__':
wttest.run()
diff --git a/test/suite/wttest.py b/test/suite/wttest.py
index 788dd5d0307..4d6df0bc8bd 100644
--- a/test/suite/wttest.py
+++ b/test/suite/wttest.py
@@ -134,7 +134,6 @@ class CapturedFd(object):
gotstr + '"')
self.expectpos = os.path.getsize(self.filename)
-
class TestSuiteConnection(object):
def __init__(self, conn, connlist):
connlist.append(conn)
@@ -153,7 +152,6 @@ class TestSuiteConnection(object):
else:
return getattr(self._conn, attr)
-
class WiredTigerTestCase(unittest.TestCase):
_globalSetup = False
_printOnceSeen = {}
@@ -216,6 +214,12 @@ class WiredTigerTestCase(unittest.TestCase):
' (' + self.scenario_name + ')'
return self.simpleName() + scen
+ def shortDesc(self):
+ ret_str = ''
+ if hasattr(self, 'scenario_number'):
+ ret_str = ' -s ' + str(self.scenario_number)
+ return self.simpleName() + ret_str
+
def simpleName(self):
return "%s.%s.%s" % (self.__module__,
self.className(), self._testMethodName)
@@ -518,7 +522,6 @@ class WiredTigerTestCase(unittest.TestCase):
def className(self):
return self.__class__.__name__
-
def longtest(description):
"""
Used as a function decorator, for example, @wttest.longtest("description").
diff --git a/tools/wtstats/stat_data.py b/tools/wtstats/stat_data.py
index 1eb60c9d513..8f47b86a23e 100644
--- a/tools/wtstats/stat_data.py
+++ b/tools/wtstats/stat_data.py
@@ -7,6 +7,7 @@ no_scale_per_second_list = [
'cache: bytes currently in the cache',
'cache: bytes not belonging to page images in the cache',
'cache: eviction currently operating in aggressive mode',
+ 'cache: eviction empty score',
'cache: eviction state',
'cache: files with active eviction walks',
'cache: hazard pointer maximum array length',
@@ -103,6 +104,7 @@ no_clear_list = [
'cache: bytes currently in the cache',
'cache: bytes not belonging to page images in the cache',
'cache: eviction currently operating in aggressive mode',
+ 'cache: eviction empty score',
'cache: eviction state',
'cache: files with active eviction walks',
'cache: maximum bytes configured',