diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
| commit | 4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch) | |
| tree | 1682a647d4463397c119183369ae6f750d5fdcff /src/third_party/wiredtiger | |
| parent | aa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff) | |
| parent | 8f0827553e09872941945a093b647a4211a9db7f (diff) | |
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0'
with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/third_party/wiredtiger')
200 files changed, 3100 insertions, 11301 deletions
diff --git a/src/third_party/wiredtiger/bench/workgen/runner/example_prepare_evict_reconcile.py b/src/third_party/wiredtiger/bench/workgen/runner/example_prepare_evict_reconcile.py deleted file mode 100644 index a1fe228e11e..00000000000 --- a/src/third_party/wiredtiger/bench/workgen/runner/example_prepare_evict_reconcile.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# - -from runner import * -from wiredtiger import * -from workgen import * -import time - -context = Context() -conn = context.wiredtiger_open("create,cache_size=500MB,eviction_target=60") -s = conn.open_session() -tname = "table:test" -config = "key_format=S,value_format=S," +\ - "exclusive=true,allocation_size=4kb," +\ - "internal_page_max=32kb,leaf_page_max=4kb,split_pct=100," -s.create(tname, config) -table = Table(tname) -table.options.key_size = 200 -table.options.value_size = 7000 - -start_time = time.time() - -op = Operation(Operation.OP_INSERT, table) -thread = Thread(op * 5000) -pop_workload = Workload(context, thread) -print('populate: Start') -pop_workload.run(conn) -print('populate: End') - -opread = Operation(Operation.OP_SEARCH, table) -read_txn = txn(opread, 'read_timestamp') -# read_timestamp_lag is the lag to the read_timestamp from current time -read_txn.transaction.read_timestamp_lag = 300 -treader = Thread(read_txn * 5000) - -opwrite = Operation(Operation.OP_INSERT, table) -write_txn = txn(opwrite, 'isolation=snapshot') -# use_prepare_timestamp - Commit the transaction with stable_timestamp. -write_txn.transaction.use_prepare_timestamp = True -twriter = Thread(write_txn * 5000) -# Thread.options.session_config - Session configuration. -twriter.options.session_config="isolation=snapshot" - -opupdate = Operation(Operation.OP_UPDATE, table) -update_txn = txn(opupdate, 'isolation=snapshot') -# use_commit_timestamp - Commit the transaction with commit_timestamp. -update_txn.transaction.use_commit_timestamp = True -tupdate = Thread(update_txn * 5000) -# Thread.options.session_config - Session configuration. -tupdate.options.session_config="isolation=snapshot" - -workload = Workload(context, 30 * twriter + 30 * tupdate + 30 * treader) -workload.options.run_time = 300 -workload.options.report_interval=500 -# read_timestamp_lag - Number of seconds lag to the oldest_timestamp from current time. -workload.options.oldest_timestamp_lag=400 -# read_timestamp_lag - Number of seconds lag to the stable_timestamp from current time. -workload.options.stable_timestamp_lag=20 -# timestamp_advance is the number of seconds to wait before moving oldest and stable timestamp. -workload.options.timestamp_advance=1 -print('Run workload:') -workload.run(conn) - -end_time = time.time() -run_time = end_time - start_time - -print('Workload took %d minutes' %(run_time//60)) - -latency_filename = os.path.join(context.args.home, "latency.out") -latency.workload_latency(workload, latency_filename) -conn.close() diff --git a/src/third_party/wiredtiger/bench/wtperf/runners/parallel-pop-btree-long.wtperf b/src/third_party/wiredtiger/bench/wtperf/runners/parallel-pop-btree-long.wtperf deleted file mode 100644 index 25fbd533821..00000000000 --- a/src/third_party/wiredtiger/bench/wtperf/runners/parallel-pop-btree-long.wtperf +++ /dev/null @@ -1,9 +0,0 @@ -# wtperf options file: Run populate thread multi-threaded and with groups -# of operations in each transaction. -conn_config="cache_size=200MB" -table_config="type=file" -transaction_config="isolation=snapshot" -icount=500000000 -report_interval=5 -populate_ops_per_txn=100 -populate_threads=24 diff --git a/src/third_party/wiredtiger/cmake/configs/base.cmake b/src/third_party/wiredtiger/cmake/configs/base.cmake index 2d47a351323..d3df936e5b8 100644 --- a/src/third_party/wiredtiger/cmake/configs/base.cmake +++ b/src/third_party/wiredtiger/cmake/configs/base.cmake @@ -212,22 +212,11 @@ config_bool( DEFAULT OFF ) -# Setup the WiredTiger build to use Debug settings as unless the build type was explicitly -# configured. Primary users of the build are our developers, who want as much help diagnosing -# issues as possible. Builds targeted for release to customers should switch to a "Release" setting. -set(default_build_type "Debug") -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - # Notify callers that our build chooses Debug, not the default empty - message(STATUS "Defaulting build type to '${default_build_type}'.") - set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE - STRING "Type of build selected." FORCE) -endif() - set(default_optimize_level) if("${WT_OS}" STREQUAL "windows") - set(default_optimize_level "/Od") + set(default_optimize_level "/O2") else() - set(default_optimize_level "-Og") + set(default_optimize_level "-O3") endif() config_string( CC_OPTIMIZE_LEVEL diff --git a/src/third_party/wiredtiger/cmake/configs/modes.cmake b/src/third_party/wiredtiger/cmake/configs/modes.cmake index f23096357d5..c518a8c2a78 100644 --- a/src/third_party/wiredtiger/cmake/configs/modes.cmake +++ b/src/third_party/wiredtiger/cmake/configs/modes.cmake @@ -130,9 +130,6 @@ else() endif() endif() -# Sanitizer builds should have debug info available and optimization off -set(san_debug_flags "-O1 -g ${no_omit_frame_flag}") - # UBSAN build variant flags. set(ubsan_link_flags "-fsanitize=undefined") set(ubsan_compiler_c_flag "-fsanitize=undefined") @@ -150,22 +147,22 @@ set(tsan_compiler_cxx_flag "-fsanitize=thread") # Define our custom build variants. define_build_mode(ASan - C_COMPILER_FLAGS ${asan_compiler_c_flag} ${san_debug_flags} - CXX_COMPILER_FLAGS ${asan_compiler_cxx_flag} ${san_debug_flags} + C_COMPILER_FLAGS ${asan_compiler_c_flag} ${no_omit_frame_flag} + CXX_COMPILER_FLAGS ${asan_compiler_cxx_flag} ${no_omit_frame_flag} LINK_FLAGS ${asan_link_flags} LIBS ${asan_lib_flags} ) define_build_mode(UBSan - C_COMPILER_FLAGS ${ubsan_compiler_c_flag} ${san_debug_flags} - CXX_COMPILER_FLAGS ${ubsan_compiler_cxx_flag} ${san_debug_flags} + C_COMPILER_FLAGS ${ubsan_compiler_c_flag} ${no_omit_frame_flag} + CXX_COMPILER_FLAGS ${ubsan_compiler_cxx_flag} ${no_omit_frame_flag} LINK_FLAGS ${ubsan_link_flags} # Disable UBSan on MSVC compilers (unsupported). DEPENDS "NOT MSVC" ) define_build_mode(MSan - C_COMPILER_FLAGS ${msan_compiler_c_flag} ${san_debug_flags} + C_COMPILER_FLAGS ${msan_compiler_c_flag} ${no_omit_frame_flag} CXX_COMPILER_FLAGS ${msan_compiler_cxx_flag} LINK_FLAGS ${msan_link_flags} # Disable MSan on MSVC and GNU compilers (unsupported). @@ -173,7 +170,7 @@ define_build_mode(MSan ) define_build_mode(TSan - C_COMPILER_FLAGS ${tsan_compiler_c_flag} ${san_debug_flags} + C_COMPILER_FLAGS ${tsan_compiler_c_flag} ${no_omit_frame_flag} CXX_COMPILER_FLAGS ${tsan_compiler_cxx_flag} LINK_FLAGS ${tsan_link_flags} # Disable TSan on MSVC compilers (unsupported). diff --git a/src/third_party/wiredtiger/cmake/helpers.cmake b/src/third_party/wiredtiger/cmake/helpers.cmake index a05f2d37ac9..6155cb8b1ab 100644 --- a/src/third_party/wiredtiger/cmake/helpers.cmake +++ b/src/third_party/wiredtiger/cmake/helpers.cmake @@ -664,7 +664,7 @@ macro(source_python3_package python_libs python_version python_executable) if("${CMAKE_VERSION}" VERSION_LESS "3.12.0") # This method of finding python libs has been deprecated since version 3.12. # If we are running with a greater CMake version, opt to use the Python3 package. - set(Python_ADDITIONAL_VERSIONS 3.11 3.9 3.8 3.7 3.6 3.5) + set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5) find_package(PythonInterp ${required_version} REQUIRED) find_package(PythonLibs ${required_version} REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) diff --git a/src/third_party/wiredtiger/cmake/toolchains/mongodbtoolchain_stable_clang.cmake b/src/third_party/wiredtiger/cmake/toolchains/mongodbtoolchain_stable_clang.cmake deleted file mode 100644 index 6127e105a06..00000000000 --- a/src/third_party/wiredtiger/cmake/toolchains/mongodbtoolchain_stable_clang.cmake +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/mongodbtoolchain_v4_clang.cmake") diff --git a/src/third_party/wiredtiger/cmake/toolchains/mongodbtoolchain_stable_gcc.cmake b/src/third_party/wiredtiger/cmake/toolchains/mongodbtoolchain_stable_gcc.cmake deleted file mode 100644 index 49e0d397bc9..00000000000 --- a/src/third_party/wiredtiger/cmake/toolchains/mongodbtoolchain_stable_gcc.cmake +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/mongodbtoolchain_v4_gcc.cmake") diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py index 691288a5023..11632da60ae 100644 --- a/src/third_party/wiredtiger/dist/api_data.py +++ b/src/third_party/wiredtiger/dist/api_data.py @@ -219,9 +219,6 @@ tiered_config = [ time in seconds to retain data on tiered storage on the local tier for faster read access''', min='0', max='10000'), - Config('object_target_size', '0', r''' - this option is no longer supported, retained for backward compatibility''', - min='0', undoc=True), ]), ] @@ -671,10 +668,6 @@ connection_runtime_config = [ pages from cache. The number of threads currently running will vary depending on the current eviction load''', min=1, max=20), - Config('evict_sample_inmem', 'true', r''' - If no in-memory ref is found on the root page, attempt to locate a random - in-memory page by examining all entries on the root page.''', - type='boolean'), ]), Config('eviction_checkpoint_target', '1', r''' perform eviction at the beginning of checkpoints to bring the dirty @@ -778,11 +771,10 @@ connection_runtime_config = [ ]), Config('operation_timeout_ms', '0', r''' if non-zero, a requested limit on the number of elapsed real time milliseconds - application threads will take to complete database operations. This setting only applies - inside of a transaction. Time is measured from the start of each WiredTiger API call. There - is no guarantee any operation will not take longer than this amount of time. If WiredTiger - notices the limit has been exceeded, an operation may return a WT_ROLLBACK error. The - default of 0 is to have no limit.''', + application threads will take to complete database operations. Time is measured from the + start of each WiredTiger API call. There is no guarantee any operation will not take + longer than this amount of time. If WiredTiger notices the limit has been exceeded, an + operation may return a WT_ROLLBACK error. The default of 0 is to have no limit''', min=0), Config('operation_tracking', '', r''' enable tracking of performance-critical functions. See @@ -863,11 +855,10 @@ connection_runtime_config = [ type='list', undoc=True, choices=[ 'aggressive_sweep', 'backup_rename', 'checkpoint_reserved_txnid_delay', 'checkpoint_slow', - 'checkpoint_stop', 'compact_slow', 'failpoint_eviction_fail_after_reconciliation', - 'failpoint_history_store_delete_key_from_ts', 'history_store_checkpoint_delay', - 'history_store_search', 'history_store_sweep_race', 'prepare_checkpoint_delay', - 'prepare_resolution', 'prepare_resolution_2', 'split_1', 'split_2', 'split_3', 'split_4', - 'split_5', 'split_6', 'split_7', 'tiered_flush_finish']), + 'checkpoint_stop', 'compact_slow', 'failpoint_history_store_delete_key_from_ts', + 'history_store_checkpoint_delay', 'history_store_search', 'history_store_sweep_race', + 'prepare_checkpoint_delay', 'split_1', 'split_2', 'split_3', 'split_4', 'split_5', + 'split_6', 'split_7', 'tiered_flush_finish']), Config('verbose', '[]', r''' enable messages for various subsystems and operations. Options are given as a list, where each message type can optionally define an associated verbosity level, such as @@ -1053,6 +1044,10 @@ tiered_storage_configuration_common = [ time in seconds to retain data on tiered storage on the local tier for faster read access''', min='0', max='10000'), + Config('object_target_size', '10M', r''' + the approximate size of objects before creating them on the + tiered storage tier''', + min='100K', max='10TB'), ] connection_reconfigure_tiered_storage_configuration = [ Config('tiered_storage', '', r''' @@ -1606,9 +1601,6 @@ methods = { the object into \c next_random_sample_size equal-sized pieces, and each retrieval returns a record from one of those pieces. See @ref cursor_random for details'''), - Config('next_random_seed', '0', r''' - configure the cursor to set an initial random seed when using \c next_random configuration. - This is used for testing purposes only. See @ref cursor_random for details'''), Config('raw', 'false', r''' ignore the encodings for the key and value, manage data as if the formats were \c "u". See @ref cursor_raw for details''', @@ -1729,10 +1721,6 @@ methods = { Display the contents of in-memory pages as they are verified, using the application's message handler, intended for debugging''', type='boolean'), - Config('read_corrupt', 'false', r''' - A mode that allows verify to continue reading after encountering a checksum error. It - will skip past the corrupt block and continue with the verification process''', - type='boolean'), Config('stable_timestamp', 'false', r''' Ensure that no data has a start timestamp after the stable timestamp, to be run after rollback_to_stable.''', diff --git a/src/third_party/wiredtiger/dist/s_all b/src/third_party/wiredtiger/dist/s_all index 61e25f67f6a..d6511a483d6 100755 --- a/src/third_party/wiredtiger/dist/s_all +++ b/src/third_party/wiredtiger/dist/s_all @@ -109,7 +109,6 @@ COMMANDS=" 2>&1 ./s_string > ${t_pfx}s_string 2>&1 ./s_tags > ${t_pfx}tags 2>&1 ./s_typedef -c > ${t_pfx}s_typedef_c -2>&1 ./s_visibility_checks > ${t_pfx}s_visibility_checks 2>&1 ./s_void > ${t_pfx}s_void 2>&1 ./s_whitespace > ${t_pfx}s_whitespace 2>&1 python function.py > ${t_pfx}py_function diff --git a/src/third_party/wiredtiger/dist/s_clang-format b/src/third_party/wiredtiger/dist/s_clang-format index 076e3302397..80de76b7c36 100755 --- a/src/third_party/wiredtiger/dist/s_clang-format +++ b/src/third_party/wiredtiger/dist/s_clang-format @@ -6,33 +6,16 @@ t=__wt.$$ trap 'rm -rf $t' 0 1 2 3 13 15 download_clang_format() { - version=$1 - arch_and_os="$(uname -m)-$(uname)" - archive=dist/clang-format.tar.gz - - # Adding more clang-format binaries requires uploading them to boxes.10gen - # You can either get the clang-format binary from the llvm releases page - # (https://github.com/llvm/llvm-project/releases) or compile clang-format yourself. - # Place the binary in dist/ and confirm that s_clang_format runs correctly, then - # tar a folder containing just the clang-format binary with the format: - # clang-format-llvm-${version}-${arch_and_os}/ - # clang-format - # into a tarball named clang-format-llvm-${version}-${arch_and_os}.tar.gz - # The tarball should extract using the tar command below. - # This tarball can then be uploaded via a Jira request to the BUILD team. - if [[ "$arch_and_os" =~ ^("aarch64-Linux"|"x86_64-Darwin"|"arm64-Darwin"|"x86_64-Linux")$ ]] ; then - curl https://s3.amazonaws.com/boxes.10gen.com/build/clang-format-llvm-"$version"-"$arch_and_os".tar.gz -o $archive - tar --strip=1 -C dist/ -xf $archive clang-format-llvm-"$version"-"$arch_and_os"/clang-format && rm $archive - chmod +x ./dist/clang-format - - if [[ "$arch_and_os" =~ ^("x86_64-Darwin"|"arm64-Darwin")$ ]] ; then - # Needed to get around the macOS code signing issue. - xattr -c ./dist/clang-format - fi - else - echo "$0: unsupported architecture and OS combination '$arch_and_os' to run clang_format" - return 1 - fi + if [ `uname` = "Linux" ]; then + curl https://s3.amazonaws.com/boxes.10gen.com/build/clang-format-llvm-10.0.0-x86_64-linux-gnu-ubuntu-20.04.tar-1.gz -o dist/clang-format.tar.gz + tar --strip=1 -C dist/ -xf dist/clang-format.tar.gz clang-format-llvm-10.0.0-x86_64-linux-gnu-ubuntu-20.04/clang-format && rm dist/clang-format.tar.gz + elif [ `uname` = "Darwin" ]; then + curl https://s3.amazonaws.com/boxes.10gen.com/build/build/clang-format-llvm-10.0.0-x86_64-apple-darwin.tar.gz -o dist/clang-format.tar.gz + tar --strip=1 -C dist/ -xf dist/clang-format.tar.gz clang-format-llvm-10.0.0-x86_64-apple-darwin/clang-format && rm dist/clang-format.tar.gz + else + echo "$0: unsupported environment $(uname)" + exit 1 + fi } # Find the top-level WiredTiger directory and move to there. @@ -41,12 +24,19 @@ cd `git rev-parse --show-toplevel` || exit 1 # Override existing Clang Format versions in the PATH. export PATH="${PWD}/dist":$PATH -# Check if Clang-Format is already available with the desired version. -desired_version="12.0.1" -if ! command -v clang-format &> /dev/null; then - download_clang_format $desired_version || exit 1 -elif ! clang-format --version | grep -q $desired_version; then - download_clang_format $desired_version || exit 1 +# Download the clang-format binary if it's not in place. +[ ! -x "$(command -v clang-format)" ] && download_clang_format + +# Ensure that we have the correct version of clang-format. +desired_version="10.0.0" + +# On macOS Catalina, users need to manually approve binaries. +# If we're not allowed to run clang-format, let's exit (should be obvious from the dialog). +current_version=`clang-format --version` || exit 1 + +echo $current_version | grep "version $desired_version" >/dev/null 2>&1 +if test $? -ne 0; then + download_clang_format fi case $# in diff --git a/src/third_party/wiredtiger/dist/s_define.list b/src/third_party/wiredtiger/dist/s_define.list index 2bd5c747639..f4751006cd9 100644 --- a/src/third_party/wiredtiger/dist/s_define.list +++ b/src/third_party/wiredtiger/dist/s_define.list @@ -52,7 +52,6 @@ WT_PACKED_STRUCT_END WT_PADDING_CHECK WT_PREPARE_INIT WT_READ_BARRIER -WT_READ_BARRIER_WEAK_MEMORDER WT_REF_SAVE_STATE_MAX WT_REF_SIZE WT_SESSION_LOCKED_CHECKPOINT @@ -78,7 +77,6 @@ WT_STAT_DECRV_BASE WT_STAT_INCRV_ATOMIC WT_STAT_INCRV_ATOMIC_BASE WT_STAT_INCRV_BASE -WT_STAT_SET_BASE WT_STAT_WRITE WT_TIMEDIFF_US WT_TRACK_OP diff --git a/src/third_party/wiredtiger/dist/s_string.ok b/src/third_party/wiredtiger/dist/s_string.ok index 54c3803a00e..da396a97162 100644 --- a/src/third_party/wiredtiger/dist/s_string.ok +++ b/src/third_party/wiredtiger/dist/s_string.ok @@ -277,7 +277,6 @@ MADV MALLOC MEM MEMALIGN -MEMORDER MERCHANTABILITY METADATA MONGODB @@ -291,7 +290,6 @@ MULTIBLOCK MUTEX Manos MapViewOfFile -Marsaglia Marsaglia's Mellor Memrata @@ -375,13 +373,11 @@ RECNO REF's REFs RET -RETRYABLE RHEL RLE RLEs RMW RNG -RNGs RPC RTS RUNDIR @@ -415,7 +411,6 @@ STEC STL STR STRUCT -SYSCALL Scalability Scalable Sedgewick @@ -435,7 +430,6 @@ Split's Stoica StoreLoad StoreStore -Strobed Su Syscall TAILQ @@ -535,7 +529,6 @@ Wunused XP Xcode Xcode/ -Xorshift YCSB Yann ZSTD @@ -691,7 +684,6 @@ colgroup colgroups collatorp comparator -comparators comparep compat compressStream @@ -760,7 +752,6 @@ datalen datasets datasource datastore -dbar dbc dbs dcalloc @@ -987,7 +978,6 @@ iiii iiu ikey im -img impl incr incrementals @@ -1110,7 +1100,6 @@ logtest lookaside lookup lookups -loongarch lossy lr lrt @@ -1161,7 +1150,6 @@ mfence minSnapshotHistoryWindowInSeconds minorp mips -misalignments mkdir mmap mmrand @@ -1358,7 +1346,6 @@ reconfiguring recsize rectype recurse -reentrant refp regionp reinitialization @@ -1415,15 +1402,12 @@ sizev skiplist skiplists skipp -skippable slotsp slvg snaplen snapsort snprintf -sortable sp -sparc spinlock spinlocks sprintf @@ -1449,7 +1433,6 @@ strlen strncpy strndup strnlen -strobed strtok strtoll strtouq diff --git a/src/third_party/wiredtiger/dist/s_typedef b/src/third_party/wiredtiger/dist/s_typedef index daa1e1629d9..2da60035911 100755 --- a/src/third_party/wiredtiger/dist/s_typedef +++ b/src/third_party/wiredtiger/dist/s_typedef @@ -32,11 +32,10 @@ build() { echo " typedef $t $n $upper;" done - # Fixed types we use. - echo - echo 'typedef struct timespec WT_TIMER;' - echo 'typedef uint64_t wt_timestamp_t;' - echo + # There's one fixed type we use. + echo + echo 'typedef uint64_t wt_timestamp_t;' + echo echo '/*' sed -e '/Forward type declarations .*: END/,${' \ diff --git a/src/third_party/wiredtiger/dist/s_visibility_checks b/src/third_party/wiredtiger/dist/s_visibility_checks deleted file mode 100755 index 10bc0e28ea4..00000000000 --- a/src/third_party/wiredtiger/dist/s_visibility_checks +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -t=__wt.$$ -trap 'rm -f $t' 0 1 2 3 13 15 - -cd .. - -# Check to see if a time aggregate is used in a straight visibility check. -# It should never be - the "snap_min" visibility check should be used instead. -found=`grep -rnI "txn_visible.*addr.ta" src/` -if [ ! -z "$found" ]; then - echo "Found invalid usage(s) of visibility check and a time aggregate window" - echo "$found" - exit 1 -fi - -exit 0 diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index ce41c46f427..b02b8512af5 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -31,10 +31,6 @@ class Stat: def __cmp__(self, other): return cmp(self.desc.lower(), other.desc.lower()) -class AutoCommitStat(Stat): - prefix = 'autocommit' - def __init__(self, name, desc, flags=''): - Stat.__init__(self, name, AutoCommitStat.prefix, desc, flags) class BlockCacheStat(Stat): prefix = 'block-cache' def __init__(self, name, desc, flags=''): @@ -240,7 +236,6 @@ conn_stats = [ CacheStat('cache_eviction_aggressive_set', 'eviction currently operating in aggressive mode', 'no_clear,no_scale'), CacheStat('cache_eviction_app', 'pages evicted by application threads'), CacheStat('cache_eviction_app_dirty', 'modified pages evicted by application threads'), - CacheStat('cache_eviction_clear_ordinary', 'pages removed from the ordinary queue to be queued for urgent eviction'), 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_fail_active_children_on_an_internal_page', 'pages selected for eviction unable to be evicted because of active children on an internal page'), @@ -255,7 +250,6 @@ conn_stats = [ CacheStat('cache_eviction_force_dirty_time', 'forced eviction - pages evicted that were dirty time (usecs)'), CacheStat('cache_eviction_force_fail', 'forced eviction - pages selected unable to be evicted count'), CacheStat('cache_eviction_force_fail_time', 'forced eviction - pages selected unable to be evicted time'), - CacheStat('cache_eviction_force_no_retry', 'forced eviction - do not retry count to evict pages selected to evict during reconciliation'), CacheStat('cache_eviction_force_hs', 'forced eviction - history store pages selected while session has history store cursor open'), CacheStat('cache_eviction_force_hs_fail', 'forced eviction - history store pages failed to evict while session has history store cursor open'), CacheStat('cache_eviction_force_hs_success', 'forced eviction - history store pages successfully evicted while session has history store cursor open'), @@ -266,8 +260,7 @@ conn_stats = [ CacheStat('cache_eviction_internal_pages_seen', 'internal pages seen by eviction walk'), CacheStat('cache_eviction_internal_pages_already_queued', 'internal pages seen by eviction walk that are already queued'), CacheStat('cache_eviction_internal_pages_queued', 'internal pages queued for eviction'), - CacheStat('cache_eviction_maximum_page_size', 'maximum page size seen at eviction', 'no_clear,no_scale,size'), - CacheStat('cache_eviction_maximum_milliseconds', 'maximum milliseconds spent at a single eviction', 'no_clear,no_scale,size'), + CacheStat('cache_eviction_maximum_page_size', 'maximum page size at eviction', 'no_clear,no_scale,size'), CacheStat('cache_eviction_pages_queued', 'pages queued for eviction'), CacheStat('cache_eviction_pages_queued_oldest', 'pages queued for urgent eviction during walk'), CacheStat('cache_eviction_pages_queued_post_lru', 'pages queued for eviction post lru sorting'), @@ -278,17 +271,6 @@ conn_stats = [ CacheStat('cache_eviction_queue_empty', 'eviction server candidate queue empty when topping up'), CacheStat('cache_eviction_queue_not_empty', 'eviction server candidate queue not empty when topping up'), CacheStat('cache_eviction_server_evicting', 'eviction server evicting pages'), - CacheStat('cache_eviction_server_skip_checkpointing_trees', 'eviction server skips trees that are being checkpointed'), - CacheStat('cache_eviction_server_skip_dirty_pages_during_checkpoint', 'eviction server skips dirty pages during a running checkpoint'), - CacheStat('cache_eviction_server_skip_pages_retry', 'eviction server skips pages that previously failed eviction and likely will again'), - CacheStat('cache_eviction_server_skip_pages_last_running', 'eviction server skips pages that are written with transactions greater than the last running'), - CacheStat('cache_eviction_server_skip_metatdata_with_history', 'eviction server skips metadata pages with history'), - CacheStat('cache_eviction_server_skip_trees_eviction_disabled', 'eviction server skips trees that disable eviction'), - CacheStat('cache_eviction_server_skip_trees_not_useful_before', 'eviction server skips trees that were not useful before'), - CacheStat('cache_eviction_server_skip_trees_stick_in_cache', 'eviction server skips trees that are configured to stick in cache'), - CacheStat('cache_eviction_server_skip_trees_too_many_active_walks', 'eviction server skips trees because there are too many active walks'), - CacheStat('cache_eviction_server_skip_unwanted_pages', 'eviction server skips pages that we do not want to evict'), - CacheStat('cache_eviction_server_skip_unwanted_tree', 'eviction server skips tree that we do not want to evict'), CacheStat('cache_eviction_server_slept', 'eviction server slept, because we did not make progress with eviction'), CacheStat('cache_eviction_slow', 'eviction server unable to reach eviction goal'), CacheStat('cache_eviction_stable_state_workers', 'eviction worker thread stable number', 'no_clear'), @@ -310,7 +292,6 @@ conn_stats = [ CacheStat('cache_hazard_walks', 'hazard pointer check entries walked'), CacheStat('cache_hs_ondisk', 'history store table on-disk size', 'no_clear,no_scale,size'), CacheStat('cache_hs_ondisk_max', 'history store table max on-disk size', 'no_clear,no_scale,size'), - CacheStat('cache_reentry_hs_eviction_milliseconds', 'total milliseconds spent inside reentrant history store evictions in a reconciliation', 'no_clear,no_scale,size'), CacheStat('cache_overhead', 'percentage overhead', 'no_clear,no_scale'), CacheStat('cache_pages_dirty', 'tracked dirty pages in the cache', 'no_clear,no_scale'), CacheStat('cache_pages_inuse', 'pages currently held in the cache', 'no_clear,no_scale'), @@ -341,7 +322,6 @@ conn_stats = [ ########################################## # Cursor operations ########################################## - CursorStat('cursor_bulk_count', 'bulk cursor count', 'no_clear,no_scale'), CursorStat('cursor_cached_count', 'cached cursor count', 'no_clear,no_scale'), CursorStat('cursor_cache', 'cursor close calls that result in cache'), CursorStat('cursor_create', 'cursor create calls'), @@ -513,9 +493,7 @@ conn_stats = [ ########################################## # Reconciliation statistics ########################################## - RecStat('rec_maximum_hs_wrapup_milliseconds', 'maximum milliseconds spent in moving updates to the history store in a reconciliation', 'no_clear,no_scale,size'), - RecStat('rec_maximum_image_build_milliseconds', 'maximum milliseconds spent in building a disk image in a reconciliation', 'no_clear,no_scale,size'), - RecStat('rec_maximum_milliseconds', 'maximum milliseconds spent in a reconciliation call', 'no_clear,no_scale,size'), + RecStat('rec_maximum_seconds', 'maximum seconds spent in a reconciliation call', 'no_clear,no_scale,size'), RecStat('rec_overflow_key_leaf', 'leaf-page overflow keys'), RecStat('rec_pages_with_prepare', 'page reconciliation calls that resulted in values with prepared transaction metadata'), RecStat('rec_pages_with_ts', 'page reconciliation calls that resulted in values with timestamps'), @@ -583,6 +561,7 @@ conn_stats = [ TxnStat('txn_checkpoint_handle_duration', 'transaction checkpoint most recent duration for gathering all handles (usecs)', 'no_clear,no_scale'), TxnStat('txn_checkpoint_handle_duration_apply', 'transaction checkpoint most recent duration for gathering applied handles (usecs)', 'no_clear,no_scale'), TxnStat('txn_checkpoint_handle_duration_skip', 'transaction checkpoint most recent duration for gathering skipped handles (usecs)', 'no_clear,no_scale'), + TxnStat('txn_hs_ckpt_duration', 'transaction checkpoint history store file duration (usecs)'), TxnStat('txn_checkpoint_generation', 'transaction checkpoint generation', 'no_clear,no_scale'), TxnStat('txn_checkpoint_prep_max', 'transaction checkpoint prepare max time (msecs)', 'no_clear,no_scale'), TxnStat('txn_checkpoint_prep_min', 'transaction checkpoint prepare min time (msecs)', 'no_clear,no_scale'), @@ -600,7 +579,7 @@ conn_stats = [ TxnStat('txn_checkpoint_time_total', 'transaction checkpoint total time (msecs)', 'no_clear,no_scale'), TxnStat('txn_checkpoint_stop_stress_active', 'transaction checkpoint stop timing stress active', 'no_clear,no_scale'), TxnStat('txn_commit', 'transactions committed'), - TxnStat('txn_hs_ckpt_duration', 'transaction checkpoint history store file duration (usecs)'), + TxnStat('txn_fail_cache', 'transaction failures due to history store'), TxnStat('txn_pinned_checkpoint_range', 'transaction range of IDs currently pinned by a checkpoint', 'no_clear,no_scale'), TxnStat('txn_pinned_range', 'transaction range of IDs currently pinned', 'no_clear,no_scale'), TxnStat('txn_pinned_timestamp', 'transaction range of timestamps currently pinned', 'no_clear,no_scale'), @@ -611,13 +590,14 @@ conn_stats = [ TxnStat('txn_prepare_active', 'prepared transactions currently active'), TxnStat('txn_prepare_commit', 'prepared transactions committed'), TxnStat('txn_prepare_rollback', 'prepared transactions rolled back'), + TxnStat('txn_prepare_rollback_do_not_remove_hs_update', 'prepared transactions rolled back and do not remove the history store entry'), + TxnStat('txn_prepare_rollback_fix_hs_update_with_ckpt_reserved_txnid', 'prepared transactions rolled back and fix the history store entry with checkpoint reserved transaction id'), TxnStat('txn_prepared_updates_committed', 'Number of prepared updates committed'), TxnStat('txn_prepared_updates', 'Number of prepared updates'), TxnStat('txn_prepared_updates_key_repeated', 'Number of prepared updates repeated on the same key'), TxnStat('txn_prepared_updates_rolledback', 'Number of prepared updates rolled back'), TxnStat('txn_query_ts', 'query timestamp calls'), TxnStat('txn_rollback', 'transactions rolled back'), - TxnStat('txn_rollback_oldest_pinned', 'oldest pinned transaction ID rolled back for eviction'), TxnStat('txn_rollback_to_stable_running', 'transaction rollback to stable currently running', 'no_clear,no_scale'), TxnStat('txn_rts', 'rollback to stable calls'), TxnStat('txn_rts_pages_visited', 'rollback to stable pages visited'), @@ -639,7 +619,6 @@ conn_stats = [ ########################################## YieldStat('application_cache_time', 'application thread time waiting for cache (usecs)'), YieldStat('application_evict_time', 'application thread time evicting (usecs)'), - YieldStat('application_evict_snapshot_refreshed', 'application thread snapshot refreshed for eviction'), YieldStat('child_modify_blocked_page', 'page reconciliation yielded due to child modification'), YieldStat('conn_close_blocked_lsm', 'connection close yielded for lsm manager shutdown'), YieldStat('dhandle_lock_blocked', 'data handle lock yielded'), @@ -678,7 +657,6 @@ dsrc_stats = [ # Btree statistics ########################################## BtreeStat('btree_checkpoint_generation', 'btree checkpoint generation', 'no_clear,no_scale'), - BtreeStat('btree_checkpoint_pages_reconciled', 'btree number of pages reconciled during checkpoint', 'no_clear,no_scale'), BtreeStat('btree_clean_checkpoint_timer', 'btree clean tree checkpoint expiration time', 'no_clear,no_scale'), BtreeStat('btree_column_deleted', 'column-store variable-size deleted values', 'no_scale,tree_walk'), BtreeStat('btree_column_fix', 'column-store fixed-size leaf pages', 'no_scale,tree_walk'), @@ -800,6 +778,7 @@ dsrc_stats = [ RecStat('rec_multiblock_max', 'maximum blocks required for a page', 'max_aggregate,no_scale'), RecStat('rec_overflow_key_leaf', 'leaf-page overflow keys'), RecStat('rec_overflow_value', 'overflow values written'), + RecStat('rec_page_match', 'page checksum matches'), RecStat('rec_prefix_compression', 'leaf page key bytes discarded using prefix compression', 'size'), RecStat('rec_suffix_compression', 'internal page key bytes discarded using suffix compression', 'size'), RecStat('rec_time_window_pages_prepared', 'pages written including at least one prepare'), @@ -819,12 +798,6 @@ dsrc_stats = sorted(dsrc_stats, key=attrgetter('desc')) ########################################## conn_dsrc_stats = [ ########################################## - # Autocommit statistics - ########################################## - AutoCommitStat('autocommit_readonly_retry', 'retries for readonly operations'), - AutoCommitStat('autocommit_update_retry', 'retries for update operations'), - - ########################################## # Cache and eviction statistics ########################################## CacheStat('cache_bytes_dirty', 'tracked dirty bytes in the cache', 'no_clear,no_scale,size'), @@ -838,14 +811,12 @@ conn_dsrc_stats = [ CacheStat('cache_eviction_blocked_ooo_checkpoint_race_2', 'eviction gave up due to detecting an out of order tombstone ahead of the selected on disk update'), CacheStat('cache_eviction_blocked_ooo_checkpoint_race_3', 'eviction gave up due to detecting an out of order tombstone ahead of the selected on disk update after validating the update chain'), CacheStat('cache_eviction_blocked_ooo_checkpoint_race_4', 'eviction gave up due to detecting out of order timestamps on the update chain after the selected on disk update'), - CacheStat('cache_eviction_blocked_remove_hs_race_with_checkpoint', 'eviction gave up due to needing to remove a record from the history store but checkpoint is running'), 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_hazard', 'hazard pointer blocked page eviction'), CacheStat('cache_eviction_internal', 'internal pages evicted'), CacheStat('cache_eviction_pages_seen', 'pages seen by eviction walk'), - CacheStat('cache_eviction_random_sample_inmem_root', 'locate a random in-mem ref by examining all entries on the root page'), CacheStat('cache_eviction_split_internal', 'internal pages split during eviction'), CacheStat('cache_eviction_split_leaf', 'leaf pages split during eviction'), CacheStat('cache_eviction_target_page_ge128', 'eviction walk target pages histogram - 128 and higher'), @@ -855,7 +826,6 @@ conn_dsrc_stats = [ CacheStat('cache_eviction_target_page_lt64', 'eviction walk target pages histogram - 32-63'), CacheStat('cache_eviction_target_page_reduced', 'eviction walk target pages reduced due to history store cache pressure'), CacheStat('cache_eviction_walk_from_root', 'eviction walks started from root of tree'), - CacheStat('cache_eviction_walk_random_returns_null_position', 'eviction walks random search fails to locate a page, results in a null position'), CacheStat('cache_eviction_walk_restart', 'eviction walks restarted'), CacheStat('cache_eviction_walk_saved_pos', 'eviction walks started from saved location in tree'), CacheStat('cache_eviction_walks_abandoned', 'eviction walks abandoned'), @@ -902,9 +872,6 @@ conn_dsrc_stats = [ CursorStat('cursor_prev_skip_total', 'Total number of entries skipped by cursor prev calls'), CursorStat('cursor_search_near_prefix_fast_paths', 'Total number of times a search near has exited due to prefix config'), CursorStat('cursor_skip_hs_cur_position', 'Total number of entries skipped to position the history store cursor'), - CursorStat('cursor_tree_walk_del_page_skip', 'Total number of deleted pages skipped during tree walk'), - CursorStat('cursor_tree_walk_inmem_del_page_skip', 'Total number of in-memory deleted pages skipped during tree walk'), - ########################################## # Checkpoint cleanup statistics ########################################## @@ -958,9 +925,7 @@ conn_dsrc_stats = [ # Transaction statistics ########################################## TxnStat('txn_checkpoint_obsolete_applied', 'transaction checkpoints due to obsolete pages'), - TxnStat('txn_checkpoint_snapshot_acquired', 'checkpoint has acquired a snapshot for its transaction'), TxnStat('txn_read_race_prepare_update', 'race to read prepared update retry'), - TxnStat('txn_read_race_prepare_commit', 'a reader raced with a prepared transaction commit and skipped an update or updates'), TxnStat('txn_rts_delete_rle_skipped', 'rollback to stable skipping delete rle'), TxnStat('txn_rts_hs_removed', 'rollback to stable updates removed from history store'), TxnStat('txn_rts_hs_restore_updates', 'rollback to stable restored updates from history store'), @@ -998,7 +963,6 @@ session_stats = [ SessionStat('cache_time', 'time waiting for cache (usecs)'), SessionStat('lock_dhandle_wait', 'dhandle lock wait time (usecs)'), SessionStat('lock_schema_wait', 'schema lock wait time (usecs)'), - SessionStat('txn_bytes_dirty', 'dirty bytes in this txn'), SessionStat('read_time', 'page read from disk to cache time (usecs)'), SessionStat('write_time', 'page write from cache to disk time (usecs)'), ] diff --git a/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_log_system.h b/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_log_system.h index 0f81175a025..e6e8ddf2d5b 100644 --- a/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_log_system.h +++ b/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_log_system.h @@ -39,11 +39,9 @@ // Mapping the desired WiredTiger extension verbosity level to a rough equivalent AWS // SDK verbosity level. static const std::map<int32_t, Aws::Utils::Logging::LogLevel> verbosityMapping = { - {WT_VERBOSE_ERROR, Aws::Utils::Logging::LogLevel::Fatal}, - {WT_VERBOSE_WARNING, Aws::Utils::Logging::LogLevel::Error}, - {WT_VERBOSE_WARNING, Aws::Utils::Logging::LogLevel::Warn}, - {WT_VERBOSE_INFO, Aws::Utils::Logging::LogLevel::Info}, - {WT_VERBOSE_DEBUG, Aws::Utils::Logging::LogLevel::Debug}}; + {-3, Aws::Utils::Logging::LogLevel::Error}, {-2, Aws::Utils::Logging::LogLevel::Warn}, + {-1, Aws::Utils::Logging::LogLevel::Info}, {0, Aws::Utils::Logging::LogLevel::Info}, + {1, Aws::Utils::Logging::LogLevel::Debug}}; // Provides the S3 Store with a logger implementation that redirects the generated logs to // WiredTiger's logging streams. This class implements AWS's LogSystemInterface class, an interface diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index a563fbbea66..a024c61a18b 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-6.0", - "commit": "e17270770075d912e4e456b2cee90407bc306601" + "commit": "c5e905e5bf1c4767bdbeeaf0636e89581c68221d" } diff --git a/src/third_party/wiredtiger/src/block/block_ext.c b/src/third_party/wiredtiger/src/block/block_ext.c index 3406f8526b2..c227d1022f4 100644 --- a/src/third_party/wiredtiger/src/block/block_ext.c +++ b/src/third_party/wiredtiger/src/block/block_ext.c @@ -1100,8 +1100,6 @@ __wt_block_extlist_read( const uint8_t *p; int (*func)(WT_SESSION_IMPL *, WT_BLOCK *, WT_EXTLIST *, wt_off_t, wt_off_t); - off = size = 0; - /* If there isn't a list, we're done. */ if (el->offset == WT_BLOCK_INVALID_OFFSET) return (0); diff --git a/src/third_party/wiredtiger/src/block/block_open.c b/src/third_party/wiredtiger/src/block/block_open.c index 2ad92e845eb..4c445e45e5f 100644 --- a/src/third_party/wiredtiger/src/block/block_open.c +++ b/src/third_party/wiredtiger/src/block/block_open.c @@ -177,6 +177,8 @@ __wt_block_open(WT_SESSION_IMPL *session, const char *filename, uint32_t objecti WT_ERR(__wt_strdup(session, filename, &block->name)); block->objectid = objectid; block->ref = 1; + WT_CONN_BLOCK_INSERT(conn, block, bucket); + block->linked = true; /* If not passed an allocation size, get one from the configuration. */ if (allocsize == 0) { @@ -247,12 +249,6 @@ __wt_block_open(WT_SESSION_IMPL *session, const char *filename, uint32_t objecti if (!forced_salvage) WT_ERR(__desc_read(session, allocsize, block)); - /* - * No errors are possible past this point. So it is safe to make the block visible to other - * sessions. - */ - WT_CONN_BLOCK_INSERT(conn, block, bucket); - block->linked = true; __wt_spin_unlock(session, &conn->block_lock); *blockp = block; diff --git a/src/third_party/wiredtiger/src/block/block_read.c b/src/third_party/wiredtiger/src/block/block_read.c index 82f128a770e..e52dd01e7e0 100644 --- a/src/third_party/wiredtiger/src/block/block_read.c +++ b/src/third_party/wiredtiger/src/block/block_read.c @@ -214,15 +214,13 @@ __wt_block_read_off(WT_SESSION_IMPL *session, WT_BLOCK *block, WT_ITEM *buf, uin if (!F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE)) __wt_errx(session, - "%s: potential hardware corruption, read checksum error for %" PRIu32 - "B block at offset %" PRIuMAX - ": calculated block checksum doesn't match expected checksum", + "%s: read checksum error for %" PRIu32 "B block at offset %" PRIuMAX + ": calculated block checksum doesn't match expected checksum", block->name, size, (uintmax_t)offset); } else if (!F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE)) __wt_errx(session, - "%s: potential hardware corruption, read checksum error for %" PRIu32 - "B block at offset %" PRIuMAX ": block header checksum of %#" PRIx32 - " doesn't match expected checksum of %#" PRIx32, + "%s: read checksum error for %" PRIu32 "B block at offset %" PRIuMAX + ": block header checksum of %#" PRIx32 " doesn't match expected checksum of %#" PRIx32, block->name, size, (uintmax_t)offset, swap.checksum, checksum); if (!F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE)) diff --git a/src/third_party/wiredtiger/src/block/block_write.c b/src/third_party/wiredtiger/src/block/block_write.c index e3522239db3..442d69927f8 100644 --- a/src/third_party/wiredtiger/src/block/block_write.c +++ b/src/third_party/wiredtiger/src/block/block_write.c @@ -39,8 +39,9 @@ __wt_block_truncate(WT_SESSION_IMPL *session, WT_BLOCK *block, wt_off_t len) * backups, which only copies log files, or targeted backups, stops all block truncation * unnecessarily). We may want a more targeted solution at some point. */ - if (conn->hot_backup_start == 0) + if (conn->hot_backup_start == 0) { WT_WITH_HOTBACKUP_READ_LOCK(session, ret = __wt_ftruncate(session, block->fh, len), NULL); + } /* * The truncate may fail temporarily or permanently (for example, there may be a file mapping if @@ -150,12 +151,10 @@ __wt_block_extend(WT_SESSION_IMPL *session, WT_BLOCK *block, WT_FH *fh, wt_off_t } /* - * The extend might fail (for example, the file is mapped into memory or a backup is in - * progress), or discover file extension isn't supported; both are OK. + * The extend might fail (for example, the file is mapped into memory), or discover file + * extension isn't supported; both are OK. */ - if (S2C(session)->hot_backup_start == 0) - WT_WITH_HOTBACKUP_READ_LOCK( - session, ret = __wt_fextend(session, fh, block->extend_size), NULL); + ret = __wt_fextend(session, fh, block->extend_size); return (ret == EBUSY || ret == ENOTSUP ? 0 : ret); } diff --git a/src/third_party/wiredtiger/src/block_cache/block_cache.c b/src/third_party/wiredtiger/src/block_cache/block_cache.c index 64ed2d09ec4..800c65a7ce9 100644 --- a/src/third_party/wiredtiger/src/block_cache/block_cache.c +++ b/src/third_party/wiredtiger/src/block_cache/block_cache.c @@ -588,9 +588,7 @@ __blkcache_init(WT_SESSION_IMPL *session, size_t cache_size, u_int hash_size, u_ __wt_verbose(session, WT_VERB_BLKCACHE, "block cache initialized: type=%s, size=%" WT_SIZET_FMT " path=%s", - (type == BLKCACHE_NVRAM) ? "nvram" : - (type == BLKCACHE_DRAM) ? "dram" : - "unconfigured", + (type == BLKCACHE_NVRAM) ? "nvram" : (type == BLKCACHE_DRAM) ? "dram" : "unconfigured", cache_size, (blkcache->nvram_device_path == NULL) ? "--" : blkcache->nvram_device_path); return (ret); diff --git a/src/third_party/wiredtiger/src/btree/bt_compact.c b/src/third_party/wiredtiger/src/btree/bt_compact.c index 0b7072a168e..86f25af4e19 100644 --- a/src/third_party/wiredtiger/src/btree/bt_compact.c +++ b/src/third_party/wiredtiger/src/btree/bt_compact.c @@ -222,8 +222,6 @@ __compact_walk_internal(WT_SESSION_IMPL *session, WT_REF *parent) WT_REF *ref; bool overall_progress, skipp; - WT_ASSERT(session, F_ISSET(parent, WT_REF_FLAG_INTERNAL)); - ref = NULL; /* [-Wconditional-uninitialized] */ /* @@ -363,15 +361,7 @@ __wt_compact(WT_SESSION_IMPL *session) if (ref == NULL) break; - /* - * The compact walk only flags internal pages for review, but there is a rare case where an - * WT_REF in the WT_REF_DISK state pointing to an internal page, can transition to a leaf - * page when it is being read in. Handle that here, by re-checking the page type now that - * the page is in memory. - */ - if (F_ISSET(ref, WT_REF_FLAG_INTERNAL)) - WT_WITH_PAGE_INDEX(session, ret = __compact_walk_internal(session, ref)); - + WT_WITH_PAGE_INDEX(session, ret = __compact_walk_internal(session, ref)); WT_ERR(ret); } diff --git a/src/third_party/wiredtiger/src/btree/bt_curnext.c b/src/third_party/wiredtiger/src/btree/bt_curnext.c index 9584f0af2e1..234e9d4f38a 100644 --- a/src/third_party/wiredtiger/src/btree/bt_curnext.c +++ b/src/third_party/wiredtiger/src/btree/bt_curnext.c @@ -522,9 +522,6 @@ __cursor_key_order_check_col(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, boo if (cbt->lastrecno == WT_RECNO_OOB || (next && cmp < 0) || (!next && cmp > 0)) { cbt->lastrecno = cbt->recno; - cbt->lastref = cbt->ref; - cbt->lastslot = cbt->slot; - cbt->lastins = cbt->ins; return (0); } @@ -560,12 +557,8 @@ __cursor_key_order_check_row(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, boo if (cbt->lastkey->size != 0) WT_RET(__wt_compare(session, btree->collator, cbt->lastkey, key, &cmp)); - if (cbt->lastkey->size == 0 || (next && cmp < 0) || (!next && cmp > 0)) { - cbt->lastref = cbt->ref; - cbt->lastslot = cbt->slot; - cbt->lastins = cbt->ins; + if (cbt->lastkey->size == 0 || (next && cmp < 0) || (!next && cmp > 0)) return (__wt_buf_set(session, cbt->lastkey, cbt->iface.key.data, cbt->iface.key.size)); - } WT_ERR(__wt_scr_alloc(session, 512, &a)); WT_ERR(__wt_scr_alloc(session, 512, &b)); @@ -617,10 +610,6 @@ __wt_cursor_key_order_init(WT_CURSOR_BTREE *cbt) session = CUR2S(cbt); - cbt->lastref = cbt->ref; - cbt->lastslot = cbt->slot; - cbt->lastins = cbt->ins; - /* * Cursor searches set the position for cursor movements, set the last-key value for diagnostic * checking. @@ -651,10 +640,6 @@ __wt_cursor_key_order_reset(WT_CURSOR_BTREE *cbt) if (cbt->lastkey != NULL) cbt->lastkey->size = 0; cbt->lastrecno = WT_RECNO_OOB; - - cbt->lastref = NULL; - cbt->lastslot = UINT32_MAX; - cbt->lastins = NULL; } #endif @@ -733,7 +718,6 @@ __wt_btcur_next_prefix(WT_CURSOR_BTREE *cbt, WT_ITEM *prefix, bool truncating) WT_CURSOR *cursor; WT_DECL_RET; WT_PAGE *page; - WT_PAGE_WALK_SKIP_STATS walk_skip_stats; WT_SESSION_IMPL *session; size_t total_skipped, skipped; uint32_t flags; @@ -743,8 +727,6 @@ __wt_btcur_next_prefix(WT_CURSOR_BTREE *cbt, WT_ITEM *prefix, bool truncating) prefix_key_out_of_bounds = false; session = CUR2S(cbt); total_skipped = 0; - walk_skip_stats.total_del_pages_skipped = 0; - walk_skip_stats.total_inmem_del_pages_skipped = 0; WT_STAT_CONN_DATA_INCR(session, cursor_next); @@ -854,16 +836,15 @@ __wt_btcur_next_prefix(WT_CURSOR_BTREE *cbt, WT_ITEM *prefix, bool truncating) LF_SET(WT_READ_VISIBLE_ALL); /* - * If we are running with snapshot isolation, have a snapshot, and are not interested in - * returning tombstones, we could potentially skip pages. The skip function looks at the - * aggregated timestamp information to determine if something is visible on the page. If - * nothing is, the page is skipped. + * If we are running with snapshot isolation, and not interested in returning tombstones, we + * could potentially skip pages. The skip function looks at the aggregated timestamp + * information to determine if something is visible on the page. If nothing is, the page is + * skipped. */ if (session->txn->isolation == WT_ISO_SNAPSHOT && - F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT) && !F_ISSET(&cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE)) - WT_ERR(__wt_tree_walk_custom_skip( - session, &cbt->ref, __wt_btcur_skip_page, &walk_skip_stats, flags)); + WT_ERR( + __wt_tree_walk_custom_skip(session, &cbt->ref, __wt_btcur_skip_page, NULL, flags)); else WT_ERR(__wt_tree_walk(session, &cbt->ref, flags)); WT_ERR_TEST(cbt->ref == NULL, WT_NOTFOUND, false); @@ -876,12 +857,6 @@ err: WT_STAT_CONN_DATA_INCR(session, cursor_next_skip_ge_100); WT_STAT_CONN_DATA_INCRV(session, cursor_next_skip_total, total_skipped); - if (walk_skip_stats.total_del_pages_skipped != 0) - WT_STAT_CONN_DATA_INCRV( - session, cursor_tree_walk_del_page_skip, walk_skip_stats.total_del_pages_skipped); - if (walk_skip_stats.total_inmem_del_pages_skipped != 0) - WT_STAT_CONN_DATA_INCRV(session, cursor_tree_walk_inmem_del_page_skip, - walk_skip_stats.total_inmem_del_pages_skipped); switch (ret) { case 0: diff --git a/src/third_party/wiredtiger/src/btree/bt_curprev.c b/src/third_party/wiredtiger/src/btree/bt_curprev.c index cb0d59f8ba8..ce9a49986a7 100644 --- a/src/third_party/wiredtiger/src/btree/bt_curprev.c +++ b/src/third_party/wiredtiger/src/btree/bt_curprev.c @@ -34,7 +34,7 @@ static inline int __cursor_skip_prev(WT_CURSOR_BTREE *cbt) { - WT_INSERT *current, *ins, *next_ins; + WT_INSERT *current, *ins; WT_ITEM key; WT_SESSION_IMPL *session; uint64_t recno; @@ -82,14 +82,7 @@ restart: for (; i >= 0; i--) { cbt->ins_stack[i] = NULL; cbt->next_stack[i] = NULL; - /* - * Compiler may replace the usage of the variable with another read in the following - * code. Here we don't need to worry about CPU reordering as we are reading a thread - * local value. - * - * Place a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ins, cbt->ins_head->head[i]); + ins = cbt->ins_head->head[i]; if (ins != NULL && ins != current) break; } @@ -105,22 +98,11 @@ restart: cbt->next_stack[0] = NULL; goto restart; } - /* - * CPUs with weak memory ordering may reorder the read and return a stale value. This can - * lead us to wrongly skip a value in the lower levels of the skip list. - * - * For example, if we have A -> C initially for both level 0 and level 1 and we concurrently - * insert B into both level 0 and level 1. If B is visible on level 1 to this thread, it - * must also be visible on level 0. Otherwise, we would record an inconsistent stack. - * - * Place a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(next_ins, ins->next[i]); - if (next_ins != current) /* Stay at this level */ - ins = next_ins; + if (ins->next[i] != current) /* Stay at this level */ + ins = ins->next[i]; else { /* Drop down a level */ - cbt->next_stack[i] = next_ins; cbt->ins_stack[i] = &ins->next[i]; + cbt->next_stack[i] = ins->next[i]; --i; } } @@ -675,7 +657,6 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating) WT_CURSOR *cursor; WT_DECL_RET; WT_PAGE *page; - WT_PAGE_WALK_SKIP_STATS walk_skip_stats; WT_SESSION_IMPL *session; size_t total_skipped, skipped; uint32_t flags; @@ -684,8 +665,6 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating) cursor = &cbt->iface; session = CUR2S(cbt); total_skipped = 0; - walk_skip_stats.total_del_pages_skipped = 0; - walk_skip_stats.total_inmem_del_pages_skipped = 0; WT_STAT_CONN_DATA_INCR(session, cursor_prev); @@ -795,17 +774,16 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating) LF_SET(WT_READ_VISIBLE_ALL); /* - * If we are running with snapshot isolation, have a snapshot, and are not interested in - * returning tombstones, we could potentially skip pages. The skip function looks at the - * aggregated timestamp information to determine if something is visible on the page. If - * nothing is, the page is skipped. + * If we are running with snapshot isolation, and not interested in returning tombstones, we + * could potentially skip pages. The skip function looks at the aggregated timestamp + * information to determine if something is visible on the page. If nothing is, the page is + * skipped. */ if (!F_ISSET(&cbt->iface, WT_CURSTD_KEY_ONLY) && session->txn->isolation == WT_ISO_SNAPSHOT && - F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT) && !F_ISSET(&cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE)) - WT_ERR(__wt_tree_walk_custom_skip( - session, &cbt->ref, __wt_btcur_skip_page, &walk_skip_stats, flags)); + WT_ERR( + __wt_tree_walk_custom_skip(session, &cbt->ref, __wt_btcur_skip_page, NULL, flags)); else WT_ERR(__wt_tree_walk(session, &cbt->ref, flags)); WT_ERR_TEST(cbt->ref == NULL, WT_NOTFOUND, false); @@ -818,12 +796,6 @@ err: WT_STAT_CONN_DATA_INCR(session, cursor_prev_skip_ge_100); WT_STAT_CONN_DATA_INCRV(session, cursor_prev_skip_total, total_skipped); - if (walk_skip_stats.total_del_pages_skipped != 0) - WT_STAT_CONN_DATA_INCRV( - session, cursor_tree_walk_del_page_skip, walk_skip_stats.total_del_pages_skipped); - if (walk_skip_stats.total_inmem_del_pages_skipped != 0) - WT_STAT_CONN_DATA_INCRV(session, cursor_tree_walk_inmem_del_page_skip, - walk_skip_stats.total_inmem_del_pages_skipped); switch (ret) { case 0: diff --git a/src/third_party/wiredtiger/src/btree/bt_cursor.c b/src/third_party/wiredtiger/src/btree/bt_cursor.c index de2ac1c3148..ec82ae02241 100644 --- a/src/third_party/wiredtiger/src/btree/bt_cursor.c +++ b/src/third_party/wiredtiger/src/btree/bt_cursor.c @@ -95,12 +95,8 @@ __cursor_page_pinned(WT_CURSOR_BTREE *cbt, bool search_operation) /* * Fail if the page is flagged for forced eviction (so we periodically release pages grown too * large). - * - * If we are resolving a prepared transaction we cannot release the page otherwise validating - * whether we correctly resolved the transaction becomes hard. It is easier to skip this check - * in that instance. */ - if (cbt->ref->page->read_gen == WT_READGEN_OLDEST && !F_ISSET(session->txn, WT_TXN_PREPARE)) + if (cbt->ref->page->read_gen == WT_READGEN_OLDEST) return (false); return (true); @@ -457,9 +453,6 @@ __wt_btcur_reset(WT_CURSOR_BTREE *cbt) WT_STAT_CONN_DATA_INCR(session, cursor_reset); F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET); - /* Initialize the update value as we are not pointing to any value. */ - cbt->upd_value->type = WT_UPDATE_INVALID; - WT_TIME_WINDOW_INIT(&cbt->upd_value->tw); return (__cursor_reset(cbt)); } @@ -473,41 +466,33 @@ __wt_btcur_search_prepared(WT_CURSOR *cursor, WT_UPDATE **updp) { WT_BTREE *btree; WT_CURSOR_BTREE *cbt; - WT_DECL_RET; WT_UPDATE *upd; - *updp = upd = NULL; /* -Wuninitialized */ + *updp = NULL; + cbt = (WT_CURSOR_BTREE *)cursor; btree = CUR2BT(cbt); - WT_UNUSED(ret); + upd = NULL; /* -Wuninitialized */ /* - * Set the key only flag to indicate to the search that we don't want to check visibility we - * just want to position on a key. This short circuits validity checking. + * Not calling the cursor initialization functions, we don't want to be tapped for eviction nor + * do we want other standard cursor semantics like snapshots, just discard the hazard pointer + * from the last operation. This also depends on the fact we're not setting the cursor's active + * flag, this is really a special chunk of code and not to be modified without careful thought. */ - F_SET(&cbt->iface, WT_CURSTD_KEY_ONLY); - /* - * The search logic searches the pinned page first, which would be the previously resolved - * update chain's page. If that doesn't find the key we want it searches from the root. - */ - ret = __wt_btcur_search(cbt); - F_CLR(&cbt->iface, WT_CURSTD_KEY_ONLY); + WT_RET(__cursor_reset(cbt)); + + WT_RET(btree->type == BTREE_ROW ? __cursor_row_search(cbt, false, NULL, NULL) : + __cursor_col_search(cbt, NULL, NULL)); + /* - * The following assertion relies on the fact that for every prepared update there must be an - * associated key. However this is only true if we pin the page to prevent eviction. By calling - * into the standard search function we avoid releasing our hazard pointer between update chain - * resolutions. It also depends on sorting the transaction modifications by key, if we didn't do - * that we would unpin the page between searches and later come back to the same key. We rely on - * resolving all updates for a single key in sequence. - * - * This is a complex scenario, suppose we have two updates to the same key by our transaction, - * and are resolving the prepared updates. The first pass resolves the update chain, now if we - * let eviction run it could evict the page and it will treat the update chain as a regular non - * prepared update chain. If we were rolling back the transaction the key may not exist after - * eviction, similarly if we wrote a globally visible tombstone. Thus our second attempt at - * resolution would fail as it wouldn't find a key. + * Ideally an exact match will be found, as this transaction is searching for updates done by + * itself. But, we cannot be sure of finding one, as pre-processing of the updates could have + * happened as part of resolving earlier transaction operations. */ - WT_ASSERT(CUR2S(cursor), ret == 0); + if (cbt->compare != 0) + return (0); + /* Get any uncommitted update from the in-memory page. */ switch (btree->type) { case BTREE_ROW: @@ -1934,16 +1919,9 @@ __wt_btcur_open(WT_CURSOR_BTREE *cbt) cbt->modify_update = &cbt->_modify_update; cbt->upd_value = &cbt->_upd_value; - /* Initialize the value. */ - cbt->upd_value->type = WT_UPDATE_INVALID; - WT_TIME_WINDOW_INIT(&cbt->upd_value->tw); - #ifdef HAVE_DIAGNOSTIC cbt->lastkey = &cbt->_lastkey; cbt->lastrecno = WT_RECNO_OOB; - cbt->lastref = NULL; - cbt->lastslot = UINT32_MAX; - cbt->lastins = NULL; #endif } diff --git a/src/third_party/wiredtiger/src/btree/bt_delete.c b/src/third_party/wiredtiger/src/btree/bt_delete.c index 8d13bf6f974..1edd7afd169 100644 --- a/src/third_party/wiredtiger/src/btree/bt_delete.c +++ b/src/third_party/wiredtiger/src/btree/bt_delete.c @@ -14,15 +14,13 @@ * This file contains most of the code that allows WiredTiger to delete pages of data without * reading them into the cache. (This feature is currently only available for row-store objects.) * - * The way session truncate works in a row-store object is it explicitly reads the first and last + * The way cursor truncate works in a row-store object is it explicitly reads the first and last * pages of the truncate range, then walks the tree with a flag so the tree walk code skips reading * eligible pages within the range and instead just marks them as deleted, by changing their WT_REF - * state to WT_REF_DELETED. Pages ineligible for this fast path include pages that are already in - * the cache and can not be evicted, records in the pages that are not visible to the transaction, - * pages containing overflow items, pages containing prepared values, or pages that belong to FLCS - * trees. Ineligible pages are read and have their rows updated/deleted individually. The - * transaction for the delete operation is stored in memory referenced by the WT_REF.ft_info.del - * field. + * state to WT_REF_DELETED. Pages ineligible for this fast path include pages already in the cache, + * having overflow items, or requiring history store records. Ineligible pages are read and have + * their rows updated/deleted individually. The transaction for the delete operation is stored in + * memory referenced by the WT_REF.ft_info.del field. * * Future cursor walks of the tree will skip the deleted page based on the transaction stored for * the delete, but it gets more complicated if a read is done using a random key, or a cursor walk @@ -33,16 +31,16 @@ * was read and each individual row deleted, exactly as would have happened if the page had been in * the cache all along. * - * There's an additional complication to support transaction rollback of the page delete. When the - * page was marked deleted, a pointer to the WT_REF was saved in the deleting session's transaction - * list and the delete is unrolled by resetting the WT_REF_DELETED state back to WT_REF_DISK. - * However, if the page has been instantiated by some reading thread, that's not enough, each - * individual row on the page must have the delete operation reset. If the page split, the WT_UPDATE - * lists might have been saved/restored during reconciliation and appear on multiple pages, and the - * WT_REF stored in the deleting session's transaction list is no longer useful. For this reason, - * when the page is instantiated by a read, a list of the WT_UPDATE structures on the page is stored - * in the WT_REF.ft_info.update field, that way the session resolving the delete can find all - * WT_UPDATE structures that require update. + * There's an additional complication to support rollback of the page delete. When the page was + * marked deleted, a pointer to the WT_REF was saved in the deleting session's transaction list and + * the delete is unrolled by resetting the WT_REF_DELETED state back to WT_REF_DISK. However, if the + * page has been instantiated by some reading thread, that's not enough, each individual row on the + * page must have the delete operation reset. If the page split, the WT_UPDATE lists might have been + * saved/restored during reconciliation and appear on multiple pages, and the WT_REF stored in the + * deleting session's transaction list is no longer useful. For this reason, when the page is + * instantiated by a read, a list of the WT_UPDATE structures on the page is stored in the + * WT_REF.ft_info.update field, that way the session resolving the delete can find all WT_UPDATE + * structures that require update. * * One final note: pages can also be marked deleted if emptied and evicted. In that case, the WT_REF * state will be set to WT_REF_DELETED but there will not be any associated WT_REF.ft_info.del @@ -116,8 +114,7 @@ __wt_delete_page(WT_SESSION_IMPL *session, WT_REF *ref, bool *skipp) goto err; if (addr.ta.prepare) goto err; - if (!__wt_txn_snap_min_visible(session, addr.ta.newest_txn, - WT_MAX(addr.ta.newest_start_durable_ts, addr.ta.newest_stop_durable_ts), + if (!__wt_txn_visible(session, addr.ta.newest_txn, WT_MAX(addr.ta.newest_start_durable_ts, addr.ta.newest_stop_durable_ts))) goto err; diff --git a/src/third_party/wiredtiger/src/btree/bt_discard.c b/src/third_party/wiredtiger/src/btree/bt_discard.c index e31cd7d29ea..fcabc73ac45 100644 --- a/src/third_party/wiredtiger/src/btree/bt_discard.c +++ b/src/third_party/wiredtiger/src/btree/bt_discard.c @@ -165,13 +165,6 @@ __free_page_modify(WT_SESSION_IMPL *session, WT_PAGE *page) break; } __wt_free(session, multi->supd); - /* - * Discard the new disk images if they are not NULL. If the new disk images are NULL, - * they must have been instantiated into memory. Otherwise, we have a failure in - * eviction after reconciliation. If the split code only successfully instantiates a - * subset of new pages into memory, free the instantiated pages and the new disk images - * of the pages not in memory. We will redo reconciliation next time we visit this page. - */ __wt_free(session, multi->disk_image); __wt_free(session, multi->addr.addr); } @@ -181,16 +174,8 @@ __free_page_modify(WT_SESSION_IMPL *session, WT_PAGE *page) /* * Discard any replacement address: this memory is usually moved into the parent's WT_REF, * but at the root that can't happen. - * - * Discard the new disk image if it is not NULL. If the new disk image is NULL, it must have - * been instantiated into memory. Otherwise, we have a failure in eviction after - * reconciliation and later we decide to discard the old disk image without loading the new - * disk image into memory. Free the new disk image in this case. If a checkpoint visits this - * page, it would write the new disk image even it hasn't been instantiated into memory. - * Therefore, no need to reconcile the page again if it remains clean. */ __wt_free(session, mod->mod_replace.addr); - __wt_free(session, mod->mod_disk_image); break; } @@ -230,40 +215,12 @@ __free_page_modify(WT_SESSION_IMPL *session, WT_PAGE *page) __wt_ovfl_discard_free(session, page); __wt_free(session, page->modify->ovfl_track); - __wt_free(session, page->modify->stop_ta); __wt_spin_destroy(session, &page->modify->page_lock); __wt_free(session, page->modify); } /* - * __ref_addr_safe_free -- - * Any thread that is reviewing the address in a WT_REF, must also be holding a split generation - * to ensure that the page index they are using remains valid. Utilize the same generation type - * to safely free the address once all users of it have left the generation. - */ -static void -__ref_addr_safe_free(WT_SESSION_IMPL *session, void *ref_addr) -{ - WT_DECL_RET; - uint64_t split_gen; - - /* - * The reading thread is always inside a split generation when it reads the ref, so we make use - * of WT_GEN_SPLIT type generation mechanism to protect the address in a WT_REF rather than - * creating a whole new generation counter. There are no page splits taking place. - */ - split_gen = __wt_gen(session, WT_GEN_SPLIT); - WT_TRET(__wt_stash_add( - session, WT_GEN_SPLIT, split_gen, ((WT_ADDR *)ref_addr)->addr, ((WT_ADDR *)ref_addr)->size)); - WT_TRET(__wt_stash_add(session, WT_GEN_SPLIT, split_gen, ref_addr, sizeof(WT_ADDR))); - __wt_gen_next(session, WT_GEN_SPLIT, NULL); - - if (ret != 0) - WT_IGNORE_RET(__wt_panic(session, ret, "fatal error during ref address free")); -} - -/* * __wt_ref_addr_free -- * Free the address in a reference, if necessary. */ @@ -283,8 +240,10 @@ __wt_ref_addr_free(WT_SESSION_IMPL *session, WT_REF *ref) return; } while (!__wt_atomic_cas_ptr(&ref->addr, ref_addr, NULL)); - if (ref->home == NULL || __wt_off_page(ref->home, ref_addr)) - __ref_addr_safe_free(session, ref_addr); + if (ref->home == NULL || __wt_off_page(ref->home, ref_addr)) { + __wt_free(session, ((WT_ADDR *)ref_addr)->addr); + __wt_free(session, ref_addr); + } } /* diff --git a/src/third_party/wiredtiger/src/btree/bt_page.c b/src/third_party/wiredtiger/src/btree/bt_page.c index e30326efff1..bdc946a18a5 100644 --- a/src/third_party/wiredtiger/src/btree/bt_page.c +++ b/src/third_party/wiredtiger/src/btree/bt_page.c @@ -132,7 +132,6 @@ __page_inmem_prepare_update(WT_SESSION_IMPL *session, WT_ITEM *value, WT_CELL_UN WT_UPDATE *upd, *tombstone; size_t size, total_size; - size = 0; *sizep = 0; tombstone = upd = NULL; @@ -316,11 +315,6 @@ __wt_page_inmem_prepare(WT_SESSION_IMPL *session, WT_REF *ref) } } - /* - * The data is written to the disk so we can mark the page clean after re-instantiating prepared - * updates to avoid reconciling the page every time. - */ - __wt_page_modify_clear(session, page); __wt_cache_page_inmem_incr(session, page, total_size); if (0) { diff --git a/src/third_party/wiredtiger/src/btree/bt_random.c b/src/third_party/wiredtiger/src/btree/bt_random.c index 7f5db6acffb..25cf73fc0b9 100644 --- a/src/third_party/wiredtiger/src/btree/bt_random.c +++ b/src/third_party/wiredtiger/src/btree/bt_random.c @@ -106,11 +106,14 @@ static int __random_leaf_skip(WT_CURSOR_BTREE *cbt, WT_INSERT_HEAD *ins_head, uint32_t entries, bool *validp) { WT_INSERT *ins, *saved_ins; + WT_SESSION_IMPL *session; uint32_t i; int retry; *validp = false; + session = CUR2S(cbt); + /* This is a relatively expensive test, try a few times then quit. */ for (retry = 0; retry < WT_RANDOM_SKIP_RETRY; ++retry) { /* @@ -118,7 +121,7 @@ __random_leaf_skip(WT_CURSOR_BTREE *cbt, WT_INSERT_HEAD *ins_head, uint32_t entr * records before our target so we can look around in case our chosen record isn't valid. */ saved_ins = NULL; - i = __wt_random(&cbt->rnd) % entries; + i = __wt_random(&session->rnd) % entries; for (ins = WT_SKIP_FIRST(ins_head); ins != NULL; ins = WT_SKIP_NEXT(ins)) { if (--i == 0) break; @@ -162,11 +165,13 @@ __random_leaf_insert(WT_CURSOR_BTREE *cbt, bool *validp) { WT_INSERT_HEAD *ins_head; WT_PAGE *page; + WT_SESSION_IMPL *session; uint32_t entries, slot, start; *validp = false; page = cbt->ref->page; + session = CUR2S(cbt); /* Check for a large insert list with no items, that's common when tables are newly created. */ ins_head = WT_ROW_INSERT_SMALLEST(page); @@ -183,7 +188,7 @@ __random_leaf_insert(WT_CURSOR_BTREE *cbt, bool *validp) * decrease the required number of records required to select from the list. */ if (page->entries > 0) { - start = __wt_random(&cbt->rnd) % page->entries; + start = __wt_random(&session->rnd) % page->entries; for (slot = start; slot < page->entries; ++slot) { ins_head = WT_ROW_INSERT(page, &page->pg_row[slot]); entries = __random_skip_entries(cbt, ins_head); @@ -238,7 +243,7 @@ __random_leaf_disk(WT_CURSOR_BTREE *cbt, bool *validp) /* This is a relatively cheap test, so try several times. */ for (retry = 0; retry < WT_RANDOM_DISK_RETRY; ++retry) { - slot = __wt_random(&cbt->rnd) % entries; + slot = __wt_random(&session->rnd) % entries; WT_RET(__wt_row_leaf_key(session, page, page->pg_row + slot, cbt->tmp, false)); WT_RET(__random_slot_valid(cbt, slot, validp)); if (*validp) @@ -310,7 +315,7 @@ __random_leaf(WT_CURSOR_BTREE *cbt) __cursor_pos_clear(cbt); cbt->slot = 0; next = true; /* Forward from the beginning of the page. */ - for (i = __wt_random(&cbt->rnd) % WT_RANDOM_CURSOR_MOVE;;) { + for (i = __wt_random(&session->rnd) % WT_RANDOM_CURSOR_MOVE;;) { ret = next ? __wt_btcur_next(cbt, false) : __wt_btcur_prev(cbt, false); if (ret == WT_NOTFOUND) { next = !next; /* Reverse direction. */ @@ -334,7 +339,7 @@ __random_leaf(WT_CURSOR_BTREE *cbt) if (WT_DATA_IN_ITEM(cbt->tmp) && cursor->key.size == cbt->tmp->size && memcmp(cursor->key.data, cbt->tmp->data, cbt->tmp->size) == 0) { cbt->tmp->size = 0; - i = __wt_random(&cbt->rnd) % WT_RANDOM_CURSOR_MOVE; + i = __wt_random(&session->rnd) % WT_RANDOM_CURSOR_MOVE; } else { WT_RET(__wt_buf_set(session, cbt->tmp, cursor->key.data, cursor->key.size)); break; @@ -346,58 +351,25 @@ __random_leaf(WT_CURSOR_BTREE *cbt) } /* - * __random_root_inmem_ref -- - * Return a random in-mem ref from a root page by applying reservoir sampling. - */ -static void -__random_root_inmem_ref( - WT_SESSION_IMPL *session, WT_REF *current, WT_REF **refp, WT_RAND_STATE *rnd) -{ - WT_REF *ref, *ref_inmem; - uint64_t cnt; - - cnt = 0; - ref_inmem = NULL; - - WT_ASSERT(session, __wt_ref_is_root(current)); - - WT_STAT_CONN_INCR(session, cache_eviction_random_sample_inmem_root); - WT_STAT_DATA_INCR(session, cache_eviction_random_sample_inmem_root); - - WT_INTL_FOREACH_BEGIN (session, current->page, ref) - if (ref->state == WT_REF_MEM) { - cnt++; - if ((__wt_random(rnd) % cnt) == 0) - ref_inmem = ref; - } - WT_INTL_FOREACH_END; - - if (cnt != 0) - *refp = ref_inmem; -} - -/* * __wt_random_descent -- * Find a random page in a tree for either sampling or eviction. */ int -__wt_random_descent(WT_SESSION_IMPL *session, WT_REF **refp, uint32_t flags, WT_RAND_STATE *rnd) +__wt_random_descent(WT_SESSION_IMPL *session, WT_REF **refp, uint32_t flags) { WT_BTREE *btree; WT_DECL_RET; WT_PAGE *page; WT_PAGE_INDEX *pindex; WT_REF *current, *descent; - uint32_t i, entries; - int retry; - bool eviction, sample_inmem_page; + uint32_t i, entries, retry; + bool eviction; *refp = NULL; btree = S2BT(session); current = NULL; retry = 100; - sample_inmem_page = false; /* * This function is called by eviction to find a random page in the cache. That case is * indicated by the WT_READ_CACHE flag. Ordinary lookups in a tree will read pages into cache as @@ -425,9 +397,7 @@ restart: /* Eviction just wants any random child. */ if (eviction) { - descent = pindex->index[__wt_random(rnd) % entries]; - if (sample_inmem_page && __wt_ref_is_root(current)) - __random_root_inmem_ref(session, current, &descent, rnd); + descent = pindex->index[__wt_random(&session->rnd) % entries]; goto descend; } @@ -442,7 +412,7 @@ restart: */ descent = NULL; for (i = 0; i < entries; ++i) { - descent = pindex->index[__wt_random(rnd) % entries]; + descent = pindex->index[__wt_random(&session->rnd) % entries]; if (descent->state == WT_REF_DISK || descent->state == WT_REF_MEM) break; } @@ -479,17 +449,10 @@ descend: } /* - * There is no point starting with the root page: continue attempting the process until we - * encounter a non-root page. + * There is no point starting with the root page: the walk will exit immediately. In that case + * we aren't holding a hazard pointer so there is nothing to release. */ - if (eviction && __wt_ref_is_root(current)) { - if (--retry > 0) - goto restart; - else if (S2C(session)->evict_sample_inmem && !sample_inmem_page) { - sample_inmem_page = true; - goto restart; - } - } else + if (!eviction || !__wt_ref_is_root(current)) *refp = current; return (0); } @@ -544,8 +507,7 @@ __wt_btcur_next_random(WT_CURSOR_BTREE *cbt) */ if (cbt->ref == NULL || cbt->next_random_sample_size == 0) { WT_ERR(__wt_cursor_func_init(cbt, true)); - WT_WITH_PAGE_INDEX( - session, ret = __wt_random_descent(session, &cbt->ref, read_flags, &cbt->rnd)); + WT_WITH_PAGE_INDEX(session, ret = __wt_random_descent(session, &cbt->ref, read_flags)); if (ret == 0) { WT_ERR(__random_leaf(cbt)); return (0); diff --git a/src/third_party/wiredtiger/src/btree/bt_read.c b/src/third_party/wiredtiger/src/btree/bt_read.c index 469b164c591..6c771be480a 100644 --- a/src/third_party/wiredtiger/src/btree/bt_read.c +++ b/src/third_party/wiredtiger/src/btree/bt_read.c @@ -326,21 +326,9 @@ read: evict_skip = true; else if (ret == EBUSY) { WT_NOT_READ(ret, 0); - /* - * Don't back off if the session is configured not to do reconciliation, that - * just wastes time for no benefit. Without this check a reconciliation of a - * page that requires writing content to the history store can stall trying to - * force-evict a history store page when there is no chance it will be evicted. - */ - - if (F_ISSET(session, WT_SESSION_NO_RECONCILE)) { - WT_STAT_CONN_INCR(session, cache_eviction_force_no_retry); - evict_skip = true; - } else { - WT_STAT_CONN_INCR(session, page_forcible_evict_blocked); - stalled = true; - break; - } + WT_STAT_CONN_INCR(session, page_forcible_evict_blocked); + stalled = true; + break; } WT_RET(ret); diff --git a/src/third_party/wiredtiger/src/btree/bt_slvg.c b/src/third_party/wiredtiger/src/btree/bt_slvg.c index 644ac67aa4d..84060a74748 100644 --- a/src/third_party/wiredtiger/src/btree/bt_slvg.c +++ b/src/third_party/wiredtiger/src/btree/bt_slvg.c @@ -122,7 +122,7 @@ struct __wt_track { static int __slvg_cleanup(WT_SESSION_IMPL *, WT_STUFF *); static int __slvg_col_build_internal(WT_SESSION_IMPL *, uint32_t, WT_STUFF *); static int __slvg_col_build_leaf(WT_SESSION_IMPL *, WT_TRACK *, WT_REF *); -static int __slvg_col_ovfl(WT_SESSION_IMPL *, WT_TRACK *, WT_PAGE *); +static int __slvg_col_ovfl(WT_SESSION_IMPL *, WT_TRACK *, WT_PAGE *, uint64_t, uint64_t, uint64_t); static int __slvg_col_range(WT_SESSION_IMPL *, WT_STUFF *); static void __slvg_col_range_missing(WT_SESSION_IMPL *, WT_STUFF *); static int __slvg_col_range_overlap(WT_SESSION_IMPL *, uint32_t, uint32_t, WT_STUFF *); @@ -670,7 +670,7 @@ __slvg_trk_leaf(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, uint8_t *ad __wt_addr_string(session, trk->trk_addr, trk->trk_addr_size, ss->tmp1), trk->col_start, trk->col_stop); - /* VLCS pages can contain overflow items. */ + /* Column-store pages can contain overflow items. */ WT_ERR(__slvg_trk_leaf_ovfl(session, dsk, trk)); break; case WT_PAGE_ROW_LEAF: @@ -1269,17 +1269,12 @@ err: static int __slvg_col_build_leaf(WT_SESSION_IMPL *session, WT_TRACK *trk, WT_REF *ref) { - WT_BTREE *btree; WT_COL *save_col_var; WT_DECL_RET; WT_PAGE *page; WT_SALVAGE_COOKIE *cookie, _cookie; uint64_t recno, skip, take; uint32_t save_entries; - int (*saved_free)(WT_BM *, WT_SESSION_IMPL *, const uint8_t *, size_t); - - btree = S2BT(session); - saved_free = NULL; cookie = &_cookie; WT_CLEAR(*cookie); @@ -1305,7 +1300,7 @@ __slvg_col_build_leaf(WT_SESSION_IMPL *session, WT_TRACK *trk, WT_REF *ref) /* Set the referenced flag on overflow pages we're using. */ if (trk->trk_ovfl_cnt != 0) - WT_ERR(__slvg_col_ovfl(session, trk, page)); + WT_ERR(__slvg_col_ovfl(session, trk, page, recno, skip, take)); /* * If we're missing some part of the range, the real start range is in trk->col_missing, else, @@ -1331,20 +1326,6 @@ __slvg_col_build_leaf(WT_SESSION_IMPL *session, WT_TRACK *trk, WT_REF *ref) */ __wt_ref_addr_free(session, ref); - /* - * Reconciliation may skip a key/value pair (based on timestamps), and in that case, if the - * value is an overflow item, reconciliation will free the underlying object's backing blocks. - * Additionally, salvage of a column-store page can have start/stop points in the middle of a - * cell, and reconciliation therefore does all of the usual processing of cells, but skips the - * write if they're outside the salvage range. If the value is an overflow item and it's never - * used, reconciliation will free the underlying object's backing blocks, which is fine, but we - * need to adjust our list of overflow blocks so we don't free the overflow item twice. - * Intercept any attempt by reconciliation to free blocks. - */ - saved_free = btree->bm->free; - btree->bm->free = __slvg_reconcile_free; - session->salvage_track = trk; - /* Write the new version of the leaf page to disk. */ WT_ERR(__slvg_modify_init(session, page)); WT_ERR(__wt_reconcile(session, ref, cookie, WT_REC_VISIBILITY_ERR)); @@ -1362,10 +1343,6 @@ __slvg_col_build_leaf(WT_SESSION_IMPL *session, WT_TRACK *trk, WT_REF *ref) err: WT_TRET(__wt_page_release(session, ref, 0)); } - if (saved_free != NULL) { - btree->bm->free = saved_free; - session->salvage_track = NULL; - } return (ret); } @@ -1399,41 +1376,57 @@ __slvg_col_ovfl_single(WT_SESSION_IMPL *session, WT_TRACK *trk, WT_CELL_UNPACK_K * Mark overflow items referenced by the merged page. */ static int -__slvg_col_ovfl(WT_SESSION_IMPL *session, WT_TRACK *trk, WT_PAGE *page) +__slvg_col_ovfl(WT_SESSION_IMPL *session, WT_TRACK *trk, WT_PAGE *page, uint64_t recno, + uint64_t skip, uint64_t take) { WT_CELL *cell; WT_CELL_UNPACK_KV unpack; WT_COL *cip; WT_DECL_RET; + uint64_t start, stop; uint32_t i; /* - * Reconciliation of a salvaged column-store page processes all of the page's cells, skipping - * the write if a cell is outside the salvage range. If the value is an overflow item and it's - * never used, reconciliation will free the underlying object's backing blocks. We'll set up a - * callback to track the blocks that are freed, mark all page overflow values as "referenced" so - * that tracking succeeds. + * Merging a variable-length column-store page, and we took some number of records, figure out + * which (if any) overflow records we used. */ + start = recno + skip; + stop = (recno + skip + take) - 1; + WT_COL_FOREACH (page, cip, i) { cell = WT_COL_PTR(page, cip); __wt_cell_unpack_kv(session, page->dsk, cell, &unpack); - if (unpack.type != WT_CELL_VALUE_OVFL) - continue; + recno += __wt_cell_rle(&unpack); /* - * When handling overlapping ranges on variable-length column-store leaf pages, we split - * ranges without considering if we were splitting RLE units. (See note at the beginning of - * this file for explanation of the overall process.) If the RLE unit was on-page, we can - * simply write it again. If the RLE unit was an overflow value that's already been used by - * another row (from some other page created by a range split), there's not much to do, this - * row can't reference an overflow record we don't have: delete the row. + * I keep getting this calculation wrong, so here's the logic. Start is the first record we + * want, stop is the last record we want. The record number has already been incremented one + * past the maximum record number for this page entry, that is, it's set to the first record + * number for the next page entry. The test of start should be greater-than (not + * greater-than- or-equal), because of that increment, if the record number equals start, we + * want the next record, not this one. The test against stop is greater-than, not + * greater-than-or-equal because stop is the last record wanted, if the record number equals + * stop, we want the next record. */ - ret = __slvg_col_ovfl_single(session, trk, &unpack); - if (ret == EBUSY) { - __wt_cell_type_reset(session, cell, WT_CELL_VALUE_OVFL, WT_CELL_DEL); - ret = 0; + if (recno > start && unpack.type == WT_CELL_VALUE_OVFL) { + ret = __slvg_col_ovfl_single(session, trk, &unpack); + + /* + * When handling overlapping ranges on variable-length column-store leaf pages, we split + * ranges without considering if we were splitting RLE units. (See note at the beginning + * of this file for explanation of the overall process.) If the RLE unit was on-page, we + * can simply write it again. If the RLE unit was an overflow value that's already been + * used by another row (from some other page created by a range split), there's not much + * to do, this row can't reference an overflow record we don't have: delete the row. + */ + if (ret == EBUSY) { + __wt_cell_type_reset(session, cell, WT_CELL_VALUE_OVFL, WT_CELL_DEL); + ret = 0; + } + WT_RET(ret); } - WT_RET(ret); + if (recno > stop) + break; } return (0); } @@ -2108,7 +2101,8 @@ __slvg_reconcile_free(WT_BM *bm, WT_SESSION_IMPL *session, const uint8_t *addr, } } - WT_RET_PANIC(session, EINVAL, "overflow record discarded during page reconciliation not %s", + WT_RET_PANIC(session, EINVAL, + "overflow record discarded by reconciliation during row-store page merge not %s", i == trk->trk_ovfl_cnt ? "referenced" : "found"); } diff --git a/src/third_party/wiredtiger/src/btree/bt_split.c b/src/third_party/wiredtiger/src/btree/bt_split.c index 1d36ed800b3..1fd13c47fe0 100644 --- a/src/third_party/wiredtiger/src/btree/bt_split.c +++ b/src/third_party/wiredtiger/src/btree/bt_split.c @@ -2120,8 +2120,8 @@ __split_multi(WT_SESSION_IMPL *session, WT_REF *ref, bool closing) __split_multi_inmem_final(session, page, &mod->mod_multi[i]); /* - * Page with changes not written in this reconciliation is not marked as clean, do it now, then - * discard the page. + * Pages with unresolved changes are not marked clean in reconciliation, do it now, then discard + * the page. */ __wt_page_modify_clear(session, page); __wt_page_out(session, &page); @@ -2130,11 +2130,6 @@ __split_multi(WT_SESSION_IMPL *session, WT_REF *ref, bool closing) err: for (i = 0; i < new_entries; ++i) __split_multi_inmem_fail(session, page, &mod->mod_multi[i], ref_new[i]); - /* - * Mark the page dirty to ensure it is reconciled again as we free the split disk images if - * we fail to instantiate any of them into memory. - */ - __wt_page_modify_set(session, page); } __wt_free(session, ref_new); diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c index 3dce03d6901..63a2a5622b7 100644 --- a/src/third_party/wiredtiger/src/btree/bt_sync.c +++ b/src/third_party/wiredtiger/src/btree/bt_sync.c @@ -44,7 +44,7 @@ __sync_checkpoint_can_skip(WT_SESSION_IMPL *session, WT_REF *ref) return (false); if (!F_ISSET(txn, WT_TXN_HAS_SNAPSHOT)) return (false); - if (!WT_TXNID_LT(txn->snapshot_data.snap_max, mod->first_dirty_txn)) + if (!WT_TXNID_LT(txn->snap_max, mod->first_dirty_txn)) return (false); /* @@ -115,12 +115,12 @@ __sync_dup_walk(WT_SESSION_IMPL *session, WT_REF *walk, uint32_t flags, WT_REF * } /* - * __sync_delete_obsolete_ref -- + * __sync_ref_obsolete_check -- * Check whether the ref is obsolete according to the newest stop time point and handle the - * obsolete page by either remove it or mark it for urgent eviction. + * obsolete page. */ static int -__sync_delete_obsolete_ref(WT_SESSION_IMPL *session, WT_REF *ref) +__sync_ref_obsolete_check(WT_SESSION_IMPL *session, WT_REF *ref) { WT_ADDR_COPY addr; WT_DECL_RET; @@ -147,16 +147,11 @@ __sync_delete_obsolete_ref(WT_SESSION_IMPL *session, WT_REF *ref) return (0); } - /* - * Mark the parent page as dirty to remove a fast-deleted child page. - * - * Ignoring these fast-deleted child pages may result in a disk leak if we downgraded from a - * version that writes out fast-delete information. Fast-delete information is ignored in - * versions 6.0 and prior, and so the fast-delete operation on these pages is considered - * globally visible. Therefore, clean up these pages. - */ - if (ref->state == WT_REF_DELETED) - WT_RET(__wt_page_parent_modify_set(session, ref, true)); + /* Fast-check, ignore deleted pages. */ + if (ref->state == WT_REF_DELETED) { + __wt_verbose(session, WT_VERB_CHECKPOINT_CLEANUP, "%p: skipping deleted page", (void *)ref); + return (0); + } /* Lock the WT_REF. */ WT_REF_LOCK(session, ref, &previous_state); @@ -190,9 +185,10 @@ __sync_delete_obsolete_ref(WT_SESSION_IMPL *session, WT_REF *ref) } if (obsolete) { - WT_RET(__wt_page_parent_modify_set(session, ref, true)); WT_REF_UNLOCK(ref, WT_REF_DELETED); WT_STAT_CONN_DATA_INCR(session, cc_pages_removed); + + WT_RET(__wt_page_parent_modify_set(session, ref, true)); } else WT_REF_UNLOCK(ref, previous_state); @@ -227,16 +223,9 @@ __sync_delete_obsolete_ref(WT_SESSION_IMPL *session, WT_REF *ref) if (busy) return (0); - /* - * Skip the modified pages as their reconciliation results are not valid any more. Check for the - * page modification only after acquiring the hazard pointer to protect against the page being - * freed in parallel. - */ WT_ASSERT(session, ref->page != NULL); - if (__wt_page_is_modified(ref->page)) - goto err; - mod = ref->page->modify; + if (mod != NULL && mod->rec_result == WT_PM_REC_EMPTY) { tag = "reconciled empty"; @@ -289,8 +278,11 @@ __sync_delete_obsolete_ref(WT_SESSION_IMPL *session, WT_REF *ref) __wt_page_modify_set(session, ref->page); } - /* Mark the obsolete page to evict soon. */ - __wt_page_evict_soon(session, ref); + /* + * Set the obsolete page read generation number to a lower value indicating as it is no + * longer needed for any read operations to let the eviction to evict it sooner. + */ + ref->page->read_gen = WT_READGEN_WONT_NEED; WT_STAT_CONN_DATA_INCR(session, cc_pages_evict); } @@ -326,7 +318,7 @@ __sync_ref_int_obsolete_cleanup(WT_SESSION_IMPL *session, WT_REF *parent) for (slot = 0; slot < pindex->entries; slot++) { ref = pindex->index[slot]; - WT_RET(__sync_delete_obsolete_ref(session, ref)); + WT_RET(__sync_ref_obsolete_check(session, ref)); } WT_STAT_CONN_DATA_INCRV(session, cc_pages_visited, pindex->entries); @@ -526,6 +518,9 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop) /* Write all dirty in-cache pages. */ LF_SET(WT_READ_NO_EVICT); + /* Read pages with history store entries and evict them asap. */ + LF_SET(WT_READ_WONT_NEED); + /* * Perform checkpoint cleanup when not in startup or shutdown phase by traversing internal * pages looking for obsolete child pages. This is row-store specific, column-store pages @@ -605,8 +600,9 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop) * * Regardless of whether eviction succeeds or fails, the walk continues from the * previous location. We remember whether we tried eviction, and don't try again. Even - * if eviction fails (the page may stay in cache clean), that is not a wasted effort - * because checkpoint doesn't need to write the page again. + * if eviction fails (the page may stay in cache clean but with history that cannot be + * discarded), that is not wasted effort because checkpoint doesn't need to write the + * page again. * * Once the transaction has given up it's snapshot it is no longer safe to reconcile * pages. That happens prior to the final metadata checkpoint. @@ -624,8 +620,6 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop) } tried_eviction = false; - WT_STAT_INCR(session, btree->dhandle->stats, btree_checkpoint_pages_reconciled); - WT_ERR(__wt_reconcile(session, walk, NULL, rec_flags)); /* diff --git a/src/third_party/wiredtiger/src/btree/bt_vrfy.c b/src/third_party/wiredtiger/src/btree/bt_vrfy.c index e053153be97..5de2cfdcc1c 100644 --- a/src/third_party/wiredtiger/src/btree/bt_vrfy.c +++ b/src/third_party/wiredtiger/src/btree/bt_vrfy.c @@ -29,14 +29,11 @@ typedef struct { bool dump_blocks; bool dump_layout; bool dump_pages; - bool read_corrupt; /* Page layout information. */ uint64_t depth, depth_internal[100], depth_leaf[100]; WT_ITEM *tmp1, *tmp2, *tmp3, *tmp4; /* Temporary buffers */ - - int verify_err; } WT_VSTUFF; static void __verify_checkpoint_reset(WT_VSTUFF *); @@ -81,10 +78,6 @@ __verify_config(WT_SESSION_IMPL *session, const char *cfg[], WT_VSTUFF *vs) WT_RET(__wt_config_gets(session, cfg, "dump_pages", &cval)); vs->dump_pages = cval.val != 0; - WT_RET(__wt_config_gets(session, cfg, "read_corrupt", &cval)); - vs->read_corrupt = cval.val != 0; - vs->verify_err = 0; - WT_RET(__wt_config_gets(session, cfg, "stable_timestamp", &cval)); vs->stable_timestamp = WT_TS_NONE; /* Ignored unless a value has been set */ if (cval.val != 0) { @@ -267,13 +260,6 @@ __wt_verify(WT_SESSION_IMPL *session, const char *cfg[]) session, ret = __verify_tree(session, &btree->root, &addr_unpack, vs)); /* - * If the read_corrupt mode was turned on, we may have continued traversing and - * verifying the pages of the tree despite encountering an error. Set the error. - */ - if (vs->verify_err != 0) - ret = vs->verify_err; - - /* * We have an exclusive lock on the handle, but we're swapping root pages in-and-out of * that handle, and there's a race with eviction entering the tree and seeing an invalid * root page. Eviction must work on trees being verified (else we'd have to do our own @@ -354,7 +340,6 @@ __verify_addr_string(WT_SESSION_IMPL *session, WT_REF *ref, WT_ITEM *buf) WT_DECL_RET; char time_string[WT_TIME_STRING_SIZE]; - WT_ENTER_GENERATION(session, WT_GEN_SPLIT); WT_ERR(__wt_scr_alloc(session, 0, &tmp)); if (__wt_ref_addr_copy(session, ref, &addr)) { @@ -366,7 +351,6 @@ __verify_addr_string(WT_SESSION_IMPL *session, WT_REF *ref, WT_ITEM *buf) err: __wt_scr_free(session, &tmp); - WT_LEAVE_GENERATION(session, WT_GEN_SPLIT); return (buf->data); } @@ -545,18 +529,7 @@ celltype_err: /* Verify the subtree. */ ++vs->depth; - ret = __wt_page_in(session, child_ref, 0); - - /* - * If configured, continue traversing through the pages of the tree even after - * encountering errors reading in the page. - */ - if (vs->read_corrupt && ret != 0) { - if (vs->verify_err == 0) - vs->verify_err = ret; - continue; - } else - WT_RET(ret); + WT_RET(__wt_page_in(session, child_ref, 0)); ret = __verify_tree(session, child_ref, unpack, vs); WT_TRET(__wt_page_release(session, child_ref, 0)); --vs->depth; @@ -586,18 +559,7 @@ celltype_err: /* Verify the subtree. */ ++vs->depth; - ret = __wt_page_in(session, child_ref, 0); - - /* - * If configured, continue traversing through the pages of the tree even after - * encountering errors reading in the page. - */ - if (vs->read_corrupt && ret != 0) { - if (vs->verify_err == 0) - vs->verify_err = ret; - continue; - } else - WT_RET(ret); + WT_RET(__wt_page_in(session, child_ref, 0)); ret = __verify_tree(session, child_ref, unpack, vs); WT_TRET(__wt_page_release(session, child_ref, 0)); --vs->depth; @@ -626,31 +588,22 @@ __verify_row_int_key_order( btree = S2BT(session); - /* - * The maximum key is usually set from the leaf page first. If the first leaf page is corrupted, - * it is possible that the key is not set. In that case skip this check. - */ - if (!vs->verify_err) - WT_ASSERT(session, vs->max_addr->size != 0); + /* The maximum key is set, we updated it from a leaf page first. */ + WT_ASSERT(session, vs->max_addr->size != 0); /* Get the parent page's internal key. */ __wt_ref_key(parent, ref, &item.data, &item.size); - /* There is an edge case where the maximum key is not set due the first leaf being corrupted. */ - if (vs->max_addr->size != 0) { - /* Compare the key against the largest key we've seen so far. */ - WT_RET(__wt_compare(session, btree->collator, &item, vs->max_key, &cmp)); - if (cmp <= 0) - WT_RET_MSG(session, WT_ERROR, - "the internal key in entry %" PRIu32 - " on the page at %s sorts before the last key appearing on page %s, earlier in the " - "tree: " - "%s, %s", - entry, __verify_addr_string(session, ref, vs->tmp1), (char *)vs->max_addr->data, - __wt_buf_set_printable(session, item.data, item.size, false, vs->tmp2), - __wt_buf_set_printable( - session, vs->max_key->data, vs->max_key->size, false, vs->tmp3)); - } + /* Compare the key against the largest key we've seen so far. */ + WT_RET(__wt_compare(session, btree->collator, &item, vs->max_key, &cmp)); + if (cmp <= 0) + WT_RET_MSG(session, WT_ERROR, + "the internal key in entry %" PRIu32 + " on the page at %s sorts before the last key appearing on page %s, earlier in the tree: " + "%s, %s", + entry, __verify_addr_string(session, ref, vs->tmp1), (char *)vs->max_addr->data, + __wt_buf_set_printable(session, item.data, item.size, false, vs->tmp2), + __wt_buf_set_printable(session, vs->max_key->data, vs->max_key->size, false, vs->tmp3)); /* Update the largest key we've seen to the key just checked. */ WT_RET(__wt_buf_set(session, vs->max_key, item.data, item.size)); diff --git a/src/third_party/wiredtiger/src/btree/bt_vrfy_dsk.c b/src/third_party/wiredtiger/src/btree/bt_vrfy_dsk.c index b9bc0a32086..269a226991e 100644 --- a/src/third_party/wiredtiger/src/btree/bt_vrfy_dsk.c +++ b/src/third_party/wiredtiger/src/btree/bt_vrfy_dsk.c @@ -122,8 +122,6 @@ __wt_verify_dsk_image(WT_SESSION_IMPL *session, const char *tag, const WT_PAGE_H LF_CLR(WT_PAGE_ENCRYPTED); if (LF_ISSET(WT_PAGE_UNUSED)) LF_CLR(WT_PAGE_UNUSED); - if (LF_ISSET(WT_PAGE_FT_UPDATE)) - LF_CLR(WT_PAGE_FT_UPDATE); if (flags != 0) WT_RET_VRFY(session, "page at %s has invalid flags set: 0x%" PRIx8, tag, flags); diff --git a/src/third_party/wiredtiger/src/btree/col_modify.c b/src/third_party/wiredtiger/src/btree/col_modify.c index db1705d302d..2093a2401dc 100644 --- a/src/third_party/wiredtiger/src/btree/col_modify.c +++ b/src/third_party/wiredtiger/src/btree/col_modify.c @@ -44,7 +44,6 @@ __wt_col_modify(WT_CURSOR_BTREE *cbt, uint64_t recno, const WT_ITEM *value, WT_U upd = upd_arg; prev_upd_ts = WT_TS_NONE; added_to_txn = append = inserted_to_update_chain = false; - upd_size = 0; /* * We should have one of the following: diff --git a/src/third_party/wiredtiger/src/btree/col_srch.c b/src/third_party/wiredtiger/src/btree/col_srch.c index ea1e25f0549..06190986888 100644 --- a/src/third_party/wiredtiger/src/btree/col_srch.c +++ b/src/third_party/wiredtiger/src/btree/col_srch.c @@ -279,10 +279,6 @@ leaf_only: return (0); past_end: - /* We don't always set these below, add a catch-all. */ - cbt->ins_head = NULL; - cbt->ins = NULL; - /* * A record past the end of the page's standard information. Check the append list; by * definition, any record on the append list is closer than the last record on the page, so it's @@ -290,39 +286,11 @@ past_end: * because column-store files are dense, but in this case the caller searched past the end of * the table. */ - ins_head = WT_COL_APPEND(page); - ins = __col_insert_search(ins_head, cbt->ins_stack, cbt->next_stack, recno); - if (ins == NULL) { - /* - * There is nothing on the append list, so search the insert list. (The append list would - * have been closer to the search record). - */ - if (cbt->recno != WT_RECNO_OOB) { - if (page->type == WT_PAGE_COL_FIX) - ins_head = WT_COL_UPDATE_SINGLE(page); - else { - ins_head = WT_COL_UPDATE_SLOT(page, cbt->slot); - - /* - * Set this, otherwise the code in cursor_valid will assume there's no on-disk value - * underneath ins_head. - */ - F_SET(cbt, WT_CBT_VAR_ONPAGE_MATCH); - } - - ins = WT_SKIP_LAST(ins_head); - if (ins != NULL && cbt->recno == WT_INSERT_RECNO(ins)) { - cbt->ins_head = ins_head; - cbt->ins = ins; - } - } - + cbt->ins_head = WT_COL_APPEND(page); + if ((cbt->ins = __col_insert_search(cbt->ins_head, cbt->ins_stack, cbt->next_stack, recno)) == + NULL) cbt->compare = -1; - } else { - WT_ASSERT(session, page->type == WT_PAGE_COL_FIX || !F_ISSET(cbt, WT_CBT_VAR_ONPAGE_MATCH)); - - cbt->ins_head = ins_head; - cbt->ins = ins; + else { cbt->recno = WT_INSERT_RECNO(cbt->ins); if (recno == cbt->recno) cbt->compare = 0; diff --git a/src/third_party/wiredtiger/src/btree/row_modify.c b/src/third_party/wiredtiger/src/btree/row_modify.c index d45da49a2fc..c7a2e76e1de 100644 --- a/src/third_party/wiredtiger/src/btree/row_modify.c +++ b/src/third_party/wiredtiger/src/btree/row_modify.c @@ -69,7 +69,6 @@ __wt_row_modify(WT_CURSOR_BTREE *cbt, const WT_ITEM *key, const WT_ITEM *value, upd = upd_arg; prev_upd_ts = WT_TS_NONE; added_to_txn = inserted_to_update_chain = false; - upd_size = 0; /* * We should have one of the following: @@ -133,8 +132,8 @@ __wt_row_modify(WT_CURSOR_BTREE *cbt, const WT_ITEM *key, const WT_ITEM *value, WT_ASSERT(session, !WT_IS_HS(S2BT(session)->dhandle) || (*upd_entry == NULL || - ((*upd_entry)->type == WT_UPDATE_TOMBSTONE && - (*upd_entry)->txnid == WT_TXN_NONE && (*upd_entry)->start_ts == WT_TS_NONE)) || + ((*upd_entry)->type == WT_UPDATE_TOMBSTONE && (*upd_entry)->txnid == WT_TS_NONE && + (*upd_entry)->start_ts == WT_TS_NONE)) || (upd_arg->type == WT_UPDATE_TOMBSTONE && upd_arg->start_ts == WT_TS_NONE && upd_arg->next == NULL) || (upd_arg->type == WT_UPDATE_TOMBSTONE && upd_arg->next != NULL && @@ -348,12 +347,16 @@ __wt_update_obsolete_check( WT_TXN_GLOBAL *txn_global; WT_UPDATE *first, *next; size_t size; - u_int count; + uint64_t oldest, stable; + u_int count, upd_seen, upd_unstable; next = NULL; page = cbt->ref->page; txn_global = &S2C(session)->txn_global; + upd_seen = upd_unstable = 0; + oldest = txn_global->has_oldest_timestamp ? txn_global->oldest_timestamp : WT_TS_NONE; + stable = txn_global->has_stable_timestamp ? txn_global->stable_timestamp : WT_TS_NONE; /* * This function identifies obsolete updates, and truncates them from the rest of the chain; * because this routine is called from inside a serialization function, the caller has @@ -362,34 +365,25 @@ __wt_update_obsolete_check( * Walk the list of updates, looking for obsolete updates at the end. * * Only updates with globally visible, self-contained data can terminate update chains. + * */ for (first = NULL, count = 0; upd != NULL; upd = upd->next, count++) { if (upd->txnid == WT_TXN_ABORTED) continue; - /* - * WiredTiger internal operations such as Rollback to stable and prepare transaction - * rollback adds a globally visible tombstone to the update chain to remove the entire key. - * Treating these globally visible tombstones as obsolete and trimming update list can cause - * problems if the update chain is getting accessed somewhere. To avoid this problem, skip - * these globally visible tombstones from the update obsolete check were generated from - * prepare transaction rollback and not from RTS, because there are no concurrent operations - * run in parallel to the RTS to be affected. - */ - if (upd->txnid == WT_TXN_NONE && upd->start_ts == WT_TS_NONE && - upd->type == WT_UPDATE_TOMBSTONE && upd->next != NULL && - upd->next->txnid == WT_TXN_ABORTED && upd->next->prepare_state == WT_PREPARE_INPROGRESS) - continue; - + ++upd_seen; if (__wt_txn_upd_visible_all(session, upd)) { if (first == NULL && WT_UPDATE_DATA_VALUE(upd)) first = upd; - } else - first = NULL; - - /* Cannot truncate the updates if we need to remove the updates from the history store. */ - if (F_ISSET(upd, WT_UPDATE_TO_DELETE_FROM_HS)) + } else { first = NULL; + /* + * While we're here, also check for the update being kept only for timestamp history to + * gauge updates being kept due to history. + */ + if (upd->start_ts != WT_TS_NONE && upd->start_ts >= oldest && upd->start_ts < stable) + ++upd_unstable; + } } /* diff --git a/src/third_party/wiredtiger/src/btree/row_srch.c b/src/third_party/wiredtiger/src/btree/row_srch.c index 38d6091b248..abd98bbd506 100644 --- a/src/third_party/wiredtiger/src/btree/row_srch.c +++ b/src/third_party/wiredtiger/src/btree/row_srch.c @@ -53,9 +53,9 @@ __search_insert_append(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, WT_INSERT * serialized insert function. */ for (i = WT_SKIP_MAXDEPTH - 1; i >= 0; i--) { - cbt->ins_stack[i] = (i == 0) ? &ins->next[0] : - (ins_head->tail[i] != NULL) ? &ins_head->tail[i]->next[i] : - &ins_head->head[i]; + cbt->ins_stack[i] = (i == 0) ? + &ins->next[0] : + (ins_head->tail[i] != NULL) ? &ins_head->tail[i]->next[i] : &ins_head->head[i]; cbt->next_stack[i] = NULL; } cbt->compare = -cmp; @@ -102,18 +102,7 @@ __wt_search_insert( match = skiphigh = skiplow = 0; ins = last_ins = NULL; for (i = WT_SKIP_MAXDEPTH - 1, insp = &ins_head->head[i]; i >= 0;) { - /* - * The algorithm requires that the skip list insert pointer is only read once within the - * loop. While the compiler can change the code in a way that it reads the insert pointer - * value from memory again in the following code. - * - * In addition, a CPU with weak memory ordering, such as ARM, may reorder the reads and read - * a stale value. It is not OK and the reason is explained in the following comment. - * - * Place a read barrier here to avoid these issues. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ins, *insp); - if (ins == NULL) { + if ((ins = *insp) == NULL) { cbt->next_stack[i] = NULL; cbt->ins_stack[i--] = insp--; continue; @@ -127,46 +116,6 @@ __wt_search_insert( last_ins = ins; key.data = WT_INSERT_KEY(ins); key.size = WT_INSERT_KEY_SIZE(ins); - /* - * We have an optimization to reduce the number of bytes we need to compare during the - * search if we know a prefix of the search key matches the keys we have already - * compared on the upper stacks. This works because we know the keys become denser down - * the stack. - * - * However, things become tricky if we have another key inserted concurrently next to - * the search key. The current search may or may not see the concurrently inserted key - * but it should always see a valid skip list. In other words, - * - * 1) at any level of the list, keys are in sorted order; - * - * 2) if a reader sees a key in level N, that key is also in all levels below N. - * - * Otherwise, we may wrongly skip the comparison of a prefix and land on the wrong spot. - * Here's an example: - * - * Suppose we have a skip list: - * - * L1: AA -> BA - * - * L0: AA -> BA - * - * and we want to search AB and a key AC is inserted concurrently. If we see the - * following skip list in the search: - * - * L1: AA -> AC -> BA - * - * L0: AA -> BA - * - * Since we have compared with AA and AC on level 1 before dropping down to level 0, we - * decide we can skip comparing the first byte of the key. However, since we don't see - * AC on level 0, we compare with BA and wrongly skip the comparison with prefix B. - * - * On architectures with strong memory ordering, the requirement is satisfied by - * inserting the new key to the skip list from lower stack to upper stack using an - * atomic compare and swap operation, which functions as a full barrier. However, it is - * not enough on the architecture that has weaker memory ordering, such as ARM. - * Therefore, an extra read barrier is needed for these platforms. - */ match = WT_MIN(skiplow, skiphigh); WT_RET(__wt_compare_skip(session, collator, srch_key, &key, &cmp, &match)); } @@ -180,11 +129,7 @@ __wt_search_insert( skiphigh = match; } else for (; i >= 0; i--) { - /* - * It is possible that we read an old value down the stack due to read reordering on - * CPUs with weak memory ordering. Add a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(cbt->next_stack[i], ins->next[i]); + cbt->next_stack[i] = ins->next[i]; cbt->ins_stack[i] = &ins->next[i]; } } @@ -304,6 +249,14 @@ __wt_row_search(WT_CURSOR_BTREE *cbt, WT_ITEM *srch_key, bool insert, WT_REF *le __cursor_pos_clear(cbt); /* + * In some cases we expect we're comparing more than a few keys with matching prefixes, so it's + * faster to avoid the memory fetches by skipping over those prefixes. That's done by tracking + * the length of the prefix match for the lowest and highest keys we compare as we descend the + * tree. The high boundary is reset on each new page, the lower boundary is maintained. + */ + skiplow = 0; + + /* * If a cursor repeatedly appends to the tree, compare the search key against the last key on * each internal page during insert before doing the full binary search. * @@ -338,6 +291,7 @@ restart: * Discard the currently held page and restart the search from the root. */ WT_RET(__wt_page_release(session, current, 0)); + skiplow = 0; } /* Search the internal pages of the tree. */ @@ -401,22 +355,16 @@ restart: } else if (collator == NULL) { /* - * In some cases we expect we're comparing more than a few keys with matching prefixes, - * so it's faster to avoid the memory fetches by skipping over those prefixes. That's - * done by tracking the length of the prefix match for the lowest and highest keys we've - * seen previously. - * - * Normally we'd expect every parent page's skippable prefixes to be shorter than the - * prefixes we can skip in the child page, and so we'd skip increasingly longer prefixes - * as we walk down the tree (in other words, if we can skip N bytes on the parent, we - * can skip at least N bytes on the child). However, if the search threads cache this - * skippable prefix size as they move down the tree, and if the tree structure changes - * in parallel - for example page splits reducing the child pages key space or a keys - * destined for a now-deleted sibling page being inserted into the current page - the - * skippable prefix can be incorrect for the page. To protect against this we reset the - * skippable prefix length each time we move to a new page. + * Reset the skipped prefix counts; we'd normally expect the parent's skipped prefix + * values to be larger than the child's values and so we'd only increase them as we walk + * down the tree (in other words, if we can skip N bytes on the parent, we can skip at + * least N bytes on the child). However, if a child internal page was split up into the + * parent, the child page's key space will have been truncated, and the values from the + * parent's search may be wrong for the child. We only need to reset the high count + * because the split-page algorithm truncates the end of the internal page's key space, + * the low count is still correct. */ - skiphigh = skiplow = 0; + skiphigh = 0; for (; limit != 0; limit >>= 1) { indx = base + (limit >> 1); @@ -563,22 +511,14 @@ leaf_only: } else if (collator == NULL) { /* - * In some cases we expect we're comparing more than a few keys with matching prefixes, so - * it's faster to avoid the memory fetches by skipping over those prefixes. That's done by - * tracking the length of the prefix match for the lowest and highest keys we've seen - * previously. - * - * Normally we'd expect every parent page's skippable prefixes to be shorter than the - * prefixes we can skip in the child page, and so we'd skip increasingly longer prefixes as - * we walk down the tree (in other words, if we can skip N bytes on the parent, we can skip - * at least N bytes on the child). However, if the search threads cache this skippable - * prefix size as they move down the tree, and if the tree structure changes in parallel - - * for example page splits reducing the child pages key space or a keys destined for a - * now-deleted sibling page being inserted into the current page - the skippable prefix can - * be incorrect for the page. To protect against this we reset the skippable prefix length - * each time we move to a new page. + * Reset the skipped prefix counts; we'd normally expect the parent's skipped prefix values + * to be larger than the child's values and so we'd only increase them as we walk down the + * tree (in other words, if we can skip N bytes on the parent, we can skip at least N bytes + * on the child). However, leaf pages at the end of the tree can be extended, causing the + * parent's search to be wrong for the child. We only need to reset the high count, the page + * can only be extended so the low count is still correct. */ - skiphigh = skiplow = 0; + skiphigh = 0; for (; limit != 0; limit >>= 1) { indx = base + (limit >> 1); diff --git a/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c b/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c index 6f037f2b553..de13cd6878b 100644 --- a/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c +++ b/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c @@ -39,16 +39,16 @@ #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)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-macros" #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)) #pragma GCC diagnostic pop #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/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c b/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c index 628a0d955ef..8db4b254366 100644 --- a/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c +++ b/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c @@ -21,7 +21,6 @@ #include "crc32-s390x.h" #include "slicing-consts.h" -#include "wt_internal.h" #define VX_MIN_LEN 64 #define VX_ALIGNMENT 16UL @@ -52,31 +51,31 @@ __wt_crc32c_le(unsigned int crc, const unsigned char *buf, size_t len) * aligned to improve fetch operations of VECTOR LOAD MULTIPLE instructions. * */ -#define DEFINE_CRC32_VX(___fname, ___crc32_vx, ___crc32_sw) \ - unsigned int ___fname(unsigned int crc, const unsigned char *data, size_t datalen) \ - { \ - unsigned long prealign, aligned, remaining; \ - \ - if ((unsigned long)data & VX_ALIGN_MASK) { \ - prealign = WT_MIN(datalen, VX_ALIGNMENT - ((unsigned long)data & VX_ALIGN_MASK)); \ - datalen -= prealign; \ - crc = ___crc32_sw(crc, data, prealign); \ - data = data + prealign; \ - } \ - \ - if (datalen < VX_MIN_LEN) \ - return ___crc32_sw(crc, data, datalen); \ - \ - aligned = datalen & ~VX_ALIGN_MASK; \ - remaining = datalen & VX_ALIGN_MASK; \ - \ - crc = ___crc32_vx(crc, data, aligned); \ - data = data + aligned; \ - \ - if (remaining) \ - crc = ___crc32_sw(crc, data, remaining); \ - \ - return crc; \ +#define DEFINE_CRC32_VX(___fname, ___crc32_vx, ___crc32_sw) \ + unsigned int ___fname(unsigned int crc, const unsigned char *data, size_t datalen) \ + { \ + unsigned long prealign, aligned, remaining; \ + \ + if ((unsigned long)data & VX_ALIGN_MASK) { \ + prealign = VX_ALIGNMENT - ((unsigned long)data & VX_ALIGN_MASK); \ + datalen -= prealign; \ + crc = ___crc32_sw(crc, data, prealign); \ + data = data + prealign; \ + } \ + \ + if (datalen < VX_MIN_LEN) \ + return ___crc32_sw(crc, data, datalen); \ + \ + aligned = datalen & ~VX_ALIGN_MASK; \ + remaining = datalen & VX_ALIGN_MASK; \ + \ + crc = ___crc32_vx(crc, data, aligned); \ + data = data + aligned; \ + \ + if (remaining) \ + crc = ___crc32_sw(crc, data, remaining); \ + \ + return crc; \ } /* Main CRC-32 functions */ @@ -93,6 +92,14 @@ __wt_checksum_hw(const void *chunk, size_t len) } #endif +extern uint32_t __wt_checksum_sw(const void *chunk, size_t len); +#if defined(__GNUC__) +extern uint32_t (*wiredtiger_crc32c_func(void))(const void *, size_t) + __attribute__((visibility("default"))); +#else +extern uint32_t (*wiredtiger_crc32c_func(void))(const void *, size_t); +#endif + /* * wiredtiger_crc32c_func -- * WiredTiger: detect CRC hardware and return the checksum function. diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c index 11f4c84e6a7..f07124e852c 100644 --- a/src/third_party/wiredtiger/src/config/config_def.c +++ b/src/third_party/wiredtiger/src/config/config_def.c @@ -72,7 +72,6 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_debug_mode_subconfigs[] = { {"update_restore_evict", "boolean", NULL, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; static const WT_CONFIG_CHECK confchk_wiredtiger_open_eviction_subconfigs[] = { - {"evict_sample_inmem", "boolean", NULL, NULL, NULL, 0}, {"threads_max", "int", NULL, "min=1,max=20", NULL, 0}, {"threads_min", "int", NULL, "min=1,max=20", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -118,7 +117,9 @@ static const WT_CONFIG_CHECK confchk_tiered_manager_subconfigs[] = { {"wait", "int", NULL, "min=0,max=100000", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure_tiered_storage_subconfigs[] = { - {"local_retention", "int", NULL, "min=0,max=10000", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; + {"local_retention", "int", NULL, "min=0,max=10000", NULL, 0}, + {"object_target_size", "int", NULL, "min=100K,max=10TB", NULL, 0}, + {NULL, NULL, NULL, NULL, NULL, 0}}; static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = { {"block_cache", "category", NULL, NULL, confchk_wiredtiger_open_block_cache_subconfigs, 12}, @@ -130,7 +131,7 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = { confchk_WT_CONNECTION_reconfigure_compatibility_subconfigs, 1}, {"debug_mode", "category", NULL, NULL, confchk_wiredtiger_open_debug_mode_subconfigs, 11}, {"error_prefix", "string", NULL, NULL, NULL, 0}, - {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 3}, + {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 2}, {"eviction_checkpoint_target", "int", NULL, "min=0,max=10TB", NULL, 0}, {"eviction_dirty_target", "int", NULL, "min=1,max=10TB", NULL, 0}, {"eviction_dirty_trigger", "int", NULL, "min=1,max=10TB", NULL, 0}, @@ -156,18 +157,16 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = { confchk_WT_CONNECTION_reconfigure_statistics_log_subconfigs, 5}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, {"tiered_storage", "category", NULL, NULL, - confchk_WT_CONNECTION_reconfigure_tiered_storage_subconfigs, 1}, + confchk_WT_CONNECTION_reconfigure_tiered_storage_subconfigs, 2}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\"," "\"checkpoint_stop\",\"compact_slow\"," - "\"failpoint_eviction_fail_after_reconciliation\"," "\"failpoint_history_store_delete_key_from_ts\"," "\"history_store_checkpoint_delay\",\"history_store_search\"," "\"history_store_sweep_race\",\"prepare_checkpoint_delay\"," - "\"prepare_resolution\",\"prepare_resolution_2\",\"split_1\"," - "\"split_2\",\"split_3\",\"split_4\",\"split_5\",\"split_6\"," - "\"split_7\",\"tiered_flush_finish\"]", + "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," + "\"split_6\",\"split_7\",\"tiered_flush_finish\"]", NULL, 0}, {"verbose", "list", NULL, "choices=[\"api\",\"backup\",\"block\",\"block_cache\"," @@ -293,8 +292,7 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_create_tiered_storage_subconfigs {"bucket_prefix", "string", NULL, NULL, NULL, 0}, {"cache_directory", "string", NULL, NULL, NULL, 0}, {"local_retention", "int", NULL, "min=0,max=10000", NULL, 0}, - {"name", "string", NULL, NULL, NULL, 0}, {"object_target_size", "int", NULL, "min=0", NULL, 0}, - {NULL, NULL, NULL, NULL, NULL, 0}}; + {"name", "string", NULL, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; static const WT_CONFIG_CHECK confchk_WT_SESSION_create[] = { {"access_pattern_hint", "string", NULL, "choices=[\"none\",\"random\",\"sequential\"]", NULL, 0}, @@ -340,7 +338,7 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_create[] = { {"split_pct", "int", NULL, "min=50,max=100", NULL, 0}, {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"tiered_storage", "category", NULL, NULL, confchk_WT_SESSION_create_tiered_storage_subconfigs, - 7}, + 6}, {"type", "string", NULL, NULL, NULL, 0}, {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, @@ -397,7 +395,6 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_open_cursor[] = { {"incremental", "category", NULL, NULL, confchk_WT_SESSION_open_cursor_incremental_subconfigs, 7}, {"next_random", "boolean", NULL, NULL, NULL, 0}, {"next_random_sample_size", "string", NULL, NULL, NULL, 0}, - {"next_random_seed", "string", NULL, NULL, NULL, 0}, {"overwrite", "boolean", NULL, NULL, NULL, 0}, {"prefix_search", "boolean", NULL, NULL, NULL, 0}, {"raw", "boolean", NULL, NULL, NULL, 0}, {"read_once", "boolean", NULL, NULL, NULL, 0}, {"readonly", "boolean", NULL, NULL, NULL, 0}, {"skip_sort_check", "boolean", NULL, NULL, NULL, 0}, @@ -444,7 +441,7 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_verify[] = { {"do_not_clear_txn_id", "boolean", NULL, NULL, NULL, 0}, {"dump_address", "boolean", NULL, NULL, NULL, 0}, {"dump_blocks", "boolean", NULL, NULL, NULL, 0}, {"dump_layout", "boolean", NULL, NULL, NULL, 0}, {"dump_offsets", "list", NULL, NULL, NULL, 0}, - {"dump_pages", "boolean", NULL, NULL, NULL, 0}, {"read_corrupt", "boolean", NULL, NULL, NULL, 0}, + {"dump_pages", "boolean", NULL, NULL, NULL, 0}, {"stable_timestamp", "boolean", NULL, NULL, NULL, 0}, {"strict", "boolean", NULL, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -500,7 +497,7 @@ static const WT_CONFIG_CHECK confchk_file_config[] = { {"split_pct", "int", NULL, "min=50,max=100", NULL, 0}, {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"tiered_storage", "category", NULL, NULL, confchk_WT_SESSION_create_tiered_storage_subconfigs, - 7}, + 6}, {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, @@ -552,7 +549,7 @@ static const WT_CONFIG_CHECK confchk_file_meta[] = { {"split_pct", "int", NULL, "min=50,max=100", NULL, 0}, {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"tiered_storage", "category", NULL, NULL, confchk_WT_SESSION_create_tiered_storage_subconfigs, - 7}, + 6}, {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"version", "string", NULL, NULL, NULL, 0}, @@ -620,7 +617,7 @@ static const WT_CONFIG_CHECK confchk_lsm_meta[] = { {"split_pct", "int", NULL, "min=50,max=100", NULL, 0}, {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"tiered_storage", "category", NULL, NULL, confchk_WT_SESSION_create_tiered_storage_subconfigs, - 7}, + 6}, {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, @@ -673,7 +670,7 @@ static const WT_CONFIG_CHECK confchk_object_meta[] = { {"split_pct", "int", NULL, "min=50,max=100", NULL, 0}, {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"tiered_storage", "category", NULL, NULL, confchk_WT_SESSION_create_tiered_storage_subconfigs, - 7}, + 6}, {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"version", "string", NULL, NULL, NULL, 0}, @@ -742,7 +739,7 @@ static const WT_CONFIG_CHECK confchk_tier_meta[] = { {"split_pct", "int", NULL, "min=50,max=100", NULL, 0}, {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"tiered_storage", "category", NULL, NULL, confchk_WT_SESSION_create_tiered_storage_subconfigs, - 7}, + 6}, {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"version", "string", NULL, NULL, NULL, 0}, @@ -796,7 +793,7 @@ static const WT_CONFIG_CHECK confchk_tiered_meta[] = { {"split_pct", "int", NULL, "min=50,max=100", NULL, 0}, {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"tiered_storage", "category", NULL, NULL, confchk_WT_SESSION_create_tiered_storage_subconfigs, - 7}, + 6}, {"tiers", "list", NULL, NULL, NULL, 0}, {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, @@ -841,7 +838,9 @@ static const WT_CONFIG_CHECK confchk_tiered_storage_subconfigs[] = { {"bucket_prefix", "string", NULL, NULL, NULL, 0}, {"cache_directory", "string", NULL, NULL, NULL, 0}, {"local_retention", "int", NULL, "min=0,max=10000", NULL, 0}, - {"name", "string", NULL, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; + {"name", "string", NULL, NULL, NULL, 0}, + {"object_target_size", "int", NULL, "min=100K,max=10TB", NULL, 0}, + {NULL, NULL, NULL, NULL, NULL, 0}}; static const WT_CONFIG_CHECK confchk_wiredtiger_open_transaction_sync_subconfigs[] = { {"enabled", "boolean", NULL, NULL, NULL, 0}, @@ -865,7 +864,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = { {"direct_io", "list", NULL, "choices=[\"checkpoint\",\"data\",\"log\"]", NULL, 0}, {"encryption", "category", NULL, NULL, confchk_wiredtiger_open_encryption_subconfigs, 3}, {"error_prefix", "string", NULL, NULL, NULL, 0}, - {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 3}, + {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 2}, {"eviction_checkpoint_target", "int", NULL, "min=0,max=10TB", NULL, 0}, {"eviction_dirty_target", "int", NULL, "min=1,max=10TB", NULL, 0}, {"eviction_dirty_trigger", "int", NULL, "min=1,max=10TB", NULL, 0}, @@ -900,18 +899,16 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\"," "\"checkpoint_stop\",\"compact_slow\"," - "\"failpoint_eviction_fail_after_reconciliation\"," "\"failpoint_history_store_delete_key_from_ts\"," "\"history_store_checkpoint_delay\",\"history_store_search\"," "\"history_store_sweep_race\",\"prepare_checkpoint_delay\"," - "\"prepare_resolution\",\"prepare_resolution_2\",\"split_1\"," - "\"split_2\",\"split_3\",\"split_4\",\"split_5\",\"split_6\"," - "\"split_7\",\"tiered_flush_finish\"]", + "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," + "\"split_6\",\"split_7\",\"tiered_flush_finish\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, @@ -951,7 +948,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = { {"direct_io", "list", NULL, "choices=[\"checkpoint\",\"data\",\"log\"]", NULL, 0}, {"encryption", "category", NULL, NULL, confchk_wiredtiger_open_encryption_subconfigs, 3}, {"error_prefix", "string", NULL, NULL, NULL, 0}, - {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 3}, + {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 2}, {"eviction_checkpoint_target", "int", NULL, "min=0,max=10TB", NULL, 0}, {"eviction_dirty_target", "int", NULL, "min=1,max=10TB", NULL, 0}, {"eviction_dirty_trigger", "int", NULL, "min=1,max=10TB", NULL, 0}, @@ -986,18 +983,16 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\"," "\"checkpoint_stop\",\"compact_slow\"," - "\"failpoint_eviction_fail_after_reconciliation\"," "\"failpoint_history_store_delete_key_from_ts\"," "\"history_store_checkpoint_delay\",\"history_store_search\"," "\"history_store_sweep_race\",\"prepare_checkpoint_delay\"," - "\"prepare_resolution\",\"prepare_resolution_2\",\"split_1\"," - "\"split_2\",\"split_3\",\"split_4\",\"split_5\",\"split_6\"," - "\"split_7\",\"tiered_flush_finish\"]", + "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," + "\"split_6\",\"split_7\",\"tiered_flush_finish\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, @@ -1036,7 +1031,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = { {"direct_io", "list", NULL, "choices=[\"checkpoint\",\"data\",\"log\"]", NULL, 0}, {"encryption", "category", NULL, NULL, confchk_wiredtiger_open_encryption_subconfigs, 3}, {"error_prefix", "string", NULL, NULL, NULL, 0}, - {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 3}, + {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 2}, {"eviction_checkpoint_target", "int", NULL, "min=0,max=10TB", NULL, 0}, {"eviction_dirty_target", "int", NULL, "min=1,max=10TB", NULL, 0}, {"eviction_dirty_trigger", "int", NULL, "min=1,max=10TB", NULL, 0}, @@ -1070,18 +1065,16 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\"," "\"checkpoint_stop\",\"compact_slow\"," - "\"failpoint_eviction_fail_after_reconciliation\"," "\"failpoint_history_store_delete_key_from_ts\"," "\"history_store_checkpoint_delay\",\"history_store_search\"," "\"history_store_sweep_race\",\"prepare_checkpoint_delay\"," - "\"prepare_resolution\",\"prepare_resolution_2\",\"split_1\"," - "\"split_2\",\"split_3\",\"split_4\",\"split_5\",\"split_6\"," - "\"split_7\",\"tiered_flush_finish\"]", + "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," + "\"split_6\",\"split_7\",\"tiered_flush_finish\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, @@ -1118,7 +1111,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = { {"direct_io", "list", NULL, "choices=[\"checkpoint\",\"data\",\"log\"]", NULL, 0}, {"encryption", "category", NULL, NULL, confchk_wiredtiger_open_encryption_subconfigs, 3}, {"error_prefix", "string", NULL, NULL, NULL, 0}, - {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 3}, + {"eviction", "category", NULL, NULL, confchk_wiredtiger_open_eviction_subconfigs, 2}, {"eviction_checkpoint_target", "int", NULL, "min=0,max=10TB", NULL, 0}, {"eviction_dirty_target", "int", NULL, "min=1,max=10TB", NULL, 0}, {"eviction_dirty_trigger", "int", NULL, "min=1,max=10TB", NULL, 0}, @@ -1152,18 +1145,16 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\"," "\"checkpoint_stop\",\"compact_slow\"," - "\"failpoint_eviction_fail_after_reconciliation\"," "\"failpoint_history_store_delete_key_from_ts\"," "\"history_store_checkpoint_delay\",\"history_store_search\"," "\"history_store_sweep_race\",\"prepare_checkpoint_delay\"," - "\"prepare_resolution\",\"prepare_resolution_2\",\"split_1\"," - "\"split_2\",\"split_3\",\"split_4\",\"split_5\",\"split_6\"," - "\"split_7\",\"tiered_flush_finish\"]", + "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\"," + "\"split_6\",\"split_7\",\"tiered_flush_finish\"]", NULL, 0}, {"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs, 2}, @@ -1215,7 +1206,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "log_retention=0,realloc_exact=false,rollback_error=0," "slow_checkpoint=false,table_logging=false," "update_restore_evict=false),error_prefix=," - "eviction=(evict_sample_inmem=true,threads_max=8,threads_min=1)," + "eviction=(threads_max=8,threads_min=1)," "eviction_checkpoint_target=1,eviction_dirty_target=5," "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" ",eviction_updates_target=0,eviction_updates_trigger=0," @@ -1229,8 +1220,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "size=500MB),statistics=none,statistics_log=(json=false," "on_close=false,sources=,timestamp=\"%b %d %H:%M:%S\",wait=0)," "tiered_manager=(threads_max=8,threads_min=1,wait=0)," - "tiered_storage=(local_retention=300),timing_stress_for_test=," - "verbose=[]", + "tiered_storage=(local_retention=300,object_target_size=10M)," + "timing_stress_for_test=,verbose=[]", confchk_WT_CONNECTION_reconfigure, 31}, {"WT_CONNECTION.rollback_to_stable", "", NULL, 0}, {"WT_CONNECTION.set_file_system", "", NULL, 0}, {"WT_CONNECTION.set_timestamp", @@ -1284,7 +1275,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", ",source=,split_deepen_min_child=0,split_deepen_per_child=0," "split_pct=90,tiered_object=false,tiered_storage=(auth_token=," "bucket=,bucket_prefix=,cache_directory=,local_retention=300," - "name=,object_target_size=0),type=file,value_format=u,verbose=[]," + "name=),type=file,value_format=u,verbose=[]," "write_timestamp_usage=none", confchk_WT_SESSION_create, 50}, {"WT_SESSION.drop", @@ -1305,10 +1296,10 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "debug=(dump_version=false,release_evict=false),dump=," "incremental=(consolidate=false,enabled=false,file=," "force_stop=false,granularity=16MB,src_id=,this_id=)," - "next_random=false,next_random_sample_size=0,next_random_seed=0," - "overwrite=true,prefix_search=false,raw=false,read_once=false," - "readonly=false,skip_sort_check=false,statistics=,target=", - confchk_WT_SESSION_open_cursor, 18}, + "next_random=false,next_random_sample_size=0,overwrite=true," + "prefix_search=false,raw=false,read_once=false,readonly=false," + "skip_sort_check=false,statistics=,target=", + confchk_WT_SESSION_open_cursor, 17}, {"WT_SESSION.prepare_transaction", "prepare_timestamp=", confchk_WT_SESSION_prepare_transaction, 1}, {"WT_SESSION.query_timestamp", "get=read", confchk_WT_SESSION_query_timestamp, 1}, @@ -1331,8 +1322,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", {"WT_SESSION.verify", "do_not_clear_txn_id=false,dump_address=false,dump_blocks=false," "dump_layout=false,dump_offsets=,dump_pages=false," - "read_corrupt=false,stable_timestamp=false,strict=false", - confchk_WT_SESSION_verify, 9}, + "stable_timestamp=false,strict=false", + confchk_WT_SESSION_verify, 8}, {"colgroup.meta", "app_metadata=,assert=(commit_timestamp=none," "durable_timestamp=none,read_timestamp=none,write_timestamp=off)," @@ -1354,9 +1345,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "prefix_compression=false,prefix_compression_min=4,readonly=false" ",split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90," "tiered_object=false,tiered_storage=(auth_token=,bucket=," - "bucket_prefix=,cache_directory=,local_retention=300,name=," - "object_target_size=0),value_format=u,verbose=[]," - "write_timestamp_usage=none", + "bucket_prefix=,cache_directory=,local_retention=300,name=)," + "value_format=u,verbose=[],write_timestamp_usage=none", confchk_file_config, 42}, {"file.meta", "access_pattern_hint=none,allocation_size=4KB,app_metadata=," @@ -1375,9 +1365,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "prefix_compression_min=4,readonly=false,split_deepen_min_child=0" ",split_deepen_per_child=0,split_pct=90,tiered_object=false," "tiered_storage=(auth_token=,bucket=,bucket_prefix=," - "cache_directory=,local_retention=300,name=,object_target_size=0)" - ",value_format=u,verbose=[],version=(major=0,minor=0)," - "write_timestamp_usage=none", + "cache_directory=,local_retention=300,name=),value_format=u," + "verbose=[],version=(major=0,minor=0),write_timestamp_usage=none", confchk_file_meta, 47}, {"index.meta", "app_metadata=,assert=(commit_timestamp=none," @@ -1407,8 +1396,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", ",readonly=false,split_deepen_min_child=0," "split_deepen_per_child=0,split_pct=90,tiered_object=false," "tiered_storage=(auth_token=,bucket=,bucket_prefix=," - "cache_directory=,local_retention=300,name=,object_target_size=0)" - ",value_format=u,verbose=[],write_timestamp_usage=none", + "cache_directory=,local_retention=300,name=),value_format=u," + "verbose=[],write_timestamp_usage=none", confchk_lsm_meta, 46}, {"object.meta", "access_pattern_hint=none,allocation_size=4KB,app_metadata=," @@ -1427,9 +1416,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "prefix_compression_min=4,readonly=false,split_deepen_min_child=0" ",split_deepen_per_child=0,split_pct=90,tiered_object=false," "tiered_storage=(auth_token=,bucket=,bucket_prefix=," - "cache_directory=,local_retention=300,name=,object_target_size=0)" - ",value_format=u,verbose=[],version=(major=0,minor=0)," - "write_timestamp_usage=none", + "cache_directory=,local_retention=300,name=),value_format=u," + "verbose=[],version=(major=0,minor=0),write_timestamp_usage=none", confchk_object_meta, 49}, {"table.meta", "app_metadata=,assert=(commit_timestamp=none," @@ -1454,9 +1442,9 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "prefix_compression=false,prefix_compression_min=4,readonly=false" ",split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90," "tiered_object=false,tiered_storage=(auth_token=,bucket=," - "bucket_prefix=,cache_directory=,local_retention=300,name=," - "object_target_size=0),value_format=u,verbose=[],version=(major=0" - ",minor=0),write_timestamp_usage=none", + "bucket_prefix=,cache_directory=,local_retention=300,name=)," + "value_format=u,verbose=[],version=(major=0,minor=0)," + "write_timestamp_usage=none", confchk_tier_meta, 50}, {"tiered.meta", "access_pattern_hint=none,allocation_size=4KB,app_metadata=," @@ -1476,8 +1464,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "readonly=false,split_deepen_min_child=0,split_deepen_per_child=0" ",split_pct=90,tiered_object=false,tiered_storage=(auth_token=," "bucket=,bucket_prefix=,cache_directory=,local_retention=300," - "name=,object_target_size=0),tiers=,value_format=u,verbose=[]," - "version=(major=0,minor=0),write_timestamp_usage=none", + "name=),tiers=,value_format=u,verbose=[],version=(major=0," + "minor=0),write_timestamp_usage=none", confchk_tiered_meta, 52}, {"wiredtiger_open", "backup_restore_target=," @@ -1494,31 +1482,32 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "flush_checkpoint=false,log_retention=0,realloc_exact=false," "rollback_error=0,slow_checkpoint=false,table_logging=false," "update_restore_evict=false),direct_io=,encryption=(keyid=,name=," - "secretkey=),error_prefix=,eviction=(evict_sample_inmem=true," - "threads_max=8,threads_min=1),eviction_checkpoint_target=1," - "eviction_dirty_target=5,eviction_dirty_trigger=20," - "eviction_target=80,eviction_trigger=95,eviction_updates_target=0" - ",eviction_updates_trigger=0,exclusive=false,extensions=," - "file_extend=,file_manager=(close_handle_minimum=250," - "close_idle_time=30,close_scan_interval=10),hash=(buckets=512," - "dhandle_buckets=512),hazard_max=1000,history_store=(file_max=0)," - "in_memory=false,io_capacity=(total=0),json_output=[]," - "log=(archive=true,compressor=,enabled=false,file_max=100MB," - "force_write_wait=0,os_cache_dirty_pct=0,path=\".\",prealloc=true" - ",recover=on,remove=true,zero_fill=false),lsm_manager=(merge=true" - ",worker_thread_max=4),mmap=true,mmap_all=false," - "multiprocess=false,operation_timeout_ms=0," - "operation_tracking=(enabled=false,path=\".\"),readonly=false," - "salvage=false,session_max=100,session_scratch_max=2MB," - "session_table_cache=true,shared_cache=(chunk=10MB,name=,quota=0," - "reserve=0,size=500MB),statistics=none,statistics_log=(json=false" - ",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\"" - ",wait=0),tiered_manager=(threads_max=8,threads_min=1,wait=0)," + "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)" + ",eviction_checkpoint_target=1,eviction_dirty_target=5," + "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" + ",eviction_updates_target=0,eviction_updates_trigger=0," + "exclusive=false,extensions=,file_extend=," + "file_manager=(close_handle_minimum=250,close_idle_time=30," + "close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512)," + "hazard_max=1000,history_store=(file_max=0),in_memory=false," + "io_capacity=(total=0),json_output=[],log=(archive=true," + "compressor=,enabled=false,file_max=100MB,force_write_wait=0," + "os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on," + "remove=true,zero_fill=false),lsm_manager=(merge=true," + "worker_thread_max=4),mmap=true,mmap_all=false,multiprocess=false" + ",operation_timeout_ms=0,operation_tracking=(enabled=false," + "path=\".\"),readonly=false,salvage=false,session_max=100," + "session_scratch_max=2MB,session_table_cache=true," + "shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB)," + "statistics=none,statistics_log=(json=false,on_close=false," + "path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\",wait=0)," + "tiered_manager=(threads_max=8,threads_min=1,wait=0)," "tiered_storage=(auth_token=,bucket=,bucket_prefix=," - "cache_directory=,local_retention=300,name=)," - "timing_stress_for_test=,transaction_sync=(enabled=false," - "method=fsync),use_environment=true,use_environment_priv=false," - "verbose=[],verify_metadata=false,write_through=", + "cache_directory=,local_retention=300,name=," + "object_target_size=10M),timing_stress_for_test=," + "transaction_sync=(enabled=false,method=fsync)," + "use_environment=true,use_environment_priv=false,verbose=[]," + "verify_metadata=false,write_through=", confchk_wiredtiger_open, 59}, {"wiredtiger_open_all", "backup_restore_target=," @@ -1535,32 +1524,32 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "flush_checkpoint=false,log_retention=0,realloc_exact=false," "rollback_error=0,slow_checkpoint=false,table_logging=false," "update_restore_evict=false),direct_io=,encryption=(keyid=,name=," - "secretkey=),error_prefix=,eviction=(evict_sample_inmem=true," - "threads_max=8,threads_min=1),eviction_checkpoint_target=1," - "eviction_dirty_target=5,eviction_dirty_trigger=20," - "eviction_target=80,eviction_trigger=95,eviction_updates_target=0" - ",eviction_updates_trigger=0,exclusive=false,extensions=," - "file_extend=,file_manager=(close_handle_minimum=250," - "close_idle_time=30,close_scan_interval=10),hash=(buckets=512," - "dhandle_buckets=512),hazard_max=1000,history_store=(file_max=0)," - "in_memory=false,io_capacity=(total=0),json_output=[]," - "log=(archive=true,compressor=,enabled=false,file_max=100MB," - "force_write_wait=0,os_cache_dirty_pct=0,path=\".\",prealloc=true" - ",recover=on,remove=true,zero_fill=false),lsm_manager=(merge=true" - ",worker_thread_max=4),mmap=true,mmap_all=false," - "multiprocess=false,operation_timeout_ms=0," - "operation_tracking=(enabled=false,path=\".\"),readonly=false," - "salvage=false,session_max=100,session_scratch_max=2MB," - "session_table_cache=true,shared_cache=(chunk=10MB,name=,quota=0," - "reserve=0,size=500MB),statistics=none,statistics_log=(json=false" - ",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\"" - ",wait=0),tiered_manager=(threads_max=8,threads_min=1,wait=0)," + "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)" + ",eviction_checkpoint_target=1,eviction_dirty_target=5," + "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" + ",eviction_updates_target=0,eviction_updates_trigger=0," + "exclusive=false,extensions=,file_extend=," + "file_manager=(close_handle_minimum=250,close_idle_time=30," + "close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512)," + "hazard_max=1000,history_store=(file_max=0),in_memory=false," + "io_capacity=(total=0),json_output=[],log=(archive=true," + "compressor=,enabled=false,file_max=100MB,force_write_wait=0," + "os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on," + "remove=true,zero_fill=false),lsm_manager=(merge=true," + "worker_thread_max=4),mmap=true,mmap_all=false,multiprocess=false" + ",operation_timeout_ms=0,operation_tracking=(enabled=false," + "path=\".\"),readonly=false,salvage=false,session_max=100," + "session_scratch_max=2MB,session_table_cache=true," + "shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB)," + "statistics=none,statistics_log=(json=false,on_close=false," + "path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\",wait=0)," + "tiered_manager=(threads_max=8,threads_min=1,wait=0)," "tiered_storage=(auth_token=,bucket=,bucket_prefix=," - "cache_directory=,local_retention=300,name=)," - "timing_stress_for_test=,transaction_sync=(enabled=false," - "method=fsync),use_environment=true,use_environment_priv=false," - "verbose=[],verify_metadata=false,version=(major=0,minor=0)," - "write_through=", + "cache_directory=,local_retention=300,name=," + "object_target_size=10M),timing_stress_for_test=," + "transaction_sync=(enabled=false,method=fsync)," + "use_environment=true,use_environment_priv=false,verbose=[]," + "verify_metadata=false,version=(major=0,minor=0),write_through=", confchk_wiredtiger_open_all, 60}, {"wiredtiger_open_basecfg", "backup_restore_target=," @@ -1577,30 +1566,30 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "log_retention=0,realloc_exact=false,rollback_error=0," "slow_checkpoint=false,table_logging=false," "update_restore_evict=false),direct_io=,encryption=(keyid=,name=," - "secretkey=),error_prefix=,eviction=(evict_sample_inmem=true," - "threads_max=8,threads_min=1),eviction_checkpoint_target=1," - "eviction_dirty_target=5,eviction_dirty_trigger=20," - "eviction_target=80,eviction_trigger=95,eviction_updates_target=0" - ",eviction_updates_trigger=0,extensions=,file_extend=," - "file_manager=(close_handle_minimum=250,close_idle_time=30," - "close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512)," - "hazard_max=1000,history_store=(file_max=0),io_capacity=(total=0)" - ",json_output=[],log=(archive=true,compressor=,enabled=false," - "file_max=100MB,force_write_wait=0,os_cache_dirty_pct=0," - "path=\".\",prealloc=true,recover=on,remove=true,zero_fill=false)" - ",lsm_manager=(merge=true,worker_thread_max=4),mmap=true," - "mmap_all=false,multiprocess=false,operation_timeout_ms=0," - "operation_tracking=(enabled=false,path=\".\"),readonly=false," - "salvage=false,session_max=100,session_scratch_max=2MB," - "session_table_cache=true,shared_cache=(chunk=10MB,name=,quota=0," - "reserve=0,size=500MB),statistics=none,statistics_log=(json=false" - ",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\"" - ",wait=0),tiered_manager=(threads_max=8,threads_min=1,wait=0)," + "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)" + ",eviction_checkpoint_target=1,eviction_dirty_target=5," + "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" + ",eviction_updates_target=0,eviction_updates_trigger=0," + "extensions=,file_extend=,file_manager=(close_handle_minimum=250," + "close_idle_time=30,close_scan_interval=10),hash=(buckets=512," + "dhandle_buckets=512),hazard_max=1000,history_store=(file_max=0)," + "io_capacity=(total=0),json_output=[],log=(archive=true," + "compressor=,enabled=false,file_max=100MB,force_write_wait=0," + "os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on," + "remove=true,zero_fill=false),lsm_manager=(merge=true," + "worker_thread_max=4),mmap=true,mmap_all=false,multiprocess=false" + ",operation_timeout_ms=0,operation_tracking=(enabled=false," + "path=\".\"),readonly=false,salvage=false,session_max=100," + "session_scratch_max=2MB,session_table_cache=true," + "shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB)," + "statistics=none,statistics_log=(json=false,on_close=false," + "path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\",wait=0)," + "tiered_manager=(threads_max=8,threads_min=1,wait=0)," "tiered_storage=(auth_token=,bucket=,bucket_prefix=," - "cache_directory=,local_retention=300,name=)," - "timing_stress_for_test=,transaction_sync=(enabled=false," - "method=fsync),verbose=[],verify_metadata=false,version=(major=0," - "minor=0),write_through=", + "cache_directory=,local_retention=300,name=," + "object_target_size=10M),timing_stress_for_test=," + "transaction_sync=(enabled=false,method=fsync),verbose=[]," + "verify_metadata=false,version=(major=0,minor=0),write_through=", confchk_wiredtiger_open_basecfg, 54}, {"wiredtiger_open_usercfg", "backup_restore_target=," @@ -1617,29 +1606,30 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "log_retention=0,realloc_exact=false,rollback_error=0," "slow_checkpoint=false,table_logging=false," "update_restore_evict=false),direct_io=,encryption=(keyid=,name=," - "secretkey=),error_prefix=,eviction=(evict_sample_inmem=true," - "threads_max=8,threads_min=1),eviction_checkpoint_target=1," - "eviction_dirty_target=5,eviction_dirty_trigger=20," - "eviction_target=80,eviction_trigger=95,eviction_updates_target=0" - ",eviction_updates_trigger=0,extensions=,file_extend=," - "file_manager=(close_handle_minimum=250,close_idle_time=30," - "close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512)," - "hazard_max=1000,history_store=(file_max=0),io_capacity=(total=0)" - ",json_output=[],log=(archive=true,compressor=,enabled=false," - "file_max=100MB,force_write_wait=0,os_cache_dirty_pct=0," - "path=\".\",prealloc=true,recover=on,remove=true,zero_fill=false)" - ",lsm_manager=(merge=true,worker_thread_max=4),mmap=true," - "mmap_all=false,multiprocess=false,operation_timeout_ms=0," - "operation_tracking=(enabled=false,path=\".\"),readonly=false," - "salvage=false,session_max=100,session_scratch_max=2MB," - "session_table_cache=true,shared_cache=(chunk=10MB,name=,quota=0," - "reserve=0,size=500MB),statistics=none,statistics_log=(json=false" - ",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\"" - ",wait=0),tiered_manager=(threads_max=8,threads_min=1,wait=0)," + "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)" + ",eviction_checkpoint_target=1,eviction_dirty_target=5," + "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" + ",eviction_updates_target=0,eviction_updates_trigger=0," + "extensions=,file_extend=,file_manager=(close_handle_minimum=250," + "close_idle_time=30,close_scan_interval=10),hash=(buckets=512," + "dhandle_buckets=512),hazard_max=1000,history_store=(file_max=0)," + "io_capacity=(total=0),json_output=[],log=(archive=true," + "compressor=,enabled=false,file_max=100MB,force_write_wait=0," + "os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on," + "remove=true,zero_fill=false),lsm_manager=(merge=true," + "worker_thread_max=4),mmap=true,mmap_all=false,multiprocess=false" + ",operation_timeout_ms=0,operation_tracking=(enabled=false," + "path=\".\"),readonly=false,salvage=false,session_max=100," + "session_scratch_max=2MB,session_table_cache=true," + "shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB)," + "statistics=none,statistics_log=(json=false,on_close=false," + "path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\",wait=0)," + "tiered_manager=(threads_max=8,threads_min=1,wait=0)," "tiered_storage=(auth_token=,bucket=,bucket_prefix=," - "cache_directory=,local_retention=300,name=)," - "timing_stress_for_test=,transaction_sync=(enabled=false," - "method=fsync),verbose=[],verify_metadata=false,write_through=", + "cache_directory=,local_retention=300,name=," + "object_target_size=10M),timing_stress_for_test=," + "transaction_sync=(enabled=false,method=fsync),verbose=[]," + "verify_metadata=false,write_through=", confchk_wiredtiger_open_usercfg, 53}, {NULL, NULL, NULL, 0}}; diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c index 32462f9d6ae..83df335f041 100644 --- a/src/third_party/wiredtiger/src/conn/conn_api.c +++ b/src/third_party/wiredtiger/src/conn/conn_api.c @@ -1101,7 +1101,6 @@ __conn_close(WT_CONNECTION *wt_conn, const char *config) WT_DECL_RET; WT_SESSION *wt_session; WT_SESSION_IMPL *s, *session; - WT_TIMER timer; uint32_t i; conn = (WT_CONNECTION_IMPL *)wt_conn; @@ -1109,8 +1108,6 @@ __conn_close(WT_CONNECTION *wt_conn, const char *config) CONNECTION_API_CALL(conn, session, close, config, cfg); err: - __wt_timer_start(session, &timer); - /* * Ramp the eviction dirty target down to encourage eviction threads to clear dirty content out * of cache. @@ -1191,14 +1188,6 @@ err: if (cval.val != 0) F_SET(conn, WT_CONN_LEAK_MEMORY); - /* Time since the shutdown has started. */ - __wt_timer_evaluate_ms(session, &timer, &conn->shutdown_timeline.shutdown_ms); - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "shutdown was completed successfully and took %" PRIu64 "ms, including %" PRIu64 - "ms for the rollback to stable, and %" PRIu64 "ms for the checkpoint.", - conn->shutdown_timeline.shutdown_ms, conn->shutdown_timeline.rts_ms, - conn->shutdown_timeline.checkpoint_ms); - WT_TRET(__wt_connection_close(conn)); /* We no longer have a session, don't try to update it. */ @@ -2255,16 +2244,12 @@ __wt_timing_stress_config(WT_SESSION_IMPL *session, const char *cfg[]) {"checkpoint_slow", WT_TIMING_STRESS_CHECKPOINT_SLOW}, {"checkpoint_stop", WT_TIMING_STRESS_CHECKPOINT_STOP}, {"compact_slow", WT_TIMING_STRESS_COMPACT_SLOW}, - {"failpoint_eviction_fail_after_reconciliation", - WT_TIMING_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION}, {"failpoint_history_delete_key_from_ts", WT_TIMING_STRESS_FAILPOINT_HISTORY_STORE_DELETE_KEY_FROM_TS}, {"history_store_checkpoint_delay", WT_TIMING_STRESS_HS_CHECKPOINT_DELAY}, {"history_store_search", WT_TIMING_STRESS_HS_SEARCH}, {"history_store_sweep_race", WT_TIMING_STRESS_HS_SWEEP}, {"prepare_checkpoint_delay", WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY}, - {"prepare_resolution", WT_TIMING_STRESS_PREPARE_RESOLUTION}, - {"prepare_resolution_2", WT_TIMING_STRESS_PREPARE_RESOLUTION_2}, {"split_1", WT_TIMING_STRESS_SPLIT_1}, {"split_2", WT_TIMING_STRESS_SPLIT_2}, {"split_3", WT_TIMING_STRESS_SPLIT_3}, {"split_4", WT_TIMING_STRESS_SPLIT_4}, {"split_5", WT_TIMING_STRESS_SPLIT_5}, {"split_6", WT_TIMING_STRESS_SPLIT_6}, @@ -2282,8 +2267,9 @@ __wt_timing_stress_config(WT_SESSION_IMPL *session, const char *cfg[]) flags = 0; for (ft = stress_types; ft->name != NULL; ft++) { - if ((ret = __wt_config_subgets(session, &cval, ft->name, &sval)) == 0 && sval.val != 0) + if ((ret = __wt_config_subgets(session, &cval, ft->name, &sval)) == 0 && sval.val != 0) { LF_SET(ft->flag); + } WT_RET_NOTFOUND_OK(ret); } @@ -3015,8 +3001,8 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *c WT_ERR(wt_session->salvage(wt_session, WT_METAFILE_URI, NULL)); } - /* Initialize connection values from stored metadata. */ - WT_ERR(__wt_metadata_load_prior_state(session)); + /* Initialize the connection's base write generation. */ + WT_ERR(__wt_metadata_init_base_write_gen(session)); WT_ERR(__wt_metadata_cursor(session, NULL)); /* diff --git a/src/third_party/wiredtiger/src/conn/conn_cache.c b/src/third_party/wiredtiger/src/conn/conn_cache.c index 90234099c62..bf14fcf4914 100644 --- a/src/third_party/wiredtiger/src/conn/conn_cache.c +++ b/src/third_party/wiredtiger/src/conn/conn_cache.c @@ -151,9 +151,6 @@ __cache_config_local(WT_SESSION_IMPL *session, bool shared, const char *cfg[]) conn->evict_threads_max = evict_threads_max; conn->evict_threads_min = evict_threads_min; - WT_RET(__wt_config_gets(session, cfg, "eviction.evict_sample_inmem", &cval)); - conn->evict_sample_inmem = cval.val != 0; - /* Retrieve the wait time and convert from milliseconds */ WT_RET(__wt_config_gets(session, cfg, "cache_max_wait_ms", &cval)); cache->cache_max_wait_us = (uint64_t)(cval.val * WT_THOUSAND); @@ -323,9 +320,6 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session) WT_STAT_SET(session, stats, cache_bytes_updates, __wt_cache_bytes_updates(cache)); WT_STAT_SET(session, stats, cache_eviction_maximum_page_size, cache->evict_max_page_size); - WT_STAT_SET(session, stats, cache_eviction_maximum_milliseconds, cache->evict_max_ms); - WT_STAT_SET( - session, stats, cache_reentry_hs_eviction_milliseconds, cache->reentry_hs_eviction_ms); WT_STAT_SET( session, stats, cache_pages_dirty, cache->pages_dirty_intl + cache->pages_dirty_leaf); @@ -344,11 +338,7 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session) if (conn->evict_server_running) WT_STAT_SET(session, stats, cache_eviction_walks_active, cache->walk_session->nhazard); - WT_STAT_SET( - session, stats, rec_maximum_hs_wrapup_milliseconds, conn->rec_maximum_hs_wrapup_milliseconds); - WT_STAT_SET(session, stats, rec_maximum_image_build_milliseconds, - conn->rec_maximum_image_build_milliseconds); - WT_STAT_SET(session, stats, rec_maximum_milliseconds, conn->rec_maximum_milliseconds); + WT_STAT_SET(session, stats, rec_maximum_seconds, conn->rec_maximum_seconds); } /* diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c index 62de25cc01b..347596b494a 100644 --- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c +++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c @@ -26,7 +26,9 @@ __conn_dhandle_config_clear(WT_SESSION_IMPL *session) __wt_free(session, *a); __wt_free(session, dhandle->cfg); __wt_free(session, dhandle->meta_base); +#ifdef HAVE_DIAGNOSTIC __wt_free(session, dhandle->orig_meta_base); +#endif } /* @@ -87,7 +89,9 @@ __conn_dhandle_config_set(WT_SESSION_IMPL *session) cfg[3] = NULL; WT_ERR(__wt_strdup(session, WT_CONFIG_BASE(session, file_meta), &dhandle->cfg[0])); WT_ASSERT(session, dhandle->meta_base == NULL); +#ifdef HAVE_DIAGNOSTIC WT_ASSERT(session, dhandle->orig_meta_base == NULL); +#endif WT_ERR(__wt_config_collapse(session, cfg, &tmp)); /* * Now strip out the checkpoint related items from the configuration string and that is now @@ -113,14 +117,14 @@ __conn_dhandle_config_set(WT_SESSION_IMPL *session) } dhandle->cfg[1] = metaconf; dhandle->meta_base = base; + dhandle->meta_base_length = base == NULL ? 0 : strlen(base); +#ifdef HAVE_DIAGNOSTIC /* Save the original metadata value for further check to avoid writing corrupted data. */ - if (base != NULL) { - dhandle->meta_hash = __wt_hash_city64(base, strlen(base)); - __wt_epoch(session, &dhandle->base_upd); + if (base == NULL) + dhandle->orig_meta_base = NULL; + else WT_ERR(__wt_strdup(session, base, &dhandle->orig_meta_base)); - dhandle->orig_meta_hash = dhandle->meta_hash; - dhandle->orig_upd = dhandle->base_upd; - } +#endif return (0); err: diff --git a/src/third_party/wiredtiger/src/conn/conn_log.c b/src/third_party/wiredtiger/src/conn/conn_log.c index 8dd20a5469a..f48f2f6512c 100644 --- a/src/third_party/wiredtiger/src/conn/conn_log.c +++ b/src/third_party/wiredtiger/src/conn/conn_log.c @@ -735,8 +735,8 @@ restart: /* * Copy the flag for later closing. */ - if (F_ISSET_ATOMIC_16(slot, WT_SLOT_CLOSEFH)) - F_SET_ATOMIC_16(coalescing, WT_SLOT_CLOSEFH); + if (F_ISSET(slot, WT_SLOT_CLOSEFH)) + F_SET(coalescing, WT_SLOT_CLOSEFH); } else { /* * If this written slot is not the next LSN, try to start coalescing with later @@ -766,7 +766,7 @@ restart: /* * Signal the close thread if needed. */ - if (F_ISSET_ATOMIC_16(slot, WT_SLOT_CLOSEFH)) + if (F_ISSET(slot, WT_SLOT_CLOSEFH)) __wt_cond_signal(session, conn->log_file_cond); } __wt_log_slot_free(session, slot); diff --git a/src/third_party/wiredtiger/src/conn/conn_open.c b/src/third_party/wiredtiger/src/conn/conn_open.c index acb6b08c8d1..5b89817c9b6 100644 --- a/src/third_party/wiredtiger/src/conn/conn_open.c +++ b/src/third_party/wiredtiger/src/conn/conn_open.c @@ -39,6 +39,8 @@ __wt_connection_open(WT_CONNECTION_IMPL *conn, const char *cfg[]) */ conn->default_session = session; + __wt_seconds(session, &conn->ckpt_most_recent); + /* * Publish: there must be a barrier to ensure the connection structure fields are set before * other threads read from the pointer. diff --git a/src/third_party/wiredtiger/src/cursor/cur_bulk.c b/src/third_party/wiredtiger/src/cursor/cur_bulk.c index 92f0cfa74e5..6ad5e98da72 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_bulk.c +++ b/src/third_party/wiredtiger/src/cursor/cur_bulk.c @@ -350,8 +350,6 @@ __wt_curbulk_close(WT_SESSION_IMPL *session, WT_CURSOR_BULK *cbulk) WT_DECL_RET; ret = __wt_bulk_wrapup(session, cbulk); - if (ret == 0) - WT_STAT_CONN_DECR_ATOMIC(session, cursor_bulk_count); __wt_scr_free(session, &cbulk->last); return (ret); diff --git a/src/third_party/wiredtiger/src/cursor/cur_file.c b/src/third_party/wiredtiger/src/cursor/cur_file.c index 60b7277509a..d373c089c06 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_file.c +++ b/src/third_party/wiredtiger/src/cursor/cur_file.c @@ -88,7 +88,6 @@ __curfile_next(WT_CURSOR *cursor) cbt = (WT_CURSOR_BTREE *)cursor; CURSOR_API_CALL(cursor, session, next, CUR2BT(cbt)); - API_RETRYABLE(session); WT_ERR(__cursor_copy_release(cursor)); WT_ERR(__wt_btcur_next(cbt, false)); @@ -99,7 +98,6 @@ __curfile_next(WT_CURSOR *cursor) F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT); err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } @@ -143,7 +141,6 @@ __curfile_prev(WT_CURSOR *cursor) cbt = (WT_CURSOR_BTREE *)cursor; CURSOR_API_CALL(cursor, session, prev, CUR2BT(cbt)); - API_RETRYABLE(session); WT_ERR(__cursor_copy_release(cursor)); WT_ERR(__wt_btcur_prev(cbt, false)); @@ -154,7 +151,6 @@ __curfile_prev(WT_CURSOR *cursor) F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT); err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } @@ -198,7 +194,6 @@ __curfile_search(WT_CURSOR *cursor) cbt = (WT_CURSOR_BTREE *)cursor; CURSOR_API_CALL(cursor, session, search, CUR2BT(cbt)); - API_RETRYABLE(session); WT_ERR(__cursor_copy_release(cursor)); WT_ERR(__cursor_checkkey(cursor)); @@ -213,7 +208,6 @@ __curfile_search(WT_CURSOR *cursor) F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT); err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } @@ -231,7 +225,6 @@ __curfile_search_near(WT_CURSOR *cursor, int *exact) cbt = (WT_CURSOR_BTREE *)cursor; CURSOR_API_CALL(cursor, session, search_near, CUR2BT(cbt)); - API_RETRYABLE(session); WT_ERR(__cursor_copy_release(cursor)); WT_ERR(__cursor_checkkey(cursor)); @@ -246,7 +239,6 @@ __curfile_search_near(WT_CURSOR *cursor, int *exact) F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT); err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } @@ -733,12 +725,6 @@ __curfile_create(WT_SESSION_IMPL *session, WT_CURSOR *owner, const char *cfg[], */ WT_ERR(__wt_config_gets_def(session, cfg, "next_random", 0, &cval)); if (cval.val != 0) { - WT_ERR(__wt_config_gets_def(session, cfg, "next_random_seed", 0, &cval)); - if (cval.val != 0) - __wt_random_init_custom_seed(&cbt->rnd, (uint64_t)cval.val); - else - __wt_random_init_seed(session, &cbt->rnd); - if (WT_CURSOR_RECNO(cursor)) WT_ERR_MSG( session, ENOTSUP, "next_random configuration not supported for column-store objects"); @@ -790,9 +776,6 @@ err: *cursorp = NULL; } - if (ret == 0 && bulk) - WT_STAT_CONN_INCR_ATOMIC(session, cursor_bulk_count); - return (ret); } diff --git a/src/third_party/wiredtiger/src/cursor/cur_hs.c b/src/third_party/wiredtiger/src/cursor/cur_hs.c index 6d828176d53..3acdabcb451 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_hs.c +++ b/src/third_party/wiredtiger/src/cursor/cur_hs.c @@ -914,8 +914,6 @@ __curhs_insert(WT_CURSOR *cursor) * update as the update after the tombstone. */ if (WT_TIME_WINDOW_HAS_STOP(&hs_cursor->time_window)) { - /* We should not see a tombstone with max transaction id. */ - WT_ASSERT(session, hs_cursor->time_window.stop_txn != WT_TXN_MAX); /* * Insert a delete record to represent stop time point for the actual record to be inserted. * Set the stop time point as the commit time point of the history store delete record. diff --git a/src/third_party/wiredtiger/src/cursor/cur_std.c b/src/third_party/wiredtiger/src/cursor/cur_std.c index a7a4e597498..c884aec790f 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_std.c +++ b/src/third_party/wiredtiger/src/cursor/cur_std.c @@ -725,13 +725,11 @@ __wt_cursor_cache_release(WT_SESSION_IMPL *session, WT_CURSOR *cursor, bool *rel /* * Do any sweeping first, if there are errors, it will be easier to clean up if the cursor is - * not already cached. When sweeping, don't use the "big" option. We want only a modest sweep as - * we're in a performance path. + * not already cached. */ if (--session->cursor_sweep_countdown == 0) { session->cursor_sweep_countdown = WT_SESSION_CURSOR_SWEEP_COUNTDOWN; - WT_RET(__wt_session_cursor_cache_sweep(session, false)); - __wt_session_dhandle_sweep(session); + WT_RET(__wt_session_cursor_cache_sweep(session)); } /* diff --git a/src/third_party/wiredtiger/src/cursor/cur_table.c b/src/third_party/wiredtiger/src/cursor/cur_table.c index 74fcd93603d..3f6d53db4ae 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_table.c +++ b/src/third_party/wiredtiger/src/cursor/cur_table.c @@ -361,11 +361,9 @@ __curtable_next(WT_CURSOR *cursor) ctable = (WT_CURSOR_TABLE *)cursor; JOINABLE_CURSOR_API_CALL(cursor, session, next, NULL); - API_RETRYABLE(session); APPLY_CG(ctable, next); err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } @@ -416,11 +414,9 @@ __curtable_prev(WT_CURSOR *cursor) ctable = (WT_CURSOR_TABLE *)cursor; JOINABLE_CURSOR_API_CALL(cursor, session, prev, NULL); - API_RETRYABLE(session) APPLY_CG(ctable, prev); err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } @@ -456,11 +452,9 @@ __curtable_search(WT_CURSOR *cursor) ctable = (WT_CURSOR_TABLE *)cursor; JOINABLE_CURSOR_API_CALL(cursor, session, search, NULL); - API_RETRYABLE(session); APPLY_CG(ctable, search); err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } @@ -479,8 +473,6 @@ __curtable_search_near(WT_CURSOR *cursor, int *exact) ctable = (WT_CURSOR_TABLE *)cursor; JOINABLE_CURSOR_API_CALL(cursor, session, search_near, NULL); - API_RETRYABLE(session); - cp = ctable->cg_cursors; primary = *cp; WT_ERR(primary->search_near(primary, exact)); @@ -494,7 +486,6 @@ __curtable_search_near(WT_CURSOR *cursor, int *exact) } err: - API_RETRYABLE_END(session, ret); API_END_RET(session, ret); } diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c index 18459d5bc9f..71abcf190fb 100644 --- a/src/third_party/wiredtiger/src/evict/evict_lru.c +++ b/src/third_party/wiredtiger/src/evict/evict_lru.c @@ -9,7 +9,6 @@ #include "wt_internal.h" static int __evict_clear_all_walks(WT_SESSION_IMPL *); -static void __evict_list_clear_page_locked(WT_SESSION_IMPL *, WT_REF *, bool); static int WT_CDECL __evict_lru_cmp(const void *, const void *); static int __evict_lru_pages(WT_SESSION_IMPL *, bool); static int __evict_lru_walk(WT_SESSION_IMPL *); @@ -148,31 +147,36 @@ __evict_list_clear(WT_SESSION_IMPL *session, WT_EVICT_ENTRY *e) { if (e->ref != NULL) { WT_ASSERT(session, F_ISSET_ATOMIC_16(e->ref->page, WT_PAGE_EVICT_LRU)); - F_CLR_ATOMIC_16(e->ref->page, WT_PAGE_EVICT_LRU | WT_PAGE_EVICT_LRU_URGENT); + F_CLR_ATOMIC_16(e->ref->page, WT_PAGE_EVICT_LRU); } e->ref = NULL; e->btree = WT_DEBUG_POINT; } /* - * __evict_list_clear_page_locked -- - * This function searches for the page in all the eviction queues (skipping the urgent queue if - * requested) and clears it if found. It does not take the eviction queue lock, so the caller - * should hold the appropriate locks before calling this function. + * __wt_evict_list_clear_page -- + * Make sure a page is not in the LRU eviction list. This called from the page eviction code to + * make sure there is no attempt to evict a child page multiple times. */ -static void -__evict_list_clear_page_locked(WT_SESSION_IMPL *session, WT_REF *ref, bool exclude_urgent) +void +__wt_evict_list_clear_page(WT_SESSION_IMPL *session, WT_REF *ref) { WT_CACHE *cache; WT_EVICT_ENTRY *evict; - uint32_t elem, i, q, last_queue_idx; + uint32_t i, elem, q; bool found; - last_queue_idx = exclude_urgent ? WT_EVICT_URGENT_QUEUE : WT_EVICT_QUEUE_MAX; + WT_ASSERT(session, __wt_ref_is_root(ref) || ref->state == WT_REF_LOCKED); + + /* Fast path: if the page isn't on the queue, don't bother searching. */ + if (!F_ISSET_ATOMIC_16(ref->page, WT_PAGE_EVICT_LRU)) + return; + cache = S2C(session)->cache; - found = false; + __wt_spin_lock(session, &cache->evict_queue_lock); - for (q = 0; q < last_queue_idx && !found; q++) { + found = false; + for (q = 0; q < WT_EVICT_QUEUE_MAX && !found; q++) { __wt_spin_lock(session, &cache->evict_queues[q].evict_lock); elem = cache->evict_queues[q].evict_max; for (i = 0, evict = cache->evict_queues[q].evict_queue; i < elem; i++, evict++) @@ -184,30 +188,6 @@ __evict_list_clear_page_locked(WT_SESSION_IMPL *session, WT_REF *ref, bool exclu __wt_spin_unlock(session, &cache->evict_queues[q].evict_lock); } WT_ASSERT(session, !F_ISSET_ATOMIC_16(ref->page, WT_PAGE_EVICT_LRU)); -} - -/* - * __wt_evict_list_clear_page -- - * Check whether a page is present in the LRU eviction list. If the page is found in the list, - * remove it. This is called from the page eviction code to make sure there is no attempt to - * evict a child page multiple times. - */ -void -__wt_evict_list_clear_page(WT_SESSION_IMPL *session, WT_REF *ref) -{ - WT_CACHE *cache; - - WT_ASSERT(session, __wt_ref_is_root(ref) || ref->state == WT_REF_LOCKED); - - /* Fast path: if the page isn't in the queue, don't bother searching. */ - if (!F_ISSET_ATOMIC_16(ref->page, WT_PAGE_EVICT_LRU)) - return; - cache = S2C(session)->cache; - - __wt_spin_lock(session, &cache->evict_queue_lock); - - /* Remove the reference from the eviction queues. */ - __evict_list_clear_page_locked(session, ref, false); __wt_spin_unlock(session, &cache->evict_queue_lock); } @@ -1498,19 +1478,15 @@ retry: /* Skip files that don't allow eviction. */ btree = dhandle->handle; - if (btree->evict_disabled > 0) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_trees_eviction_disabled); + if (btree->evict_disabled > 0) continue; - } /* * Skip files that are checkpointing if we are only looking for dirty pages. */ if (WT_BTREE_SYNCING(btree) && - !F_ISSET(cache, WT_CACHE_EVICT_CLEAN | WT_CACHE_EVICT_UPDATES)) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_checkpointing_trees); + !F_ISSET(cache, WT_CACHE_EVICT_CLEAN | WT_CACHE_EVICT_UPDATES)) continue; - } /* * Skip files that are configured to stick in cache until we become aggressive. @@ -1519,10 +1495,8 @@ retry: * its pages. */ if (btree->evict_priority != 0 && !__wt_cache_aggressive(session) && - !__wt_btree_dominating_cache(session, btree)) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_trees_stick_in_cache); + !__wt_btree_dominating_cache(session, btree)) continue; - } /* * Skip files if we have too many active walks. @@ -1531,18 +1505,14 @@ retry: * Even though that ceiling has been removed, we need to test eviction with huge numbers of * active trees before allowing larger numbers of hazard pointers in the walk session. */ - if (btree->evict_ref == NULL && session->nhazard > WT_EVICT_MAX_TREES) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_trees_too_many_active_walks); + if (btree->evict_ref == NULL && session->nhazard > WT_EVICT_MAX_TREES) continue; - } /* * If we are filling the queue, skip files that haven't been useful in the past. */ - if (btree->evict_walk_period != 0 && btree->evict_walk_skips++ < btree->evict_walk_period) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_trees_not_useful_before); + if (btree->evict_walk_period != 0 && btree->evict_walk_skips++ < btree->evict_walk_period) continue; - } btree->evict_walk_skips = 0; (void)__wt_atomic_addi32(&dhandle->session_inuse, 1); @@ -1673,12 +1643,10 @@ static uint32_t __evict_walk_target(WT_SESSION_IMPL *session) { WT_CACHE *cache; - uint64_t btree_clean_inuse, btree_dirty_inuse, btree_updates_inuse, bytes_per_slot, cache_inuse; + uint64_t btree_inuse, bytes_per_slot, cache_inuse; uint32_t target_pages, target_pages_clean, target_pages_dirty, target_pages_updates; - bool want_tree; cache = S2C(session)->cache; - btree_clean_inuse = btree_dirty_inuse = btree_updates_inuse = 0; target_pages_clean = target_pages_dirty = target_pages_updates = 0; /* @@ -1692,25 +1660,24 @@ __evict_walk_target(WT_SESSION_IMPL *session) * 99+% of the cache (and only have to walk it once). */ if (F_ISSET(cache, WT_CACHE_EVICT_CLEAN)) { - btree_clean_inuse = __wt_btree_bytes_evictable(session); + btree_inuse = __wt_btree_bytes_evictable(session); cache_inuse = __wt_cache_bytes_inuse(cache); bytes_per_slot = 1 + cache_inuse / cache->evict_slots; - target_pages_clean = (uint32_t)((btree_clean_inuse + bytes_per_slot / 2) / bytes_per_slot); + target_pages_clean = (uint32_t)((btree_inuse + bytes_per_slot / 2) / bytes_per_slot); } if (F_ISSET(cache, WT_CACHE_EVICT_DIRTY)) { - btree_dirty_inuse = __wt_btree_dirty_leaf_inuse(session); + btree_inuse = __wt_btree_dirty_leaf_inuse(session); cache_inuse = __wt_cache_dirty_leaf_inuse(cache); bytes_per_slot = 1 + cache_inuse / cache->evict_slots; - target_pages_dirty = (uint32_t)((btree_dirty_inuse + bytes_per_slot / 2) / bytes_per_slot); + target_pages_dirty = (uint32_t)((btree_inuse + bytes_per_slot / 2) / bytes_per_slot); } if (F_ISSET(cache, WT_CACHE_EVICT_UPDATES)) { - btree_updates_inuse = __wt_btree_bytes_updates(session); + btree_inuse = __wt_btree_bytes_updates(session); cache_inuse = __wt_cache_bytes_updates(cache); bytes_per_slot = 1 + cache_inuse / cache->evict_slots; - target_pages_updates = - (uint32_t)((btree_updates_inuse + bytes_per_slot / 2) / bytes_per_slot); + target_pages_updates = (uint32_t)((btree_inuse + bytes_per_slot / 2) / bytes_per_slot); } target_pages = WT_MAX(target_pages_clean, target_pages_dirty); @@ -1722,14 +1689,12 @@ __evict_walk_target(WT_SESSION_IMPL *session) * interest. */ if (target_pages == 0) { - want_tree = (F_ISSET(cache, WT_CACHE_EVICT_CLEAN) && (btree_clean_inuse > 0)) || - (F_ISSET(cache, WT_CACHE_EVICT_DIRTY) && (btree_dirty_inuse > 0)) || - (F_ISSET(cache, WT_CACHE_EVICT_UPDATES) && (btree_updates_inuse > 0)); + btree_inuse = F_ISSET(cache, WT_CACHE_EVICT_CLEAN | WT_CACHE_EVICT_UPDATES) ? + __wt_btree_bytes_evictable(session) : + __wt_btree_dirty_leaf_inuse(session); - if (!want_tree) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_unwanted_tree); + if (btree_inuse == 0) return (0); - } } /* @@ -1779,17 +1744,8 @@ __evict_walk_tree(WT_SESSION_IMPL *session, WT_EVICT_QUEUE *queue, u_int max_ent */ start = queue->evict_queue + *slotp; remaining_slots = max_entries - *slotp; - - /* - * For this handle, calculate the number of target pages to evict. If the number of target pages - * is zero, then simply return early from this function. - * - * If the progress has not met the previous target, continue using the previous target. - */ - target_pages = __evict_walk_target(session); - - if ((target_pages == 0) || btree->evict_walk_progress >= btree->evict_walk_target) { - btree->evict_walk_target = target_pages; + if (btree->evict_walk_progress >= btree->evict_walk_target) { + btree->evict_walk_target = __evict_walk_target(session); btree->evict_walk_progress = 0; } target_pages = btree->evict_walk_target - btree->evict_walk_progress; @@ -1885,19 +1841,14 @@ __evict_walk_tree(WT_SESSION_IMPL *session, WT_EVICT_QUEUE *queue, u_int max_ent if (btree->evict_ref == NULL) { for (;;) { /* Ensure internal pages indexes remain valid */ - WT_WITH_PAGE_INDEX(session, - ret = __wt_random_descent(session, &btree->evict_ref, read_flags, &session->rnd)); + WT_WITH_PAGE_INDEX( + session, ret = __wt_random_descent(session, &btree->evict_ref, read_flags)); if (ret != WT_RESTART) break; WT_STAT_CONN_INCR(session, cache_eviction_walk_restart); WT_STAT_DATA_INCR(session, cache_eviction_walk_restart); } WT_RET_NOTFOUND_OK(ret); - - if (btree->evict_ref == NULL) { - WT_STAT_CONN_INCR(session, cache_eviction_walk_random_returns_null_position); - WT_STAT_DATA_INCR(session, cache_eviction_walk_random_returns_null_position); - } } break; } @@ -2002,10 +1953,8 @@ __evict_walk_tree(WT_SESSION_IMPL *session, WT_EVICT_QUEUE *queue, u_int max_ent } /* Don't queue dirty pages in trees during checkpoints. */ - if (modified && WT_BTREE_SYNCING(btree)) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_dirty_pages_during_checkpoint); + if (modified && WT_BTREE_SYNCING(btree)) continue; - } /* * It's possible (but unlikely) to visit a page without a read generation, if we race with @@ -2049,19 +1998,15 @@ __evict_walk_tree(WT_SESSION_IMPL *session, WT_EVICT_QUEUE *queue, u_int max_ent if (WT_IS_METADATA(session->dhandle) && F_ISSET(cache, WT_CACHE_EVICT_CLEAN_HARD) && F_ISSET(ref, WT_REF_FLAG_LEAF) && !modified && page->modify != NULL && !__wt_txn_visible_all( - session, page->modify->rec_max_txn, page->modify->rec_max_timestamp)) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_metatdata_with_history); + session, page->modify->rec_max_txn, page->modify->rec_max_timestamp)) continue; - } /* Skip pages we don't want. */ want_page = (F_ISSET(cache, WT_CACHE_EVICT_CLEAN) && !modified) || (F_ISSET(cache, WT_CACHE_EVICT_DIRTY) && modified) || (F_ISSET(cache, WT_CACHE_EVICT_UPDATES) && page->modify != NULL); - if (!want_page) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_unwanted_pages); + if (!want_page) continue; - } /* * Don't attempt eviction of internal pages with children in cache (indicated by seeing an @@ -2084,21 +2029,13 @@ __evict_walk_tree(WT_SESSION_IMPL *session, WT_EVICT_QUEUE *queue, u_int max_ent /* * If the global transaction state hasn't changed since the last time we tried eviction, - * it's unlikely we can make progress. This heuristic avoids repeated attempts to evict the - * same page. + * it's unlikely we can make progress. Similarly, if the most recent update on the page is + * not yet globally visible, eviction will fail. This heuristic avoids repeated attempts to + * evict the same page. */ - if (!__wt_page_evict_retry(session, page)) { - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_pages_retry); - continue; - } else if (modified && page->modify->update_txn >= conn->txn_global.last_running) { - /* - * FIXME-WT-11805: The assumption that the eviction will fail if most recent update on - * the page from the transaction that is greater than the last running transaction has - * changed because now eviction also has it's own snapshot for visibility check. - */ - WT_STAT_CONN_INCR(session, cache_eviction_server_skip_pages_last_running); + if (!__wt_page_evict_retry(session, page) || + (modified && page->modify->update_txn >= conn->txn_global.last_running)) continue; - } fast: /* If the page can't be evicted, give up. */ @@ -2459,11 +2396,6 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, bool readonly, d if (app_thread) time_start = __wt_clock(session); - /* - * Note that this for loop is designed to reset expected eviction error codes before exiting, - * namely, the busy return and empty eviction queue. We do not need the calling functions to - * have to deal with internal eviction return codes. - */ for (initial_progress = cache->eviction_progress;; ret = 0) { /* * If eviction is stuck, check if this thread is likely causing problems and should be @@ -2475,7 +2407,7 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, bool readonly, d __wt_verbose_debug( session, WT_VERB_TRANSACTION, "Rollback reason: %s", "Cache full"); --cache->evict_aggressive_score; - WT_STAT_CONN_INCR(session, txn_rollback_oldest_pinned); + WT_STAT_CONN_INCR(session, txn_fail_cache); } WT_ERR(ret); } @@ -2490,13 +2422,6 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, bool readonly, d if (__wt_op_timer_fired(session)) break; - /* Check if we have exceeded the global or the session timeout for waiting on the cache. */ - if (time_start != 0 && cache_max_wait_us != 0) { - time_stop = __wt_clock(session); - if (session->cache_wait_us + WT_CLOCKDIFF_US(time_stop, time_start) > cache_max_wait_us) - break; - } - /* * Check if we have become busy. * @@ -2531,6 +2456,12 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, bool readonly, d default: goto err; } + /* Stop if we've exceeded the time out. */ + if (time_start != 0 && cache_max_wait_us != 0) { + time_stop = __wt_clock(session); + if (session->cache_wait_us + WT_CLOCKDIFF_US(time_stop, time_start) > cache_max_wait_us) + goto err; + } } err: @@ -2540,13 +2471,8 @@ err: WT_STAT_CONN_INCRV(session, application_cache_time, elapsed); WT_STAT_SESSION_INCRV(session, cache_time, elapsed); session->cache_wait_us += elapsed; - /* - * Check if a rollback is required only if there has not been an error. Returning an error - * takes precedence over asking for a rollback. We can not do both. - */ - if (ret == 0 && cache_max_wait_us != 0 && session->cache_wait_us > cache_max_wait_us) { - ret = __wt_txn_rollback_required(session, WT_TXN_ROLLBACK_REASON_CACHE); - --cache->evict_aggressive_score; + if (cache_max_wait_us != 0 && session->cache_wait_us > cache_max_wait_us) { + WT_TRET(WT_CACHE_FULL); WT_STAT_CONN_INCR(session, cache_timed_out_ops); } } @@ -2574,35 +2500,18 @@ __wt_page_evict_urgent(WT_SESSION_IMPL *session, WT_REF *ref) WT_ASSERT(session, !__wt_ref_is_root(ref)); page = ref->page; - if (S2BT(session)->evict_disabled > 0 || F_ISSET_ATOMIC_16(page, WT_PAGE_EVICT_LRU_URGENT)) - return (false); - - cache = S2C(session)->cache; - if (F_ISSET_ATOMIC_16(page, WT_PAGE_EVICT_LRU) && F_ISSET(cache, WT_CACHE_EVICT_ALL)) + if (F_ISSET_ATOMIC_16(page, WT_PAGE_EVICT_LRU) || S2BT(session)->evict_disabled > 0) return (false); /* Append to the urgent queue if we can. */ + cache = S2C(session)->cache; urgent_queue = &cache->evict_queues[WT_EVICT_URGENT_QUEUE]; queued = false; __wt_spin_lock(session, &cache->evict_queue_lock); - - /* Check again, in case we raced with another thread. */ - if (S2BT(session)->evict_disabled > 0 || F_ISSET_ATOMIC_16(page, WT_PAGE_EVICT_LRU_URGENT)) + if (F_ISSET_ATOMIC_16(page, WT_PAGE_EVICT_LRU) || S2BT(session)->evict_disabled > 0) goto done; - /* - * If the page is already in the LRU eviction list, clear it from the list if eviction server is - * not running. - */ - if (F_ISSET_ATOMIC_16(page, WT_PAGE_EVICT_LRU)) { - if (!F_ISSET(cache, WT_CACHE_EVICT_ALL)) { - __evict_list_clear_page_locked(session, ref, true); - WT_STAT_CONN_INCR(session, cache_eviction_clear_ordinary); - } else - goto done; - } - __wt_spin_lock(session, &urgent_queue->evict_lock); if (__evict_queue_empty(urgent_queue, false)) { urgent_queue->evict_current = urgent_queue->evict_queue; @@ -2613,7 +2522,6 @@ __wt_page_evict_urgent(WT_SESSION_IMPL *session, WT_REF *ref) __evict_push_candidate(session, urgent_queue, evict, ref)) { ++urgent_queue->evict_candidates; queued = true; - FLD_SET(page->flags_atomic, WT_PAGE_EVICT_LRU_URGENT); } __wt_spin_unlock(session, &urgent_queue->evict_lock); diff --git a/src/third_party/wiredtiger/src/evict/evict_page.c b/src/third_party/wiredtiger/src/evict/evict_page.c index 440dca03720..15e2286a429 100644 --- a/src/third_party/wiredtiger/src/evict/evict_page.c +++ b/src/third_party/wiredtiger/src/evict/evict_page.c @@ -10,7 +10,6 @@ static int __evict_page_clean_update(WT_SESSION_IMPL *, WT_REF *, uint32_t); static int __evict_page_dirty_update(WT_SESSION_IMPL *, WT_REF *, uint32_t); -static int __evict_reconcile(WT_SESSION_IMPL *, WT_REF *, uint32_t); static int __evict_review(WT_SESSION_IMPL *, WT_REF *, uint32_t, bool *); /* @@ -85,89 +84,6 @@ __wt_page_release_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags) return (ret); } -#define WT_EVICT_STATS_CLEAN 0x01 -#define WT_EVICT_STATS_FORCE_HS 0x02 -#define WT_EVICT_STATS_SUCCESS 0x04 -#define WT_EVICT_STATS_URGENT 0x08 - -/* - * __evict_stats_update -- - * Update the stats of eviction. - * - */ -static void -__evict_stats_update(WT_SESSION_IMPL *session, uint8_t flags) -{ - WT_CONNECTION_IMPL *conn; - uint64_t eviction_time, eviction_time_milliseconds; - - conn = S2C(session); - - if (session->evict_timeline.reentry_hs_eviction) { - session->evict_timeline.reentry_hs_evict_finish = __wt_clock(session); - eviction_time = WT_CLOCKDIFF_US(session->evict_timeline.reentry_hs_evict_finish, - session->evict_timeline.reentry_hs_evict_start); - } else { - session->evict_timeline.evict_finish = __wt_clock(session); - eviction_time = WT_CLOCKDIFF_US( - session->evict_timeline.evict_finish, session->evict_timeline.evict_start); - } - if (LF_ISSET(WT_EVICT_STATS_SUCCESS)) { - if (LF_ISSET(WT_EVICT_STATS_URGENT)) { - if (LF_ISSET(WT_EVICT_STATS_FORCE_HS)) - WT_STAT_CONN_INCR(session, cache_eviction_force_hs_success); - if (LF_ISSET(WT_EVICT_STATS_CLEAN)) { - WT_STAT_CONN_INCR(session, cache_eviction_force_clean); - WT_STAT_CONN_INCRV(session, cache_eviction_force_clean_time, eviction_time); - } else { - WT_STAT_CONN_INCR(session, cache_eviction_force_dirty); - WT_STAT_CONN_INCRV(session, cache_eviction_force_dirty_time, eviction_time); - } - } - - if (LF_ISSET(WT_EVICT_STATS_CLEAN)) - WT_STAT_CONN_DATA_INCR(session, cache_eviction_clean); - else - WT_STAT_CONN_DATA_INCR(session, cache_eviction_dirty); - - /* Count page evictions in parallel with checkpoint. */ - if (conn->txn_global.checkpoint_running) - WT_STAT_CONN_INCR(session, cache_eviction_pages_in_parallel_with_checkpoint); - } else { - if (LF_ISSET(WT_EVICT_STATS_URGENT)) { - if (LF_ISSET(WT_EVICT_STATS_FORCE_HS)) - WT_STAT_CONN_INCR(session, cache_eviction_force_hs_fail); - WT_STAT_CONN_INCR(session, cache_eviction_force_fail); - WT_STAT_CONN_INCRV(session, cache_eviction_force_fail_time, eviction_time); - } - - WT_STAT_CONN_DATA_INCR(session, cache_eviction_fail); - } - if (!session->evict_timeline.reentry_hs_eviction) { - eviction_time_milliseconds = eviction_time / WT_THOUSAND; - if (eviction_time_milliseconds > conn->cache->evict_max_ms) - conn->cache->evict_max_ms = eviction_time_milliseconds; - if (eviction_time_milliseconds > WT_MINUTE * WT_THOUSAND) - __wt_verbose_warning(session, WT_VERB_EVICT, - "Eviction took more than 1 minute (%" PRIu64 "us). Building disk image took %" PRIu64 - "us. History store wrapup took %" PRIu64 "us.", - eviction_time, - WT_CLOCKDIFF_US(session->reconcile_timeline.image_build_finish, - session->reconcile_timeline.image_build_start), - WT_CLOCKDIFF_US(session->reconcile_timeline.hs_wrapup_finish, - session->reconcile_timeline.hs_wrapup_start)); - } else { - /* - * We are in the reentrant history store eviction inside a data store reconciliation. Add to - * the total time taken to do the reentrant history store eviction. - */ - session->reconcile_timeline.total_reentry_hs_eviction_time += - WT_CLOCKDIFF_MS(session->evict_timeline.reentry_hs_evict_finish, - session->evict_timeline.reentry_hs_evict_start); - session->evict_timeline.reentry_hs_eviction = false; - } -} - /* * __wt_evict -- * Evict a page. @@ -178,14 +94,13 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 WT_CONNECTION_IMPL *conn; WT_DECL_RET; WT_PAGE *page; - uint8_t stats_flags; - bool clean_page, closing, inmem_split, tree_dead, local_gen; + uint64_t time_start, time_stop; + bool clean_page, closing, force_evict_hs, inmem_split, local_gen, tree_dead; conn = S2C(session); page = ref->page; closing = LF_ISSET(WT_EVICT_CALL_CLOSING); - stats_flags = 0; - clean_page = false; + force_evict_hs = false; local_gen = false; __wt_verbose( @@ -195,18 +110,9 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 if (tree_dead) LF_SET(WT_EVICT_CALL_NO_SPLIT); - /* As re-entry into eviction is possible, only clear the statistics on the first entry. */ - if (__wt_session_gen((session), (WT_GEN_EVICT)) == 0) { - WT_CLEAR(session->evict_timeline); - session->evict_timeline.evict_start = __wt_clock(session); - } else { - session->evict_timeline.reentry_hs_eviction = true; - session->evict_timeline.reentry_hs_evict_start = __wt_clock(session); - } - /* - * Enter the eviction generation. If we re-enter eviction, leave the previous generation (which - * must be as low as the current generation), untouched. + * Enter the eviction generation. If we re-enter eviction, leave the previous eviction + * generation (which must be as low as the current generation), untouched. */ if (__wt_session_gen(session, WT_GEN_EVICT) == 0) { local_gen = true; @@ -214,18 +120,19 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 } /* - * Immediately increment the forcible eviction counter, we might do an in-memory split and not - * an eviction, which skips the other statistics. + * Track how long forcible eviction took. Immediately increment the forcible eviction counter, + * we might do an in-memory split and not an eviction, which skips the other statistics. */ + time_start = 0; if (LF_ISSET(WT_EVICT_CALL_URGENT)) { - FLD_SET(stats_flags, WT_EVICT_STATS_URGENT); + time_start = __wt_clock(session); WT_STAT_CONN_INCR(session, cache_eviction_force); /* * Track history store pages being force evicted while holding a history store cursor open. */ if (session->hs_cursor_counter > 0 && WT_IS_HS(session->dhandle)) { - FLD_SET(stats_flags, WT_EVICT_STATS_FORCE_HS); + force_evict_hs = true; WT_STAT_CONN_INCR(session, cache_eviction_force_hs); } } @@ -252,27 +159,11 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 WT_ERR(__evict_review(session, ref, flags, &inmem_split)); /* - * If we decide to do an in-memory split. Do it now. If an in-memory split completes, the page - * stays in memory and the tree is left in the desired state: avoid the usual cleanup. + * If there was an in-memory split, the tree has been left in the state we want: there is + * nothing more to do. */ - if (inmem_split) { - WT_ERR(__wt_split_insert(session, ref)); + if (inmem_split) goto done; - } - - /* No need to reconcile the page if it is from a dead tree or it is clean. */ - if (!tree_dead && __wt_page_is_modified(page)) - WT_ERR(__evict_reconcile(session, ref, flags)); - - /* - * Fail 0.1% of the time after we have done reconciliation. We should always evict the page of a - * dead tree. - */ - if (!closing && !tree_dead && - __wt_failpoint(session, WT_TIMING_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION, 10)) { - ret = EBUSY; - goto err; - } /* Check we are not evicting an accessible internal page with an active split generation. */ WT_ASSERT(session, @@ -293,10 +184,7 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 conn->cache->evict_max_page_size = page->memory_footprint; /* Figure out whether reconciliation was done on the page */ - if (__wt_page_evict_clean(page)) { - clean_page = true; - FLD_SET(stats_flags, WT_EVICT_STATS_CLEAN); - } + clean_page = __wt_page_evict_clean(page); /* Update the reference and discard the page. */ if (__wt_ref_is_root(ref)) @@ -309,22 +197,47 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 else WT_ERR(__evict_page_dirty_update(session, ref, flags)); - /* - * We have loaded the new disk image and updated the tree structure. We can no longer fail after - * this point. - */ + if (time_start != 0) { + time_stop = __wt_clock(session); + if (force_evict_hs) + WT_STAT_CONN_INCR(session, cache_eviction_force_hs_success); + if (clean_page) { + WT_STAT_CONN_INCR(session, cache_eviction_force_clean); + WT_STAT_CONN_INCRV( + session, cache_eviction_force_clean_time, WT_CLOCKDIFF_US(time_stop, time_start)); + } else { + WT_STAT_CONN_INCR(session, cache_eviction_force_dirty); + WT_STAT_CONN_INCRV( + session, cache_eviction_force_dirty_time, WT_CLOCKDIFF_US(time_stop, time_start)); + } + } + if (clean_page) + WT_STAT_CONN_DATA_INCR(session, cache_eviction_clean); + else + WT_STAT_CONN_DATA_INCR(session, cache_eviction_dirty); + + /* Count page evictions in parallel with checkpoint. */ + if (conn->txn_global.checkpoint_running) + WT_STAT_CONN_INCR(session, cache_eviction_pages_in_parallel_with_checkpoint); if (0) { err: if (!closing) __evict_exclusive_clear(session, ref, previous_state); + + if (time_start != 0) { + time_stop = __wt_clock(session); + if (force_evict_hs) + WT_STAT_CONN_INCR(session, cache_eviction_force_hs_fail); + WT_STAT_CONN_INCR(session, cache_eviction_force_fail); + WT_STAT_CONN_INCRV( + session, cache_eviction_force_fail_time, WT_CLOCKDIFF_US(time_stop, time_start)); + } + + WT_STAT_CONN_DATA_INCR(session, cache_eviction_fail); } done: - if (ret == 0) - FLD_SET(stats_flags, WT_EVICT_STATS_SUCCESS); - __evict_stats_update(session, stats_flags); - /* Leave any local eviction generation. */ if (local_gen) __wt_session_gen_leave(session, WT_GEN_EVICT); @@ -417,7 +330,6 @@ __evict_page_dirty_update(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_ WT_MULTI multi; WT_PAGE_MODIFY *mod; bool closing; - void *tmp; mod = ref->page->modify; closing = FLD_ISSET(evict_flags, WT_EVICT_CALL_CLOSING); @@ -480,20 +392,13 @@ __evict_page_dirty_update(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_ __wt_ref_out(session, ref); WT_REF_SET_STATE(ref, WT_REF_DISK); } else { - /* The split code works with WT_MULTI structures, build one for the disk image. */ - memset(&multi, 0, sizeof(multi)); - multi.disk_image = mod->mod_disk_image; /* - * Store the disk image to a temporary pointer in case we fail to rewrite the page and - * we need to link the new disk image back to the old disk image. + * The split code works with WT_MULTI structures, build one for the disk image. */ - tmp = mod->mod_disk_image; - mod->mod_disk_image = NULL; - ret = __wt_split_rewrite(session, ref, &multi); - if (ret != 0) { - mod->mod_disk_image = tmp; - return (ret); - } + memset(&multi, 0, sizeof(multi)); + multi.disk_image = mod->mod_disk_image; + + WT_RET(__wt_split_rewrite(session, ref, &multi)); } break; @@ -582,22 +487,27 @@ __evict_child_check(WT_SESSION_IMPL *session, WT_REF *parent) /* * __evict_review -- - * Review the page and its subtree for conditions that would block its eviction. + * Get exclusive access to the page and review the page and its subtree for conditions that + * would block its eviction. */ static int __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags, bool *inmem_splitp) { WT_BTREE *btree; + WT_CACHE *cache; WT_CONNECTION_IMPL *conn; WT_DECL_RET; WT_PAGE *page; + uint32_t flags; bool closing, modified; + bool is_eviction_thread, use_snapshot_for_app_thread; *inmem_splitp = false; btree = S2BT(session); conn = S2C(session); page = ref->page; + flags = WT_REC_EVICT; closing = FLD_ISSET(evict_flags, WT_EVICT_CALL_CLOSING); /* @@ -642,9 +552,13 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags, bool if (!__wt_page_can_evict(session, ref, inmem_splitp)) return (__wt_set_return(session, EBUSY)); - /* Check for an append-only workload needing an in-memory split. */ + /* + * Check for an append-only workload needing an in-memory split; we can't do this earlier + * because in-memory splits require exclusive access. If an in-memory split completes, the + * page stays in memory and the tree is left in the desired state: avoid the usual cleanup. + */ if (*inmem_splitp) - return (0); + return (__wt_split_insert(session, ref)); } /* If the page is clean, we're done and we can evict. */ @@ -653,12 +567,12 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags, bool /* * If we are trying to evict a dirty page that does not belong to history store(HS) and - * checkpoint is processing the HS file, avoid evicting the dirty non-HS page for now if the - * cache is already dominated by dirty HS content. + * checkpoint is processing the HS file, then avoid evicting the dirty non-HS page for now if + * the cache is already dominated by dirty HS content. * - * Evicting an non-HS dirty page can generate even more HS content. As we cannot evict HS pages + * Evicting a non-HS dirty page can generate even more HS content. As we can not evict HS pages * while checkpoint is operating on the HS file, we can end up in a situation where we exceed - * the cache size limit. + * the cache size limits. */ if (conn->txn_global.checkpoint_running_hs && !WT_IS_HS(btree->dhandle) && __wt_cache_hs_dirty(session) && __wt_cache_full(session)) { @@ -672,31 +586,34 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags, bool if (F_ISSET(session, WT_SESSION_NO_RECONCILE)) return (__wt_set_return(session, EBUSY)); - return (0); -} - -/* - * __evict_reconcile -- - * Reconcile the page for eviction. - */ -static int -__evict_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags) -{ - WT_BTREE *btree; - WT_CACHE *cache; - WT_CONNECTION_IMPL *conn; - WT_DECL_RET; - uint32_t flags; - bool closing, is_eviction_thread, use_snapshot_for_app_thread, - is_application_thread_snapshot_refreshed; - - btree = S2BT(session); - conn = S2C(session); - flags = WT_REC_EVICT; - closing = FLD_ISSET(evict_flags, WT_EVICT_CALL_CLOSING); - + /* + * If the page is dirty, reconcile it to decide if we can evict it. + * + * If we have an exclusive lock (we're discarding the tree), assert there are no updates we + * cannot read. + * + * Don't set any other flags for internal pages: there are no update lists to be saved and + * restored, changes can't be written into the history store table, nor can we re-create + * internal pages in memory. + * + * For leaf pages: + * + * In-memory pages are a known configuration. + * + * Set the update/restore flag, so reconciliation will write blocks it can write and create a + * list of skipped updates for blocks it cannot write, along with disk images. This is how + * eviction of active, huge pages works: we take a big page and reconcile it into blocks, some + * of which we write and discard, the rest of which we re-create as smaller in-memory pages, + * (restoring the updates that stopped us from writing the block), and inserting the whole mess + * into the page's parent. Set the flag in all cases because the incremental cost of + * update/restore in reconciliation is minimal, eviction shouldn't have picked a page where + * update/restore is necessary, absent some cache pressure. It's possible updates occurred after + * we selected this page for eviction, but it's unlikely and we don't try and manage that risk. + * + * Additionally, if we aren't trying to free space in the cache, scrub the page and keep it in + * memory. + */ cache = conn->cache; - is_application_thread_snapshot_refreshed = false; /* * Urgent eviction and forced eviction want two different behaviors for inefficient update @@ -705,47 +622,33 @@ __evict_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags) if (FLD_ISSET(evict_flags, WT_EVICT_CALL_URGENT)) LF_SET(WT_REC_CALL_URGENT); - /* - * If we have an exclusive lock (we're discarding the tree), assert there are no updates we - * cannot read. - */ if (closing) LF_SET(WT_REC_VISIBILITY_ERR); - /* - * Don't set any other flags for internal pages: there are no update lists to be saved and - * restored, changes can't be written into the history store table, nor can we re-create - * internal pages in memory. - * - * Don't set any other flags for history store table as all the content is evictable. - */ else if (F_ISSET(ref, WT_REF_FLAG_INTERNAL) || WT_IS_HS(btree->dhandle)) ; - /* Always do update restore for in-memory database. */ + else if (WT_SESSION_BTREE_SYNC(session) && !WT_IS_METADATA(btree->dhandle)) + LF_SET(WT_REC_HS); else if (F_ISSET(conn, WT_CONN_IN_MEMORY)) LF_SET(WT_REC_IN_MEMORY | WT_REC_SCRUB); - /* For data store leaf pages, write the history to history store except for metadata. */ else if (!WT_IS_METADATA(btree->dhandle)) { LF_SET(WT_REC_HS); /* - * Scrub and we're supposed to or toss it in sometimes if we are in debugging mode. - * - * Note that don't scrub if checkpoint is running on the tree. + * Scrub if we're supposed to or toss it in sometimes if we are in debugging mode. */ - if (!WT_SESSION_BTREE_SYNC(session) && - (F_ISSET(cache, WT_CACHE_EVICT_SCRUB) || - (F_ISSET(cache, WT_CACHE_EVICT_DEBUG_MODE) && __wt_random(&session->rnd) % 3 == 0))) + if (F_ISSET(cache, WT_CACHE_EVICT_SCRUB) || + (F_ISSET(cache, WT_CACHE_EVICT_DEBUG_MODE) && __wt_random(&session->rnd) % 3 == 0)) LF_SET(WT_REC_SCRUB); } /* * Acquire a snapshot if coming through the eviction thread route. Also, if we have entered - * eviction through application threads then we save the existing snapshot and refresh to - * acquire a new snapshot, once the application threads are done with eviction then we switch - * back the snapshot to its original. Avoid using snapshots when application transactions are in - * the final stages of commit or rollback as they have already released the snapshot. Otherwise, - * it becomes harder in the later part of the code to detect updates that belonged to the last - * running application transaction. + * eviction through application threads and we have a transaction snapshot, we will use our + * existing snapshot to evict pages that are not globally visible based on the last_running + * transaction. Avoid using snapshots when application transactions are in the final stages of + * commit or rollback as they have already released the snapshot. Otherwise, it becomes harder + * in the later part of the code to detect updates that belonged to the last running application + * transaction. */ use_snapshot_for_app_thread = !F_ISSET(session, WT_SESSION_INTERNAL) && !WT_IS_METADATA(session->dhandle) && WT_SESSION_TXN_SHARED(session)->id != WT_TXN_NONE && @@ -771,22 +674,12 @@ __evict_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags) * outside world. */ __wt_txn_bump_snapshot(session); - else if (use_snapshot_for_app_thread) { - /* - * If we couldn't make progress with the application thread's existing snapshot, save the - * existing snapshot and refresh to acquire a new one. Then try eviction again. Once the - * application threads are done with eviction, the application thread's snapshot is switched - * back to the original. - */ - if (F_ISSET(session->txn, WT_TXN_REFRESH_SNAPSHOT)) { - WT_RET(__wt_txn_snapshot_save_and_refresh(session)); - is_application_thread_snapshot_refreshed = true; - WT_STAT_CONN_INCR(session, application_evict_snapshot_refreshed); - } - + else if (use_snapshot_for_app_thread) LF_SET(WT_REC_APP_EVICTION_SNAPSHOT); - } else if (!WT_SESSION_BTREE_SYNC(session)) - LF_SET(WT_REC_VISIBLE_ALL); + else { + if (!WT_SESSION_BTREE_SYNC(session)) + LF_SET(WT_REC_VISIBLE_ALL); + } WT_ASSERT(session, LF_ISSET(WT_REC_VISIBLE_ALL) || F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT)); @@ -794,7 +687,7 @@ __evict_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags) * Reconcile the page. Force read-committed isolation level if we are using snapshots for * eviction workers or application threads. */ - if (is_eviction_thread || use_snapshot_for_app_thread) + if (LF_ISSET(WT_REC_APP_EVICTION_SNAPSHOT) || is_eviction_thread) WT_WITH_TXN_ISOLATION( session, WT_ISO_READ_COMMITTED, ret = __wt_reconcile(session, ref, NULL, flags)); else @@ -805,8 +698,6 @@ __evict_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags) if (is_eviction_thread) __wt_txn_release_snapshot(session); - else if (is_application_thread_snapshot_refreshed) - __wt_txn_snapshot_release_and_restore(session); WT_RET(ret); @@ -814,7 +705,7 @@ __evict_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags) * Success: assert that the page is clean or reconciliation was configured to save updates. */ WT_ASSERT(session, - !__wt_page_is_modified(ref->page) || LF_ISSET(WT_REC_HS | WT_REC_IN_MEMORY) || + !__wt_page_is_modified(page) || LF_ISSET(WT_REC_HS | WT_REC_IN_MEMORY) || WT_IS_METADATA(btree->dhandle)); return (0); diff --git a/src/third_party/wiredtiger/src/history/hs_rec.c b/src/third_party/wiredtiger/src/history/hs_rec.c index 2dcda1661b4..1f9ddf89acb 100644 --- a/src/third_party/wiredtiger/src/history/hs_rec.c +++ b/src/third_party/wiredtiger/src/history/hs_rec.c @@ -9,8 +9,8 @@ #include "wt_internal.h" static int __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, - uint32_t btree_id, const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool no_ts_tombstone, - bool error_on_ts_ordering, uint64_t *hs_counter, WT_TIME_WINDOW *upd_tw); + uint32_t btree_id, const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool ooo_tombstone, + bool error_on_ooo_ts, uint64_t *hs_counter); /* * __hs_verbose_cache_stats -- @@ -220,7 +220,7 @@ __hs_insert_record(WT_SESSION_IMPL *session, WT_CURSOR *cursor, WT_BTREE *btree, if (ret == 0) WT_ERR(__hs_delete_reinsert_from_pos(session, cursor, btree->id, key, tw->start_ts + 1, - true, false, error_on_ooo_ts, &counter, tw)); + true, false, error_on_ooo_ts, &counter)); #ifdef HAVE_DIAGNOSTIC /* @@ -289,45 +289,9 @@ __hs_next_upd_full_value(WT_SESSION_IMPL *session, WT_UPDATE_VECTOR *updates, } /* - * __hs_pack_key -- - * Pack the history store key - */ -static inline int -__hs_pack_key(WT_SESSION_IMPL *session, WT_BTREE *btree, WT_RECONCILE *r, WT_INSERT *ins, - WT_ROW *rip, WT_ITEM *key) -{ - WT_DECL_RET; - uint8_t *p; - - switch (r->page->type) { - case WT_PAGE_COL_FIX: - case WT_PAGE_COL_VAR: - p = key->mem; - WT_RET(__wt_vpack_uint(&p, 0, WT_INSERT_RECNO(ins))); - key->size = WT_PTRDIFF(p, key->data); - break; - case WT_PAGE_ROW_LEAF: - if (ins == NULL) { - WT_WITH_BTREE( - session, btree, ret = __wt_row_leaf_key(session, r->page, rip, key, false)); - WT_RET(ret); - } else { - key->data = WT_INSERT_KEY(ins); - key->size = WT_INSERT_KEY_SIZE(ins); - } - break; - default: - WT_RET(__wt_illegal_value(session, r->page->type)); - } - - return (ret); -} - -/* * __wt_hs_insert_updates -- - * Copy one set of saved updates into the database's history store table if they haven't been - * moved there. Whether the function fails or succeeds, if there is a successful write to - * history, cache_write_hs is set to true. + * Copy one set of saved updates into the database's history store table. Whether the function + * fails or succeeds, if there is a successful write to history, cache_write_hs is set to true. */ int __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *multi) @@ -352,12 +316,12 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *mult WT_UPDATE *newest_hs, *non_aborted_upd, *oldest_upd, *prev_upd, *ref_upd, *tombstone, *upd; WT_TIME_WINDOW tw; wt_off_t hs_size; - wt_timestamp_t ts; uint64_t insert_cnt, max_hs_size, modify_cnt; uint64_t cache_hs_insert_full_update, cache_hs_insert_reverse_modify, cache_hs_write_squash; uint32_t i; + uint8_t *p; int nentries; - bool enable_reverse_modify, error_on_ooo_ts, hs_inserted, reinsert, squashed; + bool enable_reverse_modify, error_on_ooo_ts, hs_inserted, squashed; r->cache_write_hs = false; btree = S2BT(session); @@ -412,13 +376,32 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *mult continue; /* History store table key component: source key. */ - WT_ERR(__hs_pack_key(session, btree, r, list->ins, list->rip, key)); + switch (r->page->type) { + case WT_PAGE_COL_FIX: + case WT_PAGE_COL_VAR: + p = key->mem; + WT_ERR(__wt_vpack_uint(&p, 0, WT_INSERT_RECNO(list->ins))); + key->size = WT_PTRDIFF(p, key->data); + break; + case WT_PAGE_ROW_LEAF: + if (list->ins == NULL) { + WT_WITH_BTREE( + session, btree, ret = __wt_row_leaf_key(session, r->page, list->rip, key, false)); + WT_ERR(ret); + } else { + key->data = WT_INSERT_KEY(list->ins); + key->size = WT_INSERT_KEY_SIZE(list->ins); + } + break; + default: + WT_ERR(__wt_illegal_value(session, r->page->type)); + } newest_hs = first_globally_visible_upd = min_ts_upd = out_of_order_ts_upd = NULL; ref_upd = list->onpage_upd; - __wt_update_vector_clear(&updates); __wt_update_vector_clear(&out_of_order_ts_updates); + __wt_update_vector_clear(&updates); /* * Reverse deltas are only supported on 'S' and 'u' value formats. @@ -427,16 +410,6 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *mult (WT_STREQ(btree->value_format, "S") || WT_STREQ(btree->value_format, "u")); /* - * If there exists an on page tombstone without a timestamp or less than the on page update, - * consider it as a no timestamp update to clear the timestamps of all the updates that are - * inserted into the history store. - */ - if (list->onpage_tombstone != NULL && - (list->onpage_tombstone->start_ts == WT_TS_NONE || - list->onpage_tombstone->start_ts < list->onpage_upd->start_ts)) - min_ts_upd = list->onpage_tombstone; - - /* * The algorithm assumes the oldest update on the update chain in memory is either a full * update or a tombstone. * @@ -470,9 +443,6 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *mult if (upd->txnid == WT_TXN_ABORTED) continue; - /* We must have deleted any update left in the history store. */ - WT_ASSERT(session, !F_ISSET(upd, WT_UPDATE_TO_DELETE_FROM_HS)); - non_aborted_upd = upd; /* Detect out of order timestamp update. */ @@ -567,23 +537,15 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *mult * history store. */ if (oldest_upd->type == WT_UPDATE_TOMBSTONE) { - if (out_of_order_ts_upd != NULL && - out_of_order_ts_upd->start_ts < oldest_upd->start_ts) { + if (out_of_order_ts_upd != NULL && out_of_order_ts_upd->start_ts < oldest_upd->start_ts) fix_ts_upd = out_of_order_ts_upd; - ts = fix_ts_upd->start_ts + 1; - reinsert = true; - } else { + else fix_ts_upd = oldest_upd; - ts = fix_ts_upd->start_ts; - reinsert = false; - } - - WT_STAT_CONN_DATA_INCR(session, cache_hs_key_truncate); if (!F_ISSET(fix_ts_upd, WT_UPDATE_FIXED_HS)) { /* Delete and reinsert any update of the key with a higher timestamp. */ - WT_ERR(__wt_hs_delete_key_from_ts( - session, hs_cursor, btree->id, key, ts, reinsert, error_on_ooo_ts)); + WT_ERR(__wt_hs_delete_key_from_ts(session, hs_cursor, btree->id, key, + fix_ts_upd->start_ts + 1, true, false, error_on_ooo_ts)); F_SET(fix_ts_upd, WT_UPDATE_FIXED_HS); } } @@ -699,6 +661,11 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *mult continue; } + /* We should never write a prepared update to the history store. */ + WT_ASSERT(session, + upd->prepare_state != WT_PREPARE_INPROGRESS && + upd->prepare_state != WT_PREPARE_LOCKED); + /* * Ensure all the updates inserted to the history store are committed. * @@ -766,18 +733,15 @@ __wt_hs_insert_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *mult } /* - * In the case that the onpage value/tombstone is an out of order timestamp update/tombstone - * it remains in the stack. Validate it is time window against on page value/tombstone. + * In the case that the onpage value is an out of order timestamp update and the update + * older than it is a tombstone, it remains in the stack. */ WT_ASSERT(session, out_of_order_ts_updates.size <= 1); #ifdef HAVE_DIAGNOSTIC if (out_of_order_ts_updates.size == 1) { __wt_update_vector_peek(&out_of_order_ts_updates, &upd); WT_ASSERT(session, - (upd->txnid == list->onpage_upd->txnid && - upd->start_ts == list->onpage_upd->start_ts) || - (upd->txnid == list->onpage_tombstone->txnid && - upd->start_ts == list->onpage_tombstone->start_ts)); + upd->txnid == list->onpage_upd->txnid && upd->start_ts == list->onpage_upd->start_ts); } #endif } @@ -826,15 +790,21 @@ err: */ int __wt_hs_delete_key_from_ts(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, uint32_t btree_id, - const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool error_on_ooo_ts) + const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool ooo_tombstone, bool error_on_ooo_ts) { WT_DECL_RET; WT_ITEM hs_key; - wt_timestamp_t hs_start_ts; + wt_timestamp_t hs_ts; uint64_t hs_counter; uint32_t hs_btree_id; bool hs_read_all_flag; + /* + * If we delete all the updates of the key from the history store, we should not reinsert any + * update except when an out-of-order tombstone is not globally visible yet. + */ + WT_ASSERT(session, ooo_tombstone || ts > WT_TS_NONE || !reinsert); + hs_read_all_flag = F_ISSET(hs_cursor, WT_CURSTD_HS_READ_ALL); hs_cursor->set_key(hs_cursor, 3, btree_id, key, ts); @@ -849,12 +819,12 @@ __wt_hs_delete_key_from_ts(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, uint3 ret = 0; goto done; } else { - WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_start_ts, &hs_counter)); + WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_ts, &hs_counter)); ++hs_counter; } - WT_ERR(__hs_delete_reinsert_from_pos( - session, hs_cursor, btree_id, key, ts, reinsert, true, error_on_ooo_ts, &hs_counter, NULL)); + WT_ERR(__hs_delete_reinsert_from_pos(session, hs_cursor, btree_id, key, ts, reinsert, + ooo_tombstone, error_on_ooo_ts, &hs_counter)); done: err: @@ -872,15 +842,15 @@ err: */ static int __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, uint32_t btree_id, - const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool no_ts_tombstone, - bool error_on_ts_ordering, uint64_t *counter, WT_TIME_WINDOW *upd_tw) + const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool ooo_tombstone, bool error_on_ooo_ts, + uint64_t *counter) { WT_CURSOR *hs_insert_cursor; WT_CURSOR_BTREE *hs_cbt; WT_DECL_RET; WT_ITEM hs_key, hs_value; - WT_TIME_WINDOW hs_insert_tw, *twp; - wt_timestamp_t hs_durable_start_ts, hs_durable_stop_ts, hs_start_ts; + WT_TIME_WINDOW hs_insert_tw, tw, *twp; + wt_timestamp_t hs_ts; uint64_t cache_hs_order_lose_durable_timestamp, cache_hs_order_reinsert, cache_hs_order_remove; uint64_t hs_counter, hs_upd_type; uint32_t hs_btree_id; @@ -903,7 +873,7 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui * If we delete all the updates of the key from the history store, we should not reinsert any * update except when an out-of-order tombstone is not globally visible yet. */ - WT_ASSERT(session, no_ts_tombstone || ts > WT_TS_NONE || !reinsert); + WT_ASSERT(session, ooo_tombstone || ts > WT_TS_NONE || !reinsert); for (; ret == 0; ret = hs_cursor->next(hs_cursor)) { /* Ignore records that are obsolete. */ @@ -911,53 +881,8 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui if (__wt_txn_tw_stop_visible_all(session, twp)) continue; - /* - * The below example illustrates a case that the data store and the history - * store may contain the same value. In this case, skip inserting the same - * value to the history store again. - * - * Suppose there is one table table1 and the below operations are performed. - * - * 1. Insert a=1 in table1 at timestamp 10 - * 2. Delete a from table1 at timestamp 20 - * 3. Set stable timestamp = 20, oldest timestamp=1 - * 4. Checkpoint table1 - * 5. Insert a=2 in table1 at timestamp 30 - * 6. Evict a=2 from table1 and move the content to history store. - * 7. Checkpoint is still running and before it finishes checkpointing the history store the - * above steps 5 and 6 will happen. - * - * After all this operations the checkpoint content will be - * Data store -- - * table1 --> a=1 at start_ts=10, stop_ts=20 - * - * History store -- - * table1 --> a=1 at start_ts=10, stop_ts=20 - * - * WiredTiger takes a backup of the checkpoint and use this backup to restore. - * Note: In table1 of both data store and history store has the same content. - * - * Now the backup is used to restore. - * - * 1. Insert a=3 in table1 - * 2. Checkpoint started, eviction started and sees the same content in data store and - * history store while reconciling. - * - * The start timestamp and transaction ids are checked to ensure for the global - * visibility because globally visible timestamps and transaction ids may be cleared to 0. - * The time window of the inserting record and the history store record are - * compared to make sure that the same record are not being inserted again. - */ - - if (upd_tw != NULL && - (__wt_txn_tw_start_visible_all(session, upd_tw) && - __wt_txn_tw_start_visible_all(session, twp) ? - WT_TIME_WINDOWS_STOP_EQUAL(upd_tw, twp) : - WT_TIME_WINDOWS_EQUAL(upd_tw, twp))) - continue; - /* We shouldn't have crossed the btree and user key search space. */ - WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_start_ts, &hs_counter)); + WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_ts, &hs_counter)); WT_ASSERT(session, hs_btree_id == btree_id); #ifdef HAVE_DIAGNOSTIC WT_ERR(__wt_compare(session, NULL, &hs_key, key, &cmp)); @@ -969,7 +894,7 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui * the cell. The cell's start timestamp can be cleared during reconciliation if it is * globally visible. */ - if (hs_start_ts >= ts || twp->stop_ts >= ts) + if (hs_ts >= ts || twp->stop_ts >= ts) break; } if (ret == WT_NOTFOUND) @@ -981,7 +906,7 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui * flag. We cannot modify the history store to fix the out of order timestamp updates as it may * make the history store checkpoint inconsistent. */ - if (error_on_ts_ordering) { + if (error_on_ooo_ts) { ret = EBUSY; WT_STAT_CONN_INCR(session, cache_eviction_fail_checkpoint_out_of_order_ts); goto err; @@ -1036,7 +961,7 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui */ for (; ret == 0; ret = hs_cursor->next(hs_cursor)) { /* We shouldn't have crossed the btree and user key search space. */ - WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_start_ts, &hs_counter)); + WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_ts, &hs_counter)); WT_ASSERT(session, hs_btree_id == btree_id); #ifdef HAVE_DIAGNOSTIC WT_ERR(__wt_compare(session, NULL, &hs_key, key, &cmp)); @@ -1054,7 +979,7 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui * ignoring them. */ __wt_hs_upd_time_window(hs_cursor, &twp); - if (hs_start_ts < ts && twp->stop_ts < ts) + if (hs_ts < ts && twp->stop_ts < ts) continue; if (reinsert) { @@ -1090,8 +1015,7 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui */ if (hs_cbt->upd_value->tw.start_ts >= ts || hs_cbt->upd_value->tw.durable_start_ts >= ts) - hs_insert_tw.start_ts = hs_insert_tw.durable_start_ts = - no_ts_tombstone ? ts : ts - 1; + hs_insert_tw.start_ts = hs_insert_tw.durable_start_ts = ooo_tombstone ? ts : ts - 1; else { hs_insert_tw.start_ts = hs_cbt->upd_value->tw.start_ts; hs_insert_tw.durable_start_ts = hs_cbt->upd_value->tw.durable_start_ts; @@ -1103,15 +1027,15 @@ __hs_delete_reinsert_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, ui * another moved update OR the update itself triggered the correction. In either case, * we should preserve the stop transaction id. */ - hs_insert_tw.stop_ts = hs_insert_tw.durable_stop_ts = no_ts_tombstone ? ts : ts - 1; + hs_insert_tw.stop_ts = hs_insert_tw.durable_stop_ts = ooo_tombstone ? ts : ts - 1; hs_insert_tw.stop_txn = hs_cbt->upd_value->tw.stop_txn; /* Extract the underlying value for reinsertion. */ WT_ERR(hs_cursor->get_value( - hs_cursor, &hs_durable_stop_ts, &hs_durable_start_ts, &hs_upd_type, &hs_value)); + hs_cursor, &tw.durable_stop_ts, &tw.durable_start_ts, &hs_upd_type, &hs_value)); /* Reinsert the update with corrected timestamps. */ - if (no_ts_tombstone && hs_start_ts == ts) + if (ooo_tombstone && hs_ts == ts) *counter = hs_counter; /* Insert the value back with different timestamps. */ @@ -1142,101 +1066,3 @@ err: return (ret); } - -/* - * __hs_delete_record -- - * Delete an update from the history store if it is not obsolete. - */ -static int -__hs_delete_record( - WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_ITEM *key, WT_UPDATE *upd, WT_UPDATE *tombstone) -{ - WT_DECL_RET; - WT_TIME_WINDOW *hs_tw; - bool hs_read_committed; - - if (r->hs_cursor == NULL) - WT_RET(__wt_curhs_open(session, NULL, &r->hs_cursor)); - hs_read_committed = F_ISSET(r->hs_cursor, WT_CURSTD_HS_READ_COMMITTED); - /* Ensure we can see all the content in the history store. */ - F_SET(r->hs_cursor, WT_CURSTD_HS_READ_COMMITTED); - - /* No need to delete from the history store if it is already obsolete. */ - if (tombstone != NULL && __wt_txn_upd_visible_all(session, tombstone)) - goto done; - - r->hs_cursor->set_key(r->hs_cursor, 4, S2BT(session)->id, key, WT_TS_MAX, UINT64_MAX); - WT_ERR_NOTFOUND_OK(__wt_curhs_search_near_before(session, r->hs_cursor), true); - /* It's possible the value in the history store becomes obsolete concurrently. */ - if (ret == WT_NOTFOUND) { - /* - * The history store update may not exist even if there is no tombstone associated with it - * as this update may have already been removed by rollback to stable. - */ - WT_ASSERT(session, tombstone == NULL || __wt_txn_upd_visible_all(session, tombstone)); - ret = 0; - } else { - /* - * We have found a record that is not obsolete. However, we only want to delete a record if - * it has a stop timestamp greater than the start timestamp of the update. - */ - __wt_hs_upd_time_window(r->hs_cursor, &hs_tw); - if (hs_tw->stop_ts <= upd->start_ts) - goto done; - -#ifdef HAVE_DIAGNOSTIC - WT_ASSERT(session, hs_tw->start_txn == WT_TXN_NONE || hs_tw->start_txn == upd->txnid); - WT_ASSERT(session, hs_tw->start_ts == WT_TS_NONE || hs_tw->start_ts == upd->start_ts); - WT_ASSERT(session, - hs_tw->durable_start_ts == WT_TS_NONE || hs_tw->durable_start_ts == upd->durable_ts); - if (tombstone != NULL) { - WT_ASSERT(session, hs_tw->stop_txn == tombstone->txnid); - WT_ASSERT(session, hs_tw->stop_ts == tombstone->start_ts); - WT_ASSERT(session, hs_tw->durable_stop_ts == tombstone->durable_ts); - } else - WT_ASSERT(session, !WT_TIME_WINDOW_HAS_STOP(hs_tw)); -#endif - - WT_ERR(r->hs_cursor->remove(r->hs_cursor)); - } -done: - if (tombstone != NULL) - F_CLR(tombstone, WT_UPDATE_TO_DELETE_FROM_HS | WT_UPDATE_HS); - F_CLR(upd, WT_UPDATE_TO_DELETE_FROM_HS | WT_UPDATE_HS); - -err: - if (!hs_read_committed) - F_CLR(r->hs_cursor, WT_CURSTD_HS_READ_COMMITTED); - return (ret); -} - -/* - * __wt_hs_delete_updates -- - * Delete the updates from the history store. - */ -int -__wt_hs_delete_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r) -{ - WT_BTREE *btree; - WT_DECL_ITEM(key); - WT_DECL_RET; - WT_DELETE_HS_UPD *delete_hs_upd; - uint32_t i; - - /* Nothing to delete from the history store. */ - if (r->delete_hs_upd == NULL) - return (0); - - btree = S2BT(session); - - WT_RET(__wt_scr_alloc(session, WT_INTPACK64_MAXSIZE, &key)); - - for (delete_hs_upd = r->delete_hs_upd, i = 0; i < r->delete_hs_upd_next; ++delete_hs_upd, ++i) { - WT_ERR(__hs_pack_key(session, btree, r, delete_hs_upd->ins, delete_hs_upd->rip, key)); - WT_ERR(__hs_delete_record(session, r, key, delete_hs_upd->upd, delete_hs_upd->tombstone)); - } - -err: - __wt_scr_free(session, &key); - return (ret); -} diff --git a/src/third_party/wiredtiger/src/include/api.h b/src/third_party/wiredtiger/src/include/api.h index d76c397555c..14b26fbfe14 100644 --- a/src/third_party/wiredtiger/src/include/api.h +++ b/src/third_party/wiredtiger/src/include/api.h @@ -124,35 +124,28 @@ F_SET((s)->txn, WT_TXN_UPDATE); /* End a transactional API call, optional retry on rollback. */ -#define TXN_API_END(s, ret, retry) \ - API_END(s, ret); \ - if (__update) \ - F_CLR((s)->txn, WT_TXN_UPDATE); \ - if (__autotxn) { \ - if (F_ISSET((s)->txn, WT_TXN_AUTOCOMMIT)) { \ - F_CLR((s)->txn, WT_TXN_AUTOCOMMIT); \ - if ((retry) && (ret) == WT_ROLLBACK) { \ - (ret) = 0; \ - WT_STAT_CONN_DATA_INCR(s, autocommit_update_retry); \ - continue; \ - } \ - } else if ((ret) == 0) \ - (ret) = __wt_txn_commit((s), NULL); \ - else { \ - if (retry) \ - WT_TRET(__wt_session_copy_values(s)); \ - WT_TRET(__wt_txn_rollback((s), NULL)); \ - if ((retry) && (ret) == WT_ROLLBACK) { \ - (ret) = 0; \ - WT_STAT_CONN_DATA_INCR(s, autocommit_update_retry); \ - continue; \ - } \ - WT_TRET(__wt_session_reset_cursors(s, false)); \ - } \ - } \ - break; \ - } \ - /* !!!! This is a while(1) loop. !!!! */ \ +#define TXN_API_END(s, ret, retry) \ + API_END(s, ret); \ + if (__update) \ + F_CLR((s)->txn, WT_TXN_UPDATE); \ + if (__autotxn) { \ + if (F_ISSET((s)->txn, WT_TXN_AUTOCOMMIT)) \ + F_CLR((s)->txn, WT_TXN_AUTOCOMMIT); \ + else if ((ret) == 0) \ + (ret) = __wt_txn_commit((s), NULL); \ + else { \ + if (retry) \ + WT_TRET(__wt_session_copy_values(s)); \ + WT_TRET(__wt_txn_rollback((s), NULL)); \ + if ((retry) && (ret) == WT_ROLLBACK) { \ + (ret) = 0; \ + continue; \ + } \ + WT_TRET(__wt_session_reset_cursors(s, false)); \ + } \ + } \ + break; \ + } \ while (1) /* @@ -238,23 +231,6 @@ if (F_ISSET(cur, WT_CURSTD_CACHED)) \ WT_ERR(__wt_cursor_cached(cur)) -/* - * API_RETRYABLE and API_RETRYABLE_END are used to wrap API calls so that they are silently - * retried on rollback errors. Generally, these only need to be used with readonly APIs, as - * writable APIs have their own retry code via TXN_API_CALL. These macros may be used with - * *API_CALL and API_END* provided they are ordered in a balanced way. - */ -#define API_RETRYABLE(s) do { - -#define API_RETRYABLE_END(s, ret) \ - if ((ret) != WT_ROLLBACK || F_ISSET((s)->txn, WT_TXN_RUNNING) || (s)->api_call_counter != 1) \ - break; \ - (ret) = 0; \ - WT_STAT_CONN_DATA_INCR(s, autocommit_readonly_retry); \ - } \ - /* !!!! This is a while(1) loop. !!!! */ \ - while (1) - #define JOINABLE_CURSOR_CALL_CHECK(cur) \ if (F_ISSET(cur, WT_CURSTD_JOINED)) \ WT_ERR(__wt_curjoin_joined(cur)) diff --git a/src/third_party/wiredtiger/src/include/btmem.h b/src/third_party/wiredtiger/src/include/btmem.h index 75ed15ec3bd..c22422dabf5 100644 --- a/src/third_party/wiredtiger/src/include/btmem.h +++ b/src/third_party/wiredtiger/src/include/btmem.h @@ -77,7 +77,6 @@ struct __wt_page_header { #define WT_PAGE_EMPTY_V_NONE 0x04u /* Page has no zero-length values */ #define WT_PAGE_ENCRYPTED 0x08u /* Page is encrypted on disk */ #define WT_PAGE_UNUSED 0x10u /* Historic lookaside store page updates, no longer used */ -#define WT_PAGE_FT_UPDATE 0x20u /* Page contains updated fast-truncate information */ uint8_t flags; /* 25: flags */ /* A byte of padding, positioned to be added to the flags. */ @@ -138,6 +137,15 @@ struct __wt_addr { #define WT_ADDR_LEAF 2 /* Leaf page */ #define WT_ADDR_LEAF_NO 3 /* Leaf page, no overflow */ uint8_t type; + + /* + * If an address is both as an address for the previous and the current multi-block + * reconciliations, that is, a block we're writing matches the block written the last time, it + * will appear in both the current boundary points as well as the page modification's list of + * previous blocks. The reuse flag is how we know that's happening so the block is treated + * correctly (not free'd on error, for example). + */ + uint8_t reuse; }; /* @@ -282,7 +290,14 @@ struct __wt_multi { uint32_t supd_entries; bool supd_restore; /* Whether to restore saved update chains to this page */ - WT_ADDR addr; /* Disk image written address */ + /* + * Disk image was written: address, size and checksum. On subsequent reconciliations of this + * page, we avoid writing the block if it's unchanged by comparing size and checksum; the reuse + * flag is set when the block is unchanged and we're reusing a previous address. + */ + WT_ADDR addr; + uint32_t size; + uint32_t checksum; }; /* @@ -441,13 +456,6 @@ struct __wt_page_modify { /* Overflow record tracking for reconciliation. */ WT_OVFL_TRACK *ovfl_track; - /* - * Stop aggregated timestamp information when all the keys on the page are removed. This time - * aggregate information is used to skip these deleted pages as part of the tree walk if the - * delete operation is visible to the reader. - */ - WT_TIME_AGGREGATE *stop_ta; - #define WT_PAGE_LOCK(s, p) __wt_spin_lock((s), &(p)->modify->page_lock) #define WT_PAGE_TRYLOCK(s, p) __wt_spin_trylock((s), &(p)->modify->page_lock) #define WT_PAGE_UNLOCK(s, p) __wt_spin_unlock((s), &(p)->modify->page_lock) @@ -690,11 +698,10 @@ struct __wt_page { #define WT_PAGE_DISK_ALLOC 0x004u /* Disk image in allocated memory */ #define WT_PAGE_DISK_MAPPED 0x008u /* Disk image in mapped memory */ #define WT_PAGE_EVICT_LRU 0x010u /* Page is on the LRU queue */ -#define WT_PAGE_EVICT_LRU_URGENT 0x020u /* Page is in the urgent queue */ -#define WT_PAGE_EVICT_NO_PROGRESS 0x040u /* Eviction doesn't count as progress */ -#define WT_PAGE_INTL_OVERFLOW_KEYS 0x080u /* Internal page has overflow keys (historic only) */ -#define WT_PAGE_SPLIT_INSERT 0x100u /* A leaf page was split for append */ -#define WT_PAGE_UPDATE_IGNORE 0x200u /* Ignore updates on page discard */ +#define WT_PAGE_EVICT_NO_PROGRESS 0x020u /* Eviction doesn't count as progress */ +#define WT_PAGE_INTL_OVERFLOW_KEYS 0x040u /* Internal page has overflow keys (historic only) */ +#define WT_PAGE_SPLIT_INSERT 0x080u /* A leaf page was split for append */ +#define WT_PAGE_UPDATE_IGNORE 0x100u /* Ignore updates on page discard */ /* AUTOMATIC FLAG VALUE GENERATION STOP 16 */ uint16_t flags_atomic; /* Atomic flags, use F_*_ATOMIC_16 */ @@ -754,15 +761,6 @@ struct __wt_page { #define WT_PAGE_REF_OFFSET(page, o) ((void *)((uint8_t *)((page)->dsk) + (o))) /* - * WT_PAGE_WALK_SKIP_STATS -- - * Statistics to track how many deleted pages are skipped as part of the tree walk. - */ -struct __wt_page_walk_skip_stats { - size_t total_del_pages_skipped; - size_t total_inmem_del_pages_skipped; -}; - -/* * Prepare update states. * * Prepare update synchronization is based on the state field, which has the @@ -1178,7 +1176,6 @@ struct __wt_update { #define WT_UPDATE_RESTORED_FAST_TRUNCATE 0x10u /* Fast truncate instantiation */ #define WT_UPDATE_RESTORED_FROM_DS 0x20u /* Update restored from data store. */ #define WT_UPDATE_RESTORED_FROM_HS 0x40u /* Update restored from history store. */ -#define WT_UPDATE_TO_DELETE_FROM_HS 0x80u /* Update needs to be deleted from history store */ /* AUTOMATIC FLAG VALUE GENERATION STOP 8 */ uint8_t flags; @@ -1477,21 +1474,3 @@ struct __wt_col_fix_auxiliary_header { WT_ENTER_PAGE_INDEX(session); \ (e); \ WT_LEAVE_PAGE_INDEX(session) - -/* - * Manage the given generation number with support for re-entry. Re-entry is allowed as the previous - * generation as it must be as low as the current generation. - */ -#define WT_ENTER_GENERATION(session, generation) \ - do { \ - bool __entered_##generation = false; \ - if (__wt_session_gen((session), (generation)) == 0) { \ - __wt_session_gen_enter((session), (generation)); \ - __entered_##generation = true; \ - } - -#define WT_LEAVE_GENERATION(session, generation) \ - if (__entered_##generation) \ - __wt_session_gen_leave((session), (generation)); \ - } \ - while (0) diff --git a/src/third_party/wiredtiger/src/include/btree_inline.h b/src/third_party/wiredtiger/src/include/btree_inline.h index 5da689084ca..a3f38030c50 100644 --- a/src/third_party/wiredtiger/src/include/btree_inline.h +++ b/src/third_party/wiredtiger/src/include/btree_inline.h @@ -257,16 +257,6 @@ __wt_cache_page_inmem_incr(WT_SESSION_IMPL *session, WT_PAGE *page, size_t size) (void)__wt_atomic_addsize(&page->memory_footprint, size); if (page->modify != NULL) { - /* - * For application threads, track the transaction bytes added to cache usage. We want to - * capture only the application's own changes to page data structures. Exclude changes to - * internal pages or changes that are the result of the application thread being co-opted - * into eviction work. - */ - if (!F_ISSET(session, WT_SESSION_INTERNAL) && - F_ISSET(session->txn, WT_TXN_RUNNING | WT_TXN_HAS_ID) && - __wt_session_gen(session, WT_GEN_EVICT) == 0) - WT_STAT_SESSION_INCRV(session, txn_bytes_dirty, size); if (!WT_PAGE_IS_INTERNAL(page) && !btree->lsm_primary) { (void)__wt_atomic_add64(&cache->bytes_updates, size); (void)__wt_atomic_add64(&btree->bytes_updates, size); @@ -721,13 +711,6 @@ __wt_tree_modify_set(WT_SESSION_IMPL *session) S2BT(session)->modified = true; WT_FULL_BARRIER(); - - /* - * There is a potential race where checkpoint walks the tree and marks it as clean before a - * page is subsequently marked as dirty, leaving us with a dirty page on a clean tree. Yield - * here to encourage this scenario and ensure we're handling it correctly. - */ - WT_DIAGNOSTIC_YIELD; } /* @@ -787,18 +770,6 @@ __wt_page_modify_set(WT_SESSION_IMPL *session, WT_PAGE *page) __wt_tree_modify_set(session); __wt_page_only_modify_set(session, page); - - /* - * We need to make sure a checkpoint doesn't come through and mark the tree clean before we have - * a chance to mark the page dirty. Otherwise, the checkpoint may also visit the page before it - * is marked dirty and skip it without also marking the tree clean. Worst case scenario with - * this approach is that a future checkpoint reviews the tree again unnecessarily - however, it - * is likely this is necessary since the update triggering this modify set would not be included - * in the checkpoint. If hypothetically a checkpoint came through after the page was modified - * and before the tree is marked dirty again, that is fine. The transaction installing this - * update wasn't visible to the checkpoint, so it's reasonable for the tree to remain dirty. - */ - __wt_tree_modify_set(session); } /* @@ -1463,9 +1434,6 @@ __wt_ref_addr_copy(WT_SESSION_IMPL *session, WT_REF *ref, WT_ADDR_COPY *copy) unpack = &_unpack; page = ref->home; - /* Any thread accessing ref address must hold a valid split generation. */ - WT_ASSERT(session, __wt_session_gen(session, WT_GEN_SPLIT) != 0); - /* * To look at an on-page cell, we need to look at the parent page's disk image, and that can be * dangerous. The problem is if the parent page splits, deepening the tree. As part of that @@ -1507,26 +1475,6 @@ __wt_ref_addr_copy(WT_SESSION_IMPL *session, WT_REF *ref, WT_ADDR_COPY *copy) } /* - * __wt_get_page_modify_ta -- - * Returns the page modify stop time aggregate information if exists. - */ -static inline bool -__wt_get_page_modify_ta(WT_SESSION_IMPL *session, WT_PAGE *page, WT_TIME_AGGREGATE **ta) -{ - WT_ASSERT(session, __wt_session_gen(session, WT_GEN_SPLIT) != 0); - - /* If NULL, there is no information. */ - if (page->modify == NULL) - return (false); - - if (page->modify->stop_ta == NULL) - return (false); - - WT_ORDERED_READ(*ta, page->modify->stop_ta); - return (*ta != NULL); -} - -/* * __wt_ref_block_free -- * Free the on-disk block for a reference and clear the address. */ @@ -1534,20 +1482,15 @@ static inline int __wt_ref_block_free(WT_SESSION_IMPL *session, WT_REF *ref) { WT_ADDR_COPY addr; - WT_DECL_RET; - WT_ENTER_GENERATION(session, WT_GEN_SPLIT); if (!__wt_ref_addr_copy(session, ref, &addr)) - goto err; + return (0); - WT_ERR(__wt_btree_block_free(session, addr.addr, addr.size)); + WT_RET(__wt_btree_block_free(session, addr.addr, addr.size)); /* Clear the address (so we don't free it twice). */ __wt_ref_addr_free(session, ref); - -err: - WT_LEAVE_GENERATION(session, WT_GEN_SPLIT); - return (ret); + return (0); } /* @@ -2104,19 +2047,13 @@ __wt_btcur_skip_page( WT_SESSION_IMPL *session, WT_REF *ref, void *context, bool visible_all, bool *skipp) { WT_ADDR_COPY addr; - WT_PAGE_WALK_SKIP_STATS *walk_skip_stats; - WT_TIME_AGGREGATE *ta; uint8_t previous_state; - bool clean_page; + WT_UNUSED(context); WT_UNUSED(visible_all); *skipp = false; /* Default to reading */ - walk_skip_stats = (WT_PAGE_WALK_SKIP_STATS *)context; - ta = NULL; - clean_page = false; - /* Don't skip pages in FLCS trees; deleted records need to read back as 0. */ if (S2BT(session)->type == BTREE_COL_FIX) return (0); @@ -2141,36 +2078,14 @@ __wt_btcur_skip_page( return (0); WT_REF_LOCK(session, ref, &previous_state); - - if (previous_state == WT_REF_MEM && !__wt_page_is_modified(ref->page)) - clean_page = true; - - /* Look at the disk address, if it exists. */ - if ((previous_state == WT_REF_DISK || previous_state == WT_REF_DELETED || clean_page) && - __wt_ref_addr_copy(session, ref, &addr)) { - /* - * Otherwise, check the timestamp information. We base this decision on the aggregate stop - * point added to the page during the last reconciliation. - */ - if (WT_TIME_AGGREGATE_HAS_STOP(&addr.ta) && - __wt_txn_snap_min_visible(session, addr.ta.newest_stop_txn, addr.ta.newest_stop_ts, - addr.ta.newest_stop_durable_ts)) { - *skipp = true; - walk_skip_stats->total_del_pages_skipped++; - } - } else if (clean_page && __wt_get_page_modify_ta(session, ref->page, &ta) && - __wt_txn_snap_min_visible( - session, ta->newest_stop_txn, ta->newest_stop_ts, ta->newest_stop_durable_ts)) { - /* - * If the reader can see all of the deleted content, they can skip a deleted clean page. - * Before determining whether the deleted page is visible, copy the stop time aggregate - * information pointer because as part of the checkpoint operation, this pointer can be - * released in parallel. - */ + if ((previous_state == WT_REF_DISK || previous_state == WT_REF_DELETED || + (previous_state == WT_REF_MEM && !__wt_page_is_modified(ref->page))) && + __wt_ref_addr_copy(session, ref, &addr) && addr.ta.newest_stop_txn != WT_TXN_MAX && + addr.ta.newest_stop_ts != WT_TS_MAX && + __wt_txn_visible(session, addr.ta.newest_stop_txn, addr.ta.newest_stop_ts)) *skipp = true; - walk_skip_stats->total_inmem_del_pages_skipped++; - } WT_REF_UNLOCK(ref, previous_state); + return (0); } diff --git a/src/third_party/wiredtiger/src/include/cache.h b/src/third_party/wiredtiger/src/include/cache.h index 12bd80ad022..03d5c68c9b7 100644 --- a/src/third_party/wiredtiger/src/include/cache.h +++ b/src/third_party/wiredtiger/src/include/cache.h @@ -97,10 +97,8 @@ struct __wt_cache { uint64_t app_waits; /* User threads waited for cache */ uint64_t app_evicts; /* Pages evicted by user threads */ - uint64_t evict_max_page_size; /* Largest page seen at eviction */ - uint64_t evict_max_ms; /* Longest milliseconds spent at a single eviction */ - uint64_t reentry_hs_eviction_ms; /* Total milliseconds spent inside a nested eviction */ - struct timespec stuck_time; /* Stuck time */ + uint64_t evict_max_page_size; /* Largest page seen at eviction */ + struct timespec stuck_time; /* Stuck time */ /* * Read information. diff --git a/src/third_party/wiredtiger/src/include/cell.h b/src/third_party/wiredtiger/src/include/cell.h index 122156549c0..68e11c3d903 100644 --- a/src/third_party/wiredtiger/src/include/cell.h +++ b/src/third_party/wiredtiger/src/include/cell.h @@ -132,21 +132,20 @@ */ struct __wt_cell { /* - * Maximum of 98 bytes: + * Maximum of 71 bytes: * 1: cell descriptor byte * 1: prefix compression count * 1: secondary descriptor byte * 36: 4 timestamps (uint64_t encoding, max 9 bytes) * 18: 2 transaction IDs (uint64_t encoding, max 9 bytes) * 9: associated 64-bit value (uint64_t encoding, max 9 bytes) - * 27: fast-delete information (transaction ID, 2 timestamps) * 5: data length (uint32_t encoding, max 5 bytes) * - * This calculation is pessimistic: the prefix compression count and 64V value overlap, and the - * validity window, 64V value, fast-delete information and data length are all optional in some - * or even most cases. + * This calculation is extremely pessimistic: the prefix compression + * count and 64V value overlap, and the validity window, 64V value + * and data length are all optional in some cases. */ - uint8_t __chunk[98]; + uint8_t __chunk[1 + 1 + 1 + 7 * WT_INTPACK64_MAXSIZE + WT_INTPACK32_MAXSIZE]; }; /* AUTOMATIC FLAG VALUE GENERATION START 0 */ diff --git a/src/third_party/wiredtiger/src/include/cell_inline.h b/src/third_party/wiredtiger/src/include/cell_inline.h index 89b15d99bf2..e593ff17a0d 100644 --- a/src/third_party/wiredtiger/src/include/cell_inline.h +++ b/src/third_party/wiredtiger/src/include/cell_inline.h @@ -670,7 +670,6 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE WT_TIME_WINDOW tw; } copy; WT_CELL_UNPACK_COMMON *unpack; - WT_PAGE_DELETED page_del; WT_TIME_AGGREGATE *ta; WT_TIME_WINDOW *tw; uint64_t v; @@ -768,7 +767,6 @@ copy_cell_restart: if ((cell->__chunk[0] & WT_CELL_SECOND_DESC) == 0) break; flags = *p++; /* skip second descriptor byte */ - WT_CELL_LEN_CHK(p, 0); if (LF_ISSET(WT_CELL_PREPARE)) ta->prepare = 1; @@ -812,7 +810,6 @@ copy_cell_restart: if ((cell->__chunk[0] & WT_CELL_SECOND_DESC) == 0) break; flags = *p++; /* skip second descriptor byte */ - WT_CELL_LEN_CHK(p, 0); if (LF_ISSET(WT_CELL_PREPARE)) tw->prepare = 1; @@ -849,21 +846,6 @@ copy_cell_restart: } /* - * Unpack any fast-truncate information. Note that there is no way to write fast-truncate - * information to disk in versions before 6.1, but this information may still exist in the - * database files if we are downgrading from newer versions. If the fast-truncate information is - * present, it needs to be unpacked but we will ignore these values. Ignoring these values is - * equivalent to writing out truncated content that is not associated with any visibility. - */ - if (unpack->raw == WT_CELL_ADDR_DEL && F_ISSET(dsk, WT_PAGE_FT_UPDATE)) { - WT_RET( - __wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), (uint64_t *)&page_del.txnid)); - WT_RET(__wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del.timestamp)); - WT_RET( - __wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del.durable_timestamp)); - } - - /* * Check for an RLE count or record number that optionally follows the cell descriptor byte on * column-store variable-length pages. */ diff --git a/src/third_party/wiredtiger/src/include/column_inline.h b/src/third_party/wiredtiger/src/include/column_inline.h index 22c4e1ec9f9..c09a1321b23 100644 --- a/src/third_party/wiredtiger/src/include/column_inline.h +++ b/src/third_party/wiredtiger/src/include/column_inline.h @@ -16,13 +16,6 @@ __col_insert_search_gt(WT_INSERT_HEAD *ins_head, uint64_t recno) WT_INSERT *ins, **insp, *ret_ins; int i; - /* - * Compiler may replace the following usage of the variable with another read. - * - * Place a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ins, WT_SKIP_LAST(ins_head)); - /* If there's no insert chain to search, we're done. */ if ((ins = WT_SKIP_LAST(ins_head)) == NULL) return (NULL); @@ -38,11 +31,8 @@ __col_insert_search_gt(WT_INSERT_HEAD *ins_head, uint64_t recno) ret_ins = NULL; for (i = WT_SKIP_MAXDEPTH - 1, insp = &ins_head->head[i]; i >= 0;) { /* - * CPUs with weak memory ordering may reorder the reads which may lead us to read a stale - * and inconsistent value in the lower level. Place a read barrier to avoid this issue. - * - * This should use WT_ORDERED_READ_WEAK_MEMORDER. But to lower the risk of the change, we - * keep this as before for now. + * Use a local variable to access the insert because the skip list can change across + * references. */ WT_ORDERED_READ(ins, *insp); if (ins != NULL && recno >= WT_INSERT_RECNO(ins)) { @@ -68,15 +58,7 @@ __col_insert_search_gt(WT_INSERT_HEAD *ins_head, uint64_t recno) if ((ins = ret_ins) == NULL) ins = WT_SKIP_FIRST(ins_head); while (recno >= WT_INSERT_RECNO(ins)) - /* - * CPUs with weak memory ordering may reorder the read and we may read a stale next value - * and incorrectly skip a key that is concurrently inserted. For example, if we have A -> C - * -> E initially, D is inserted, then B is inserted. If the current thread sees B, it would - * be consistent to not see D. - * - * Place a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ins, WT_SKIP_NEXT(ins)); + ins = WT_SKIP_NEXT(ins); return (ins); } @@ -90,13 +72,6 @@ __col_insert_search_lt(WT_INSERT_HEAD *ins_head, uint64_t recno) WT_INSERT *ins, **insp, *ret_ins; int i; - /* - * Compiler may replace the following usage of the variable with another read. - * - * Place a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ins, WT_SKIP_FIRST(ins_head)); - /* If there's no insert chain to search, we're done. */ if ((ins = WT_SKIP_FIRST(ins_head)) == NULL) return (NULL); @@ -112,11 +87,8 @@ __col_insert_search_lt(WT_INSERT_HEAD *ins_head, uint64_t recno) ret_ins = NULL; for (i = WT_SKIP_MAXDEPTH - 1, insp = &ins_head->head[i]; i >= 0;) { /* - * CPUs with weak memory ordering may reorder the reads which may lead us to read a stale - * and inconsistent value in the lower level. Place a read barrier to avoid this issue. - * - * This should use WT_ORDERED_READ_WEAK_MEMORDER. But to lower the risk of the change, we - * keep this as before for now. + * Use a local variable to access the insert because the skip list can change across + * references. */ WT_ORDERED_READ(ins, *insp); if (ins != NULL && recno > WT_INSERT_RECNO(ins)) { @@ -143,13 +115,6 @@ __col_insert_search_match(WT_INSERT_HEAD *ins_head, uint64_t recno) uint64_t ins_recno; int cmp, i; - /* - * Compiler may replace the following usage of the variable with another read. - * - * Place a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ins, WT_SKIP_LAST(ins_head)); - /* If there's no insert chain to search, we're done. */ if ((ins = WT_SKIP_LAST(ins_head)) == NULL) return (NULL); @@ -166,11 +131,8 @@ __col_insert_search_match(WT_INSERT_HEAD *ins_head, uint64_t recno) */ for (i = WT_SKIP_MAXDEPTH - 1, insp = &ins_head->head[i]; i >= 0;) { /* - * CPUs with weak memory ordering may reorder the reads which may lead us to read a stale - * and inconsistent value in the lower level. Place a read barrier to avoid this issue. - * - * This should use WT_ORDERED_READ_WEAK_MEMORDER. But to lower the risk of the change, we - * keep this as before for now. + * Use a local variable to access the insert because the skip list can change across + * references. */ WT_ORDERED_READ(ins, *insp); if (ins == NULL) { @@ -207,13 +169,6 @@ __col_insert_search( uint64_t ins_recno; int cmp, i; - /* - * Compiler may replace the following usage of the variable with another read. - * - * Place a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ret_ins, WT_SKIP_LAST(ins_head)); - /* If there's no insert chain to search, we're done. */ if ((ret_ins = WT_SKIP_LAST(ins_head)) == NULL) return (NULL); @@ -221,9 +176,9 @@ __col_insert_search( /* Fast path appends. */ if (recno >= WT_INSERT_RECNO(ret_ins)) { for (i = 0; i < WT_SKIP_MAXDEPTH; i++) { - ins_stack[i] = (i == 0) ? &ret_ins->next[0] : - (ins_head->tail[i] != NULL) ? &ins_head->tail[i]->next[i] : - &ins_head->head[i]; + ins_stack[i] = (i == 0) ? + &ret_ins->next[0] : + (ins_head->tail[i] != NULL) ? &ins_head->tail[i]->next[i] : &ins_head->head[i]; next_stack[i] = NULL; } return (ret_ins); @@ -234,16 +189,7 @@ __col_insert_search( * at each level before stepping down to the next. */ for (i = WT_SKIP_MAXDEPTH - 1, insp = &ins_head->head[i]; i >= 0;) { - /* - * Compiler and CPUs with weak memory ordering may reorder the reads causing us to read a - * stale value here. Different to the row store version, it is generally OK here to read a - * stale value as we don't have prefix search optimization for column store. Therefore, we - * cannot wrongly skip the prefix comparison. However, we should still place a read barrier - * here to ensure we see consistent values in the lower levels to prevent any unexpected - * behavior. - */ - WT_ORDERED_READ_WEAK_MEMORDER(ret_ins, *insp); - if (ret_ins == NULL) { + if ((ret_ins = *insp) == NULL) { next_stack[i] = NULL; ins_stack[i--] = insp--; continue; @@ -264,12 +210,7 @@ __col_insert_search( insp = &ret_ins->next[i]; else if (cmp == 0) /* Exact match: return */ for (; i >= 0; i--) { - /* - * It is possible that we read an old value that is inconsistent to the higher - * levels of the skip list due to read reordering on CPUs with weak memory ordering. - * Add a read barrier to avoid this issue. - */ - WT_ORDERED_READ_WEAK_MEMORDER(next_stack[i], ret_ins->next[i]); + next_stack[i] = ret_ins->next[i]; ins_stack[i] = &ret_ins->next[i]; } else { /* Drop down a level */ @@ -297,7 +238,7 @@ __col_var_last_recno(WT_REF *ref) * records, our callers must handle that explicitly, if they care. */ if (!WT_COL_VAR_REPEAT_SET(page)) - return (page->entries == 0 ? WT_RECNO_OOB : ref->ref_recno + (page->entries - 1)); + return (page->entries == 0 ? 0 : ref->ref_recno + (page->entries - 1)); repeat = &page->pg_var_repeats[page->pg_var_nrepeats - 1]; return ((repeat->recno + repeat->rle) - 1 + (page->entries - (repeat->indx + 1))); @@ -318,7 +259,7 @@ __col_fix_last_recno(WT_REF *ref) * If there's an append list, there may be more records on the page. This function ignores those * records, our callers must handle that explicitly, if they care. */ - return (page->entries == 0 ? WT_RECNO_OOB : ref->ref_recno + (page->entries - 1)); + return (page->entries == 0 ? 0 : ref->ref_recno + (page->entries - 1)); } /* diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h index fe21564d7a0..7926c8bd5e7 100644 --- a/src/third_party/wiredtiger/src/include/connection.h +++ b/src/third_party/wiredtiger/src/include/connection.h @@ -385,20 +385,6 @@ struct __wt_connection_impl { uint64_t ckpt_write_bytes; uint64_t ckpt_write_pages; - /* Record the important timestamps of each stage in recovery. */ - struct __wt_recovery_timeline { - uint64_t log_replay_ms; - uint64_t rts_ms; - uint64_t checkpoint_ms; - uint64_t recovery_ms; - } recovery_timeline; - - /* Record the important timestamps of each stage in shutdown. */ - struct __wt_shutdown_timeline { - uint64_t rts_ms; - uint64_t checkpoint_ms; - uint64_t shutdown_ms; - } shutdown_timeline; /* Checkpoint and incremental backup data */ uint64_t incr_granularity; WT_BLKINCR incr_backups[WT_BLKINCR_MAX]; @@ -412,11 +398,7 @@ struct __wt_connection_impl { uint32_t stat_flags; /* Options declared in flags.py */ /* Connection statistics */ - uint64_t rec_maximum_hs_wrapup_milliseconds; /* Maximum milliseconds moving updates to history - store took. */ - uint64_t - rec_maximum_image_build_milliseconds; /* Maximum milliseconds building disk image took. */ - uint64_t rec_maximum_milliseconds; /* Maximum milliseconds reconciliation took. */ + uint64_t rec_maximum_seconds; /* Maximum seconds reconciliation took. */ WT_CONNECTION_STATS *stats[WT_COUNTER_SLOTS]; WT_CONNECTION_STATS *stat_array; @@ -438,7 +420,6 @@ struct __wt_connection_impl { WT_THREAD_GROUP evict_threads; uint32_t evict_threads_max; /* Max eviction threads */ uint32_t evict_threads_min; /* Min eviction threads */ - bool evict_sample_inmem; #define WT_STATLOG_FILENAME "WiredTigerStat.%d.%H" WT_SESSION_IMPL *stat_session; /* Statistics log session */ @@ -604,28 +585,25 @@ struct __wt_connection_impl { * Variable with flags for which subsystems the diagnostic stress timing delays have been requested. */ /* AUTOMATIC FLAG VALUE GENERATION START 0 */ -#define WT_TIMING_STRESS_AGGRESSIVE_SWEEP 0x000001u -#define WT_TIMING_STRESS_BACKUP_RENAME 0x000002u -#define WT_TIMING_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 0x000004u -#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x000008u -#define WT_TIMING_STRESS_CHECKPOINT_STOP 0x000010u -#define WT_TIMING_STRESS_COMPACT_SLOW 0x000020u -#define WT_TIMING_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION 0x000040u -#define WT_TIMING_STRESS_FAILPOINT_HISTORY_STORE_DELETE_KEY_FROM_TS 0x000080u -#define WT_TIMING_STRESS_HS_CHECKPOINT_DELAY 0x000100u -#define WT_TIMING_STRESS_HS_SEARCH 0x000200u -#define WT_TIMING_STRESS_HS_SWEEP 0x000400u -#define WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY 0x000800u -#define WT_TIMING_STRESS_PREPARE_RESOLUTION 0x001000u -#define WT_TIMING_STRESS_PREPARE_RESOLUTION_2 0x002000u -#define WT_TIMING_STRESS_SPLIT_1 0x004000u -#define WT_TIMING_STRESS_SPLIT_2 0x008000u -#define WT_TIMING_STRESS_SPLIT_3 0x010000u -#define WT_TIMING_STRESS_SPLIT_4 0x020000u -#define WT_TIMING_STRESS_SPLIT_5 0x040000u -#define WT_TIMING_STRESS_SPLIT_6 0x080000u -#define WT_TIMING_STRESS_SPLIT_7 0x100000u -#define WT_TIMING_STRESS_TIERED_FLUSH_FINISH 0x200000u +#define WT_TIMING_STRESS_AGGRESSIVE_SWEEP 0x00001u +#define WT_TIMING_STRESS_BACKUP_RENAME 0x00002u +#define WT_TIMING_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 0x00004u +#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x00008u +#define WT_TIMING_STRESS_CHECKPOINT_STOP 0x00010u +#define WT_TIMING_STRESS_COMPACT_SLOW 0x00020u +#define WT_TIMING_STRESS_FAILPOINT_HISTORY_STORE_DELETE_KEY_FROM_TS 0x00040u +#define WT_TIMING_STRESS_HS_CHECKPOINT_DELAY 0x00080u +#define WT_TIMING_STRESS_HS_SEARCH 0x00100u +#define WT_TIMING_STRESS_HS_SWEEP 0x00200u +#define WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY 0x00400u +#define WT_TIMING_STRESS_SPLIT_1 0x00800u +#define WT_TIMING_STRESS_SPLIT_2 0x01000u +#define WT_TIMING_STRESS_SPLIT_3 0x02000u +#define WT_TIMING_STRESS_SPLIT_4 0x04000u +#define WT_TIMING_STRESS_SPLIT_5 0x08000u +#define WT_TIMING_STRESS_SPLIT_6 0x10000u +#define WT_TIMING_STRESS_SPLIT_7 0x20000u +#define WT_TIMING_STRESS_TIERED_FLUSH_FINISH 0x40000u /* AUTOMATIC FLAG VALUE GENERATION STOP 64 */ uint64_t timing_stress_flags; diff --git a/src/third_party/wiredtiger/src/include/ctype_inline.h b/src/third_party/wiredtiger/src/include/ctype_inline.h index 3edf01b2ce0..a6dc8e66e9f 100644 --- a/src/third_party/wiredtiger/src/include/ctype_inline.h +++ b/src/third_party/wiredtiger/src/include/ctype_inline.h @@ -55,11 +55,7 @@ __wt_isdigit(u_char c) static inline bool __wt_isprint(u_char c) { - /* - * On some systems, isprint() says that characters over 0x80 are printable, even if they may not - * actually be printable. - */ - return (isprint(c) != 0) && (c < 0x80); + return (isprint(c) != 0); } /* diff --git a/src/third_party/wiredtiger/src/include/cursor.h b/src/third_party/wiredtiger/src/include/cursor.h index 19b2735c8a0..2a2638660d6 100644 --- a/src/third_party/wiredtiger/src/include/cursor.h +++ b/src/third_party/wiredtiger/src/include/cursor.h @@ -209,21 +209,10 @@ struct __wt_cursor_btree { */ enum { WT_CBT_RETRY_NOTSET = 0, WT_CBT_RETRY_INSERT, WT_CBT_RETRY_PAGE } iter_retry; - /* - * The random number state is used for random cursor operations. The random number can be seeded - * by the user or is randomly set based on the time and thread ID. - */ - WT_RAND_STATE rnd; /* Random number generation state */ - #ifdef HAVE_DIAGNOSTIC /* Check that cursor next/prev never returns keys out-of-order. */ WT_ITEM *lastkey, _lastkey; uint64_t lastrecno; - - /* Record where the last key is when we see it to help debugging out of order issues. */ - WT_REF *lastref; /* The page where the last key is */ - uint32_t lastslot; /* WT_COL/WT_ROW 0-based slot */ - WT_INSERT *lastins; /* The last insert list */ #endif /* AUTOMATIC FLAG VALUE GENERATION START 0 */ diff --git a/src/third_party/wiredtiger/src/include/dhandle.h b/src/third_party/wiredtiger/src/include/dhandle.h index 88542d3b6ff..5f3b3101539 100644 --- a/src/third_party/wiredtiger/src/include/dhandle.h +++ b/src/third_party/wiredtiger/src/include/dhandle.h @@ -64,16 +64,15 @@ struct __wt_data_handle { TAILQ_ENTRY(__wt_data_handle) q; TAILQ_ENTRY(__wt_data_handle) hashq; - const char *name; /* Object name as a URI */ - uint64_t name_hash; /* Hash of name */ - const char *checkpoint; /* Checkpoint name (or NULL) */ - const char **cfg; /* Configuration information */ - const char *meta_base; /* Base metadata configuration */ - uint64_t meta_hash; /* Base metadata hash */ - struct timespec base_upd; /* Time of last metadata update with meta base */ + const char *name; /* Object name as a URI */ + uint64_t name_hash; /* Hash of name */ + const char *checkpoint; /* Checkpoint name (or NULL) */ + const char **cfg; /* Configuration information */ + const char *meta_base; /* Base metadata configuration */ + size_t meta_base_length; /* Base metadata length */ +#ifdef HAVE_DIAGNOSTIC const char *orig_meta_base; /* Copy of the base metadata configuration */ - uint64_t orig_meta_hash; /* Copy of base metadata hash */ - struct timespec orig_upd; /* Time of original setup of meta base */ +#endif /* * Sessions holding a connection's data handle will have a non-zero reference count; sessions * using a connection's data handle will have a non-zero in-use count. Instances of cached diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h index dfdfab6153e..7ebf7ba83e1 100644 --- a/src/third_party/wiredtiger/src/include/extern.h +++ b/src/third_party/wiredtiger/src/include/extern.h @@ -774,10 +774,8 @@ extern int __wt_hex_to_raw(WT_SESSION_IMPL *session, const char *from, WT_ITEM * extern int __wt_hs_config(WT_SESSION_IMPL *session, const char **cfg) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_hs_delete_key_from_ts(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, - uint32_t btree_id, const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool error_on_ooo_ts) - WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_hs_delete_updates(WT_SESSION_IMPL *session, WT_RECONCILE *r) - WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); + uint32_t btree_id, const WT_ITEM *key, wt_timestamp_t ts, bool reinsert, bool ooo_tombstone, + bool error_on_ooo_ts) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_hs_find_upd(WT_SESSION_IMPL *session, uint32_t btree_id, WT_ITEM *key, const char *value_format, uint64_t recno, WT_UPDATE_VALUE *upd_value, WT_ITEM *base_value_buf) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -1103,9 +1101,9 @@ extern int __wt_metadata_cursor_release(WT_SESSION_IMPL *session, WT_CURSOR **cu extern int __wt_metadata_get_ckptlist(WT_SESSION *session, const char *name, WT_CKPT **ckptbasep) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_metadata_insert(WT_SESSION_IMPL *session, const char *key, const char *value) +extern int __wt_metadata_init_base_write_gen(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_metadata_load_prior_state(WT_SESSION_IMPL *session) +extern int __wt_metadata_insert(WT_SESSION_IMPL *session, const char *key, const char *value) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_metadata_remove(WT_SESSION_IMPL *session, const char *key) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -1115,7 +1113,7 @@ extern int __wt_metadata_turtle_rewrite(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_metadata_update(WT_SESSION_IMPL *session, const char *key, const char *value) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_metadata_update_connection(WT_SESSION_IMPL *session, const char *config) +extern int __wt_metadata_update_base_write_gen(WT_SESSION_IMPL *session, const char *config) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_modify_apply_api(WT_CURSOR *cursor, WT_MODIFY *entries, int nentries) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))) @@ -1194,8 +1192,8 @@ extern int __wt_panic_func(WT_SESSION_IMPL *session, int error, const char *func WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_progress(WT_SESSION_IMPL *session, const char *s, uint64_t v) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_random_descent(WT_SESSION_IMPL *session, WT_REF **refp, uint32_t flags, - WT_RAND_STATE *rnd) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); +extern int __wt_random_descent(WT_SESSION_IMPL *session, WT_REF **refp, uint32_t flags) + WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_range_truncate(WT_CURSOR *start, WT_CURSOR *stop) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_raw_to_esc_hex(WT_SESSION_IMPL *session, const uint8_t *from, size_t size, @@ -1375,7 +1373,7 @@ extern int __wt_session_copy_values(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_session_create(WT_SESSION_IMPL *session, const char *uri, const char *config) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_session_cursor_cache_sweep(WT_SESSION_IMPL *session, bool big_sweep) +extern int __wt_session_cursor_cache_sweep(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_session_get_btree_ckpt(WT_SESSION_IMPL *session, const char *uri, const char *cfg[], uint32_t flags) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -1594,8 +1592,6 @@ extern int __wt_txn_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[], b WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_txn_set_timestamp_uint(WT_SESSION_IMPL *session, WT_TS_TXN_TYPE which, wt_timestamp_t ts) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_txn_snapshot_save_and_refresh(WT_SESSION_IMPL *session) - WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_txn_truncate_log(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *start, WT_CURSOR_BTREE *stop) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_txn_ts_log(WT_SESSION_IMPL *session) @@ -1811,8 +1807,6 @@ extern void __wt_page_out(WT_SESSION_IMPL *session, WT_PAGE **pagep); extern void __wt_print_huffman_code(void *huffman_arg, uint16_t symbol); extern void __wt_random_init(WT_RAND_STATE volatile *rnd_state) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))); -extern void __wt_random_init_custom_seed(WT_RAND_STATE volatile *rnd_state, uint64_t v) - WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))); extern void __wt_random_init_seed(WT_SESSION_IMPL *session, WT_RAND_STATE volatile *rnd_state) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))); extern void __wt_read_row_time_window( @@ -1831,7 +1825,6 @@ extern void __wt_rwlock_destroy(WT_SESSION_IMPL *session, WT_RWLOCK *l); extern void __wt_schema_destroy_colgroup(WT_SESSION_IMPL *session, WT_COLGROUP **colgroupp); extern void __wt_scr_discard(WT_SESSION_IMPL *session); extern void __wt_session_close_cache(WT_SESSION_IMPL *session); -extern void __wt_session_dhandle_sweep(WT_SESSION_IMPL *session); extern void __wt_session_gen_enter(WT_SESSION_IMPL *session, int which); extern void __wt_session_gen_leave(WT_SESSION_IMPL *session, int which); extern void __wt_stash_discard(WT_SESSION_IMPL *session); @@ -1877,7 +1870,6 @@ extern void __wt_txn_publish_durable_timestamp(WT_SESSION_IMPL *session); extern void __wt_txn_release(WT_SESSION_IMPL *session); extern void __wt_txn_release_resources(WT_SESSION_IMPL *session); extern void __wt_txn_release_snapshot(WT_SESSION_IMPL *session); -extern void __wt_txn_snapshot_release_and_restore(WT_SESSION_IMPL *session); extern void __wt_txn_stats_update(WT_SESSION_IMPL *session); extern void __wt_txn_truncate_end(WT_SESSION_IMPL *session); extern void __wt_update_vector_clear(WT_UPDATE_VECTOR *updates); @@ -1930,8 +1922,6 @@ static inline bool __wt_eviction_updates_needed(WT_SESSION_IMPL *session, double WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_failpoint(WT_SESSION_IMPL *session, uint64_t conn_flag, u_int probability) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -static inline bool __wt_get_page_modify_ta(WT_SESSION_IMPL *session, WT_PAGE *page, - WT_TIME_AGGREGATE **ta) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_isalnum(u_char c) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_isalpha(u_char c) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_isascii(u_char c) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -1973,11 +1963,6 @@ static inline bool __wt_session_can_wait(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_split_descent_race(WT_SESSION_IMPL *session, WT_REF *ref, WT_PAGE_INDEX *saved_pindex) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -static inline bool __wt_txn_snap_min_visible( - WT_SESSION_IMPL *session, uint64_t id, wt_timestamp_t timestamp, wt_timestamp_t durable_timestamp) - WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -static inline bool __wt_txn_timestamp_visible(WT_SESSION_IMPL *session, wt_timestamp_t timestamp) - WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_txn_tw_start_visible(WT_SESSION_IMPL *session, WT_TIME_WINDOW *tw) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_txn_tw_start_visible_all(WT_SESSION_IMPL *session, WT_TIME_WINDOW *tw) @@ -2356,9 +2341,6 @@ static inline void __wt_spin_lock(WT_SESSION_IMPL *session, WT_SPINLOCK *t); static inline void __wt_spin_lock_track(WT_SESSION_IMPL *session, WT_SPINLOCK *t); static inline void __wt_spin_unlock(WT_SESSION_IMPL *session, WT_SPINLOCK *t); static inline void __wt_struct_size_adjust(WT_SESSION_IMPL *session, size_t *sizep); -static inline void __wt_timer_evaluate_ms( - WT_SESSION_IMPL *session, WT_TIMER *start_time, uint64_t *time_diff_ms); -static inline void __wt_timer_start(WT_SESSION_IMPL *session, WT_TIMER *start_time); static inline void __wt_timing_stress(WT_SESSION_IMPL *session, u_int flag); static inline void __wt_tree_modify_set(WT_SESSION_IMPL *session); static inline void __wt_txn_cursor_op(WT_SESSION_IMPL *session); diff --git a/src/third_party/wiredtiger/src/include/gcc.h b/src/third_party/wiredtiger/src/include/gcc.h index 73efd9587d0..249d0d8bdae 100644 --- a/src/third_party/wiredtiger/src/include/gcc.h +++ b/src/third_party/wiredtiger/src/include/gcc.h @@ -168,8 +168,6 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) do { \ __asm__ volatile("lfence" ::: "memory"); \ } while (0) -/* We only need a compiler barrier for x86 as its memory ordering is strong enough. */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_BARRIER() #define WT_WRITE_BARRIER() \ do { \ __asm__ volatile("sfence" ::: "memory"); \ @@ -182,9 +180,6 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) __asm__ volatile("lock; addl $0, 0(%%esp)" ::: "memory"); \ } while (0) #define WT_READ_BARRIER() WT_FULL_BARRIER() -/* We only need a compiler barrier for i386 as its memory ordering is strong enough. */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_BARRIER() -#define WT_READ_BARRIER() WT_FULL_BARRIER() #define WT_WRITE_BARRIER() WT_FULL_BARRIER() #elif defined(__mips64el__) || defined(__mips__) || defined(__mips64__) || defined(__mips64) @@ -197,11 +192,6 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) do { \ __asm__ volatile("sync; ld $0, %0" ::"m"(*(long *)0xffffffff80000000) : "memory"); \ } while (0) -/* - * The memory ordering of MIPS depends on implementation. Put an actual read barrier to ensure - * correctness. - */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_READ_BARRIER() #define WT_WRITE_BARRIER() \ do { \ __asm__ volatile("sync; ld $0, %0" ::"m"(*(long *)0xffffffff80000000) : "memory"); \ @@ -215,18 +205,12 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) __asm__ volatile("sync" ::: "memory"); \ } while (0) -/* - * TODO: ISA 2.07 Elemental Memory Barriers would be better, specifically mbll, and mbss, but they - * are not supported by POWER 8. - */ +/* TODO: ISA 2.07 Elemental Memory Barriers would be better, + specifically mbll, and mbss, but they are not supported by POWER 8 */ #define WT_READ_BARRIER() \ do { \ __asm__ volatile("lwsync" ::: "memory"); \ } while (0) -/* - * PPC has a weak memory ordering model. Use an actual read barrier to prevent CPU read reordering. - */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_READ_BARRIER() #define WT_WRITE_BARRIER() \ do { \ __asm__ volatile("lwsync" ::: "memory"); \ @@ -260,10 +244,6 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) do { \ __asm__ volatile("dsb ishld" ::: "memory"); \ } while (0) -/* - * ARM has a weak memory ordering model. Use an actual read barrier to prevent CPU read reordering. - */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_READ_BARRIER() #define WT_WRITE_BARRIER() \ do { \ __asm__ volatile("dsb ishst" ::: "memory"); \ @@ -276,8 +256,6 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) __asm__ volatile("bcr 15,0\n" ::: "memory"); \ } while (0) #define WT_READ_BARRIER() WT_FULL_BARRIER() -/* We only need a compiler barrier for s390x as its memory ordering is strong enough. */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_BARRIER() #define WT_WRITE_BARRIER() WT_FULL_BARRIER() #elif defined(__sparc__) @@ -297,9 +275,6 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) __asm__ volatile("" ::: "memory"); \ } while (0) -/* We only need a compiler barrier for sparc as its memory ordering is strong enough. */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_READ_BARRIER() - #define WT_WRITE_BARRIER() \ do { \ __asm__ volatile("" ::: "memory"); \ @@ -338,35 +313,11 @@ WT_ATOMIC_FUNC(size, size_t, size_t *vp, size_t v) do { \ __asm__ volatile("fence r, r" ::: "memory"); \ } while (0) -/* - * RISC-V has a weak memory ordering model. Use an actual read barrier to prevent CPU read - * reordering. - */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_READ_BARRIER() #define WT_WRITE_BARRIER() \ do { \ __asm__ volatile("fence w, w" ::: "memory"); \ } while (0) -#elif defined(__loongarch64) -#define WT_PAUSE() __asm__ volatile("nop\n" ::: "memory") -#define WT_FULL_BARRIER() \ - do { \ - __asm__ volatile("dbar 0" ::: "memory"); \ - } while (0) -#define WT_READ_BARRIER() \ - do { \ - __asm__ volatile("dbar 0" ::: "memory"); \ - } while (0) -/* - * loongarch has a weak memory ordering model. Use an actual read barrier to prevent CPU read - * reordering. - */ -#define WT_READ_BARRIER_WEAK_MEMORDER() WT_READ_BARRIER() -#define WT_WRITE_BARRIER() \ - do { \ - __asm__ volatile("dbar 0" ::: "memory"); \ - } while (0) #else #error "No write barrier implementation for this hardware" #endif diff --git a/src/third_party/wiredtiger/src/include/hardware.h b/src/third_party/wiredtiger/src/include/hardware.h index bc5cd41ad5e..753874fd87f 100644 --- a/src/third_party/wiredtiger/src/include/hardware.h +++ b/src/third_party/wiredtiger/src/include/hardware.h @@ -26,20 +26,6 @@ } while (0) /* - * In some architectures with weak memory ordering, the CPU can reorder the reads across full - * barriers in other threads. Guarantee that subsequent reads do not see any earlier state in those - * architectures. - * - * !!! This is a temporary solution to avoid a performance regression in x86. Do not use this macro - * and we will revisit it later. - */ -#define WT_ORDERED_READ_WEAK_MEMORDER(v, val) \ - do { \ - (v) = (val); \ - WT_READ_BARRIER_WEAK_MEMORDER(); \ - } while (0) - -/* * Atomic versions of the flag set/clear macros. */ @@ -55,14 +41,14 @@ } while (!__wt_atomic_cas16(&(p)->flags_atomic, __orig, __orig | (uint16_t)(mask))); \ } while (0) -#define F_CLR_ATOMIC_16(p, mask) \ - do { \ - uint16_t __orig; \ - if (!F_ISSET_ATOMIC_16(p, mask)) \ - break; \ - do { \ - __orig = (p)->flags_atomic; \ - } while (!__wt_atomic_cas16(&(p)->flags_atomic, __orig, __orig & (uint16_t)(~(mask)))); \ +#define F_CLR_ATOMIC_16(p, mask) \ + do { \ + uint16_t __orig; \ + if (!F_ISSET_ATOMIC_16(p, mask)) \ + break; \ + do { \ + __orig = (p)->flags_atomic; \ + } while (!__wt_atomic_cas16(&(p)->flags_atomic, __orig, __orig & ~(uint16_t)(mask))); \ } while (0) /* diff --git a/src/third_party/wiredtiger/src/include/log.h b/src/third_party/wiredtiger/src/include/log.h index 207c986741b..c8482f1febb 100644 --- a/src/third_party/wiredtiger/src/include/log.h +++ b/src/third_party/wiredtiger/src/include/log.h @@ -205,7 +205,7 @@ struct __wt_logslot { #define WT_SLOT_SYNC_DIR 0x08u /* Directory sync on release */ #define WT_SLOT_SYNC_DIRTY 0x10u /* Sync system buffers on release */ /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */ - uint16_t flags_atomic; /* Atomic flags, use F_*_ATOMIC_16 */ + uint32_t flags; WT_CACHE_LINE_PAD_END }; diff --git a/src/third_party/wiredtiger/src/include/misc.h b/src/third_party/wiredtiger/src/include/misc.h index 1d506627bed..2b666d72ec9 100644 --- a/src/third_party/wiredtiger/src/include/misc.h +++ b/src/third_party/wiredtiger/src/include/misc.h @@ -42,10 +42,9 @@ #define WT_MILLION (1000000) #define WT_BILLION (1000000000) -#define WT_DAY (86400) #define WT_MINUTE (60) -#define WT_PROGRESS_MSG_PERIOD (20) /* Seconds. */ +#define WT_PROGRESS_MSG_PERIOD (20) #define WT_KILOBYTE (1024) #define WT_MEGABYTE (1048576) diff --git a/src/third_party/wiredtiger/src/include/msvc.h b/src/third_party/wiredtiger/src/include/msvc.h index 088dd60cd8a..9823313035c 100644 --- a/src/third_party/wiredtiger/src/include/msvc.h +++ b/src/third_party/wiredtiger/src/include/msvc.h @@ -114,22 +114,6 @@ WT_READ_BARRIER(void) } /* - * WT_READ_BARRIER_WEAK_MEMORDER -- - * MSVC implementation of WT_READ_BARRIER_WEAK_MEMORDER. - */ -static inline void -WT_READ_BARRIER_WEAK_MEMORDER(void) -{ - /* x86 has a strong memory model, so we only need a compiler barrier here. */ -#ifdef _M_AMD64 - WT_BARRIER(); -#else - /* Default to a stronger read barrier for other platforms. */ - WT_READ_BARRIER(); -#endif -} - -/* * WT_WRITE_BARRIER -- * MSVC implementation of WT_WRITE_BARRIER. */ diff --git a/src/third_party/wiredtiger/src/include/os.h b/src/third_party/wiredtiger/src/include/os.h index 15cc76d70eb..f3d6602fbbc 100644 --- a/src/third_party/wiredtiger/src/include/os.h +++ b/src/third_party/wiredtiger/src/include/os.h @@ -71,12 +71,12 @@ #define WT_CLOCKDIFF_MS(end, begin) (WT_CLOCKDIFF_NS(end, begin) / WT_MILLION) #define WT_CLOCKDIFF_SEC(end, begin) (WT_CLOCKDIFF_NS(end, begin) / WT_BILLION) -#define WT_TIMECMP(t1, t2) \ - ((t1).tv_sec < (t2).tv_sec ? -1 : \ - (t1).tv_sec == (t2).tv_sec ? (t1).tv_nsec < (t2).tv_nsec ? -1 : \ - (t1).tv_nsec == (t2).tv_nsec ? 0 : \ - 1 : \ - 1) +#define WT_TIMECMP(t1, t2) \ + ((t1).tv_sec < (t2).tv_sec ? \ + -1 : \ + (t1).tv_sec == (t2).tv_sec ? \ + (t1).tv_nsec < (t2).tv_nsec ? -1 : (t1).tv_nsec == (t2).tv_nsec ? 0 : 1 : \ + 1) /* * Macros to ensure a file handle is inserted or removed from both the main and the hashed queue, diff --git a/src/third_party/wiredtiger/src/include/os_fhandle_inline.h b/src/third_party/wiredtiger/src/include/os_fhandle_inline.h index 766a3fd843f..c79c6ddd155 100644 --- a/src/third_party/wiredtiger/src/include/os_fhandle_inline.h +++ b/src/third_party/wiredtiger/src/include/os_fhandle_inline.h @@ -51,9 +51,6 @@ static inline int __wt_fextend(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset) { WT_FILE_HANDLE *handle; -#ifdef HAVE_DIAGNOSTIC - wt_off_t cur_size; -#endif WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_READONLY)); WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_IN_MEMORY)); @@ -66,13 +63,6 @@ __wt_fextend(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset) * function to call. */ handle = fh->handle; -#ifdef HAVE_DIAGNOSTIC - /* Make sure we don't try to shrink the file during backup. */ - if (handle->fh_size != NULL) { - WT_RET(handle->fh_size(handle, (WT_SESSION *)session, &cur_size)); - WT_ASSERT(session, cur_size <= offset || S2C(session)->hot_backup_start == 0); - } -#endif if (handle->fh_extend_nolock != NULL) return (handle->fh_extend_nolock(handle, (WT_SESSION *)session, offset)); if (handle->fh_extend != NULL) @@ -145,9 +135,6 @@ static inline int __wt_ftruncate(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset) { WT_FILE_HANDLE *handle; -#ifdef HAVE_DIAGNOSTIC - wt_off_t cur_size; -#endif WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_READONLY)); @@ -159,13 +146,6 @@ __wt_ftruncate(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset) * function to call. */ handle = fh->handle; -#ifdef HAVE_DIAGNOSTIC - /* Make sure we don't try to shrink the file during backup. */ - if (handle->fh_size != NULL) { - WT_RET(handle->fh_size(handle, (WT_SESSION *)session, &cur_size)); - WT_ASSERT(session, cur_size <= offset || S2C(session)->hot_backup_start == 0); - } -#endif if (handle->fh_truncate != NULL) return (handle->fh_truncate(handle, (WT_SESSION *)session, offset)); return (__wt_set_return(session, ENOTSUP)); diff --git a/src/third_party/wiredtiger/src/include/reconcile.h b/src/third_party/wiredtiger/src/include/reconcile.h index eba7ffd4a8d..024afebde5e 100644 --- a/src/third_party/wiredtiger/src/include/reconcile.h +++ b/src/third_party/wiredtiger/src/include/reconcile.h @@ -65,17 +65,6 @@ struct __wt_rec_chunk { }; /* - * WT_DELETE_HS_UPD -- - * Update that needs to be deleted from the history store. - */ -struct __wt_delete_hs_upd { - WT_INSERT *ins; /* Insert list reference */ - WT_ROW *rip; /* Original on-page reference */ - WT_UPDATE *upd; - WT_UPDATE *tombstone; -}; - -/* * Reconciliation is the process of taking an in-memory page, walking each entry * in the page, building a backing disk image in a temporary buffer representing * that information, and writing that buffer to disk. What could be simpler? @@ -238,15 +227,6 @@ struct __wt_reconcile { size_t supd_allocated; size_t supd_memsize; /* Size of saved update structures */ - /* - * List of updates to be deleted from the history store. While reviewing updates for each page, - * we save the updates that needs to be deleted from history store here, and then delete them - * after we have built the disk image. - */ - WT_DELETE_HS_UPD *delete_hs_upd; /* Updates to delete from history store */ - uint32_t delete_hs_upd_next; - size_t delete_hs_upd_allocated; - /* List of pages we've written so far. */ WT_MULTI *multi; uint32_t multi_next; @@ -266,6 +246,12 @@ struct __wt_reconcile { */ bool cell_zero; /* Row-store internal page 0th key */ + /* + * We calculate checksums to find previously written identical blocks, but once a match fails + * during an eviction, there's no point trying again. + */ + bool evict_matching_checksum_failed; + WT_REC_DICTIONARY **dictionary; /* Dictionary */ u_int dictionary_next, dictionary_slots; /* Next, max entries */ /* Skiplist head. */ @@ -319,8 +305,7 @@ struct __wt_reconcile { }; typedef struct { - WT_UPDATE *upd; /* Update to write (or NULL) */ - WT_UPDATE *tombstone; /* The tombstone to write (or NULL) */ + WT_UPDATE *upd; /* Update to write (or NULL) */ WT_TIME_WINDOW tw; diff --git a/src/third_party/wiredtiger/src/include/serial_inline.h b/src/third_party/wiredtiger/src/include/serial_inline.h index 52b6e7c2dd7..12542c64ac9 100644 --- a/src/third_party/wiredtiger/src/include/serial_inline.h +++ b/src/third_party/wiredtiger/src/include/serial_inline.h @@ -14,7 +14,6 @@ static inline int __insert_simple_func( WT_SESSION_IMPL *session, WT_INSERT ***ins_stack, WT_INSERT *new_ins, u_int skipdepth) { - WT_INSERT *old_ins; u_int i; WT_UNUSED(session); @@ -30,15 +29,7 @@ __insert_simple_func( * implementations read the old value multiple times. */ for (i = 0; i < skipdepth; i++) { - /* - * The insert stack position must be read only once - if the compiler chooses to re-read the - * shared variable it could lead to skip list corruption. Specifically the comparison - * against the next pointer might indicate that the skip list location is still valid, but - * that may no longer be true when the atomic_cas operation executes. - * - * Place a read barrier here to avoid this issue. - */ - WT_ORDERED_READ(old_ins, *ins_stack[i]); + WT_INSERT *old_ins = *ins_stack[i]; if (old_ins != new_ins->next[i] || !__wt_atomic_cas_ptr(ins_stack[i], old_ins, new_ins)) return (i == 0 ? WT_RESTART : 0); } @@ -54,7 +45,6 @@ static inline int __insert_serial_func(WT_SESSION_IMPL *session, WT_INSERT_HEAD *ins_head, WT_INSERT ***ins_stack, WT_INSERT *new_ins, u_int skipdepth) { - WT_INSERT *old_ins; u_int i; /* The cursor should be positioned. */ @@ -73,15 +63,7 @@ __insert_serial_func(WT_SESSION_IMPL *session, WT_INSERT_HEAD *ins_head, WT_INSE * implementations read the old value multiple times. */ for (i = 0; i < skipdepth; i++) { - /* - * The insert stack position must be read only once - if the compiler chooses to re-read the - * shared variable it could lead to skip list corruption. Specifically the comparison - * against the next pointer might indicate that the skip list location is still valid, but - * that may no longer be true when the atomic_cas operation executes. - * - * Place a read barrier here to avoid this issue. - */ - WT_ORDERED_READ(old_ins, *ins_stack[i]); + WT_INSERT *old_ins = *ins_stack[i]; if (old_ins != new_ins->next[i] || !__wt_atomic_cas_ptr(ins_stack[i], old_ins, new_ins)) return (i == 0 ? WT_RESTART : 0); if (ins_head->tail[i] == NULL || ins_stack[i] == &ins_head->tail[i]->next[i]) diff --git a/src/third_party/wiredtiger/src/include/session.h b/src/third_party/wiredtiger/src/include/session.h index e538e8099ef..58551f5b702 100644 --- a/src/third_party/wiredtiger/src/include/session.h +++ b/src/third_party/wiredtiger/src/include/session.h @@ -47,12 +47,11 @@ typedef TAILQ_HEAD(__wt_cursor_list, __wt_cursor) WT_CURSOR_LIST; /* Number of cursors cached to trigger cursor sweep. */ #define WT_SESSION_CURSOR_SWEEP_COUNTDOWN 40 -/* Minimum number of buckets to visit during a regular cursor sweep. */ +/* Minimum number of buckets to visit during cursor sweep. */ #define WT_SESSION_CURSOR_SWEEP_MIN 5 -/* Maximum number of buckets to visit during a regular cursor sweep. */ -#define WT_SESSION_CURSOR_SWEEP_MAX 64 - +/* Maximum number of buckets to visit during cursor sweep. */ +#define WT_SESSION_CURSOR_SWEEP_MAX 32 /* * WT_SESSION_IMPL -- * Implementation of WT_SESSION. @@ -80,9 +79,8 @@ struct __wt_session_impl { /* * Each session keeps a cache of data handles. The set of handles can grow quite large so we * maintain both a simple list and a hash table of lists. The hash table key is based on a hash - * of the data handle's URI. Though all hash entries are discarded on session close, the hash - * table list itself is kept in allocated memory that lives across session close - so it is - * declared further down. + * of the data handle's URI. The hash table list is kept in allocated memory that lives across + * session close - so it is declared further down. */ /* Session handle reference list */ TAILQ_HEAD(__dhandles, __wt_data_handle_cache) dhandles; @@ -91,10 +89,9 @@ struct __wt_session_impl { WT_CURSOR_LIST cursors; /* Cursors closed with the session */ u_int ncursors; /* Count of active file cursors. */ - uint32_t cursor_sweep_countdown; /* Countdown to cursor sweep */ uint32_t cursor_sweep_position; /* Position in cursor_cache for sweep */ - uint64_t last_cursor_big_sweep; /* Last big sweep for dead cursors */ - uint64_t last_cursor_sweep; /* Last regular sweep for dead cursors */ + uint32_t cursor_sweep_countdown; /* Countdown to cursor sweep */ + uint64_t last_cursor_sweep; /* Last sweep for dead cursors */ WT_CURSOR_BACKUP *bkp_cursor; /* Hot backup cursor */ @@ -136,29 +133,6 @@ struct __wt_session_impl { } * scratch_track; #endif - /* Record the important timestamps of each stage in an reconciliation. */ - struct __wt_reconcile_timeline { - uint64_t reconcile_start; - uint64_t image_build_start; - uint64_t image_build_finish; - uint64_t hs_wrapup_start; - uint64_t hs_wrapup_finish; - uint64_t reconcile_finish; - uint64_t total_reentry_hs_eviction_time; - } reconcile_timeline; - - /* - * Record the important timestamps of each stage in an eviction. If an eviction takes a long - * time and times out, we can trace the time usage of each stage from this information. - */ - struct __wt_evict_timeline { - uint64_t evict_start; - uint64_t reentry_hs_evict_start; - uint64_t reentry_hs_evict_finish; - uint64_t evict_finish; - bool reentry_hs_eviction; - } evict_timeline; - WT_ITEM err; /* Error buffer */ WT_TXN_ISOLATION isolation; diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index d81c163221f..9d1cf91fe3e 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -187,16 +187,11 @@ __wt_stats_clear(void *stats_arg, int slot) WT_STAT_INCRV_ATOMIC_BASE(session, (stats)[(session)->stat_bucket], fld, value); \ } while (0) #define WT_STAT_INCR(session, stats, fld) WT_STAT_INCRV(session, stats, fld, 1) -#define WT_STAT_SET_BASE(session, stat, fld, value) \ - do { \ - if (WT_STAT_ENABLED(session)) \ - (stat)->fld = (int64_t)(value); \ - } while (0) #define WT_STAT_SET(session, stats, fld, value) \ do { \ if (WT_STAT_ENABLED(session)) { \ __wt_stats_clear(stats, WT_STATS_FIELD_TO_OFFSET(stats, fld)); \ - WT_STAT_SET_BASE(session, (stats)[0], fld, value); \ + (stats)[0]->fld = (int64_t)(value); \ } \ } while (0) @@ -265,8 +260,6 @@ __wt_stats_clear(void *stats_arg, int slot) */ #define WT_STAT_SESSION_INCRV(session, fld, value) \ WT_STAT_INCRV_BASE(session, &(session)->stats, fld, value) -#define WT_STAT_SESSION_SET(session, fld, value) \ - WT_STAT_SET_BASE(session, &(session)->stats, fld, value) /* * Construct histogram increment functions to put the passed value into the right bucket. Bucket @@ -349,8 +342,6 @@ struct __wt_connection_stats { int64_t lsm_work_units_done; int64_t lsm_work_units_created; int64_t lsm_work_queue_max; - int64_t autocommit_readonly_retry; - int64_t autocommit_update_retry; int64_t block_cache_blocks_update; int64_t block_cache_bytes_update; int64_t block_cache_blocks_evicted; @@ -409,22 +400,10 @@ struct __wt_connection_stats { int64_t cache_eviction_blocked_ooo_checkpoint_race_2; int64_t cache_eviction_blocked_ooo_checkpoint_race_3; int64_t cache_eviction_blocked_ooo_checkpoint_race_4; - int64_t cache_eviction_blocked_remove_hs_race_with_checkpoint; int64_t cache_eviction_walk_passes; int64_t cache_eviction_queue_empty; int64_t cache_eviction_queue_not_empty; int64_t cache_eviction_server_evicting; - int64_t cache_eviction_server_skip_dirty_pages_during_checkpoint; - int64_t cache_eviction_server_skip_metatdata_with_history; - int64_t cache_eviction_server_skip_pages_last_running; - int64_t cache_eviction_server_skip_pages_retry; - int64_t cache_eviction_server_skip_unwanted_pages; - int64_t cache_eviction_server_skip_unwanted_tree; - int64_t cache_eviction_server_skip_trees_too_many_active_walks; - int64_t cache_eviction_server_skip_checkpointing_trees; - int64_t cache_eviction_server_skip_trees_stick_in_cache; - int64_t cache_eviction_server_skip_trees_eviction_disabled; - int64_t cache_eviction_server_skip_trees_not_useful_before; int64_t cache_eviction_server_slept; int64_t cache_eviction_slow; int64_t cache_eviction_walk_leaf_notfound; @@ -443,7 +422,6 @@ struct __wt_connection_stats { int64_t cache_eviction_walks_stopped; int64_t cache_eviction_walks_gave_up_no_targets; int64_t cache_eviction_walks_gave_up_ratio; - int64_t cache_eviction_walk_random_returns_null_position; int64_t cache_eviction_walks_ended; int64_t cache_eviction_walk_restart; int64_t cache_eviction_walk_from_root; @@ -456,7 +434,6 @@ struct __wt_connection_stats { int64_t cache_eviction_walks_active; int64_t cache_eviction_walks_started; int64_t cache_eviction_force_retune; - int64_t cache_eviction_force_no_retry; int64_t cache_eviction_force_hs_fail; int64_t cache_eviction_force_hs; int64_t cache_eviction_force_hs_success; @@ -496,9 +473,7 @@ struct __wt_connection_stats { int64_t cache_eviction_internal_pages_already_queued; int64_t cache_eviction_split_internal; int64_t cache_eviction_split_leaf; - int64_t cache_eviction_random_sample_inmem_root; int64_t cache_bytes_max; - int64_t cache_eviction_maximum_milliseconds; int64_t cache_eviction_maximum_page_size; int64_t cache_eviction_dirty; int64_t cache_eviction_app_dirty; @@ -517,7 +492,6 @@ struct __wt_connection_stats { int64_t cache_read; int64_t cache_read_deleted; int64_t cache_read_deleted_prepared; - int64_t cache_eviction_clear_ordinary; int64_t cache_pages_requested; int64_t cache_eviction_pages_seen; int64_t cache_eviction_pages_already_queued; @@ -531,7 +505,6 @@ struct __wt_connection_stats { int64_t cache_overhead; int64_t cache_hs_insert_full_update; int64_t cache_hs_insert_reverse_modify; - int64_t cache_reentry_hs_eviction_milliseconds; int64_t cache_bytes_internal; int64_t cache_bytes_leaf; int64_t cache_bytes_dirty; @@ -571,13 +544,10 @@ struct __wt_connection_stats { int64_t fsync_io; int64_t read_io; int64_t write_io; - int64_t cursor_tree_walk_del_page_skip; int64_t cursor_next_skip_total; int64_t cursor_prev_skip_total; int64_t cursor_skip_hs_cur_position; - int64_t cursor_tree_walk_inmem_del_page_skip; int64_t cursor_search_near_prefix_fast_paths; - int64_t cursor_bulk_count; int64_t cursor_cached_count; int64_t cursor_insert_bulk; int64_t cursor_cache; @@ -724,9 +694,7 @@ struct __wt_connection_stats { int64_t rec_time_window_bytes_txn; int64_t rec_page_delete_fast; int64_t rec_overflow_key_leaf; - int64_t rec_maximum_milliseconds; - int64_t rec_maximum_image_build_milliseconds; - int64_t rec_maximum_hs_wrapup_milliseconds; + int64_t rec_maximum_seconds; int64_t rec_pages; int64_t rec_pages_eviction; int64_t rec_pages_with_prepare; @@ -791,7 +759,6 @@ struct __wt_connection_stats { int64_t thread_fsync_active; int64_t thread_read_active; int64_t thread_write_active; - int64_t application_evict_snapshot_refreshed; int64_t application_evict_time; int64_t application_cache_time; int64_t txn_release_blocked; @@ -810,13 +777,12 @@ struct __wt_connection_stats { int64_t txn_prepared_updates_committed; int64_t txn_prepared_updates_key_repeated; int64_t txn_prepared_updates_rolledback; - int64_t txn_read_race_prepare_commit; - int64_t txn_checkpoint_snapshot_acquired; - int64_t txn_rollback_oldest_pinned; int64_t txn_prepare; int64_t txn_prepare_commit; int64_t txn_prepare_active; int64_t txn_prepare_rollback; + int64_t txn_prepare_rollback_do_not_remove_hs_update; + int64_t txn_prepare_rollback_fix_hs_update_with_ckpt_reserved_txnid; int64_t txn_query_ts; int64_t txn_read_race_prepare_update; int64_t txn_rts; @@ -867,6 +833,7 @@ struct __wt_connection_stats { int64_t txn_checkpoint; int64_t txn_checkpoint_obsolete_applied; int64_t txn_checkpoint_skipped; + int64_t txn_fail_cache; int64_t txn_checkpoint_fsync_post; int64_t txn_checkpoint_fsync_post_duration; int64_t txn_pinned_range; @@ -900,8 +867,6 @@ struct __wt_dsrc_stats { int64_t lsm_checkpoint_throttle; int64_t lsm_merge_throttle; int64_t bloom_size; - int64_t autocommit_readonly_retry; - int64_t autocommit_update_retry; int64_t block_extension; int64_t block_alloc; int64_t block_free; @@ -917,7 +882,6 @@ struct __wt_dsrc_stats { int64_t btree_compact_pages_reviewed; int64_t btree_compact_pages_rewritten; int64_t btree_compact_pages_skipped; - int64_t btree_checkpoint_pages_reconciled; int64_t btree_compact_skipped; int64_t btree_column_fix; int64_t btree_column_tws; @@ -947,7 +911,6 @@ struct __wt_dsrc_stats { int64_t cache_eviction_blocked_ooo_checkpoint_race_2; int64_t cache_eviction_blocked_ooo_checkpoint_race_3; int64_t cache_eviction_blocked_ooo_checkpoint_race_4; - int64_t cache_eviction_blocked_remove_hs_race_with_checkpoint; int64_t cache_eviction_walk_passes; int64_t cache_eviction_target_page_lt10; int64_t cache_eviction_target_page_lt32; @@ -959,7 +922,6 @@ struct __wt_dsrc_stats { int64_t cache_eviction_walks_stopped; int64_t cache_eviction_walks_gave_up_no_targets; int64_t cache_eviction_walks_gave_up_ratio; - int64_t cache_eviction_walk_random_returns_null_position; int64_t cache_eviction_walks_ended; int64_t cache_eviction_walk_restart; int64_t cache_eviction_walk_from_root; @@ -983,7 +945,6 @@ struct __wt_dsrc_stats { int64_t cache_eviction_internal; int64_t cache_eviction_split_internal; int64_t cache_eviction_split_leaf; - int64_t cache_eviction_random_sample_inmem_root; int64_t cache_eviction_dirty; int64_t cache_read_overflow; int64_t cache_eviction_deepen; @@ -1037,11 +998,9 @@ struct __wt_dsrc_stats { int64_t compress_hist_ratio_8; int64_t compress_write_fail; int64_t compress_write_too_small; - int64_t cursor_tree_walk_del_page_skip; int64_t cursor_next_skip_total; int64_t cursor_prev_skip_total; int64_t cursor_skip_hs_cur_position; - int64_t cursor_tree_walk_inmem_del_page_skip; int64_t cursor_search_near_prefix_fast_paths; int64_t cursor_insert_bulk; int64_t cursor_reopen; @@ -1084,6 +1043,7 @@ struct __wt_dsrc_stats { int64_t rec_overflow_key_leaf; int64_t rec_multiblock_max; int64_t rec_overflow_value; + int64_t rec_page_match; int64_t rec_pages; int64_t rec_pages_eviction; int64_t rec_page_delete; @@ -1112,8 +1072,6 @@ struct __wt_dsrc_stats { int64_t tiered_work_units_dequeued; int64_t tiered_work_units_created; int64_t tiered_retention; - int64_t txn_read_race_prepare_commit; - int64_t txn_checkpoint_snapshot_acquired; int64_t txn_read_race_prepare_update; int64_t txn_rts_hs_stop_older_than_newer_start; int64_t txn_rts_inconsistent_ckpt; @@ -1149,7 +1107,6 @@ struct __wt_session_stats { int64_t bytes_read; int64_t bytes_write; int64_t lock_dhandle_wait; - int64_t txn_bytes_dirty; int64_t read_time; int64_t write_time; int64_t lock_schema_wait; diff --git a/src/third_party/wiredtiger/src/include/time_inline.h b/src/third_party/wiredtiger/src/include/time_inline.h index e1c39c6b8ab..611e38eab24 100644 --- a/src/third_party/wiredtiger/src/include/time_inline.h +++ b/src/third_party/wiredtiger/src/include/time_inline.h @@ -36,8 +36,6 @@ __wt_rdtsc(void) __asm__ volatile("mrs %0, cntvct_el0" : "=r"(t)); return (t); } -#elif defined(_M_AMD64) - return (__rdtsc()); #else return (0); #endif @@ -201,34 +199,10 @@ __wt_op_timer_fired(WT_SESSION_IMPL *session) { uint64_t diff, now; - if (!F_ISSET(session->txn, WT_TXN_RUNNING) || session->operation_start_us == 0 || - session->operation_timeout_us == 0) + if (session->operation_start_us == 0 || session->operation_timeout_us == 0) return (false); now = __wt_clock(session); diff = WT_CLOCKDIFF_US(now, session->operation_start_us); return (diff > session->operation_timeout_us); } - -/* - * __wt_timer_start -- - * Start the timer. - */ -static inline void -__wt_timer_start(WT_SESSION_IMPL *session, WT_TIMER *start_time) -{ - __wt_epoch(session, start_time); -} - -/* - * __wt_timer_evaluate_ms -- - * Evaluate the difference between the current time and start time and output the difference in - * milliseconds. - */ -static inline void -__wt_timer_evaluate_ms(WT_SESSION_IMPL *session, WT_TIMER *start_time, uint64_t *time_diff_ms) -{ - struct timespec cur_time; - __wt_epoch(session, &cur_time); - *time_diff_ms = WT_TIMEDIFF_MS(cur_time, *start_time); -} diff --git a/src/third_party/wiredtiger/src/include/timestamp_inline.h b/src/third_party/wiredtiger/src/include/timestamp_inline.h index 0af27ad2174..f90bd97e72a 100644 --- a/src/third_party/wiredtiger/src/include/timestamp_inline.h +++ b/src/third_party/wiredtiger/src/include/timestamp_inline.h @@ -41,11 +41,6 @@ (tw1)->stop_ts == (tw2)->stop_ts && (tw1)->stop_txn == (tw2)->stop_txn && \ (tw1)->prepare == (tw2)->prepare) -/* Return true if the stop time windows are the same. */ -#define WT_TIME_WINDOWS_STOP_EQUAL(tw1, tw2) \ - ((tw1)->durable_stop_ts == (tw2)->durable_stop_ts && (tw1)->stop_ts == (tw2)->stop_ts && \ - (tw1)->stop_txn == (tw2)->stop_txn && (tw1)->prepare == (tw2)->prepare) - /* * Set the start values of a time window from those in an update structure. Durable timestamp can be * 0 for prepared updates, in those cases use the prepared timestamp as durable timestamp. @@ -70,22 +65,6 @@ (tw)->stop_txn = (upd)->txnid; \ } while (0) -/* Copy the start values of a time window from another time window. */ -#define WT_TIME_WINDOW_COPY_START(dest, source) \ - do { \ - (dest)->durable_start_ts = (source)->durable_start_ts; \ - (dest)->start_ts = (source)->start_ts; \ - (dest)->start_txn = (source)->start_txn; \ - } while (0) - -/* Copy the stop values of a time window from another time window. */ -#define WT_TIME_WINDOW_COPY_STOP(dest, source) \ - do { \ - (dest)->durable_stop_ts = (source)->durable_stop_ts; \ - (dest)->stop_ts = (source)->stop_ts; \ - (dest)->stop_txn = (source)->stop_txn; \ - } while (0) - /* * Initialize the fields in an aggregated time window to their defaults. The aggregated durable * timestamp values represent the maximum durable timestamp over set of timestamps. These aggregated @@ -182,39 +161,3 @@ if ((source)->prepare != 0) \ (dest)->prepare = 1; \ } while (0) - -/* Abstract away checking whether all records in an aggregated time window have been deleted. */ -#define WT_TIME_AGGREGATE_ALL_DELETED(ta) ((ta)->newest_stop_ts != WT_TS_MAX) - -/* - * Update a time aggregate in preparation for an obsolete visibility check. This deserves a macro, - * since the mechanism for identifying whether an aggregated time window contains only obsolete (i.e - * deleted) data requires checking two different timestamps. Note the output time aggregate might be - * either empty initialized, or have been populated via prior calls to this macro with other - * aggregated windows. - */ -#define WT_TIME_AGGREGATE_MERGE_OBSOLETE_VISIBLE(session, out_ta, in_ta) \ - do { \ - WT_ASSERT(session, (out_ta)->init_merge == 1); \ - (out_ta)->newest_stop_durable_ts = \ - WT_MAX((out_ta)->newest_stop_durable_ts, (in_ta)->newest_stop_durable_ts); \ - /* \ - * The durable and non-durable stop timestamps are interestingly different in that the \ - * non-durable version encodes whether all records are deleted by setting WT_TS_MAX in \ - * there are non-deleted records (the common case), but durable doesn't and records the \ - * largest timestamp associated with any deleted record. Use this copy-macro to abstract \ - * that subtlety away. Since obsolete checks always want to know whether all content was \ - * removed, copy that semantic into the durable stop timestamp to make visibility \ - * checking sensible. \ - */ \ - if (!WT_TIME_AGGREGATE_ALL_DELETED((in_ta))) \ - (out_ta)->newest_stop_durable_ts = WT_TS_MAX; \ - \ - (out_ta)->newest_txn = WT_MAX((out_ta)->newest_txn, (in_ta)->newest_txn); \ - (out_ta)->newest_stop_ts = WT_MAX((out_ta)->newest_stop_ts, (in_ta)->newest_stop_ts); \ - (out_ta)->newest_stop_txn = WT_MAX((out_ta)->newest_stop_txn, (in_ta)->newest_stop_txn); \ - } while (0) - -/* Check if the stop time aggregate is set. */ -#define WT_TIME_AGGREGATE_HAS_STOP(ta) \ - ((ta)->newest_stop_txn != WT_TXN_MAX || (ta)->newest_stop_ts != WT_TS_MAX) diff --git a/src/third_party/wiredtiger/src/include/txn.h b/src/third_party/wiredtiger/src/include/txn.h index 29d5756a40f..7c60dfc23bb 100644 --- a/src/third_party/wiredtiger/src/include/txn.h +++ b/src/third_party/wiredtiger/src/include/txn.h @@ -242,22 +242,6 @@ struct __wt_txn_op { uint32_t flags; }; -/* - * WT_TXN_SNAPSHOT -- - * A structure to store the transactions snapshot details. - */ -struct __wt_txn_snapshot { - /* - * Snapshot data: - * txn_ids >= snap_max are invisible, - * txn_ids < snap_min are visible, - * everything else is visible unless it is in the snapshot. - */ - uint64_t snap_max, snap_min; - uint64_t *snapshot; - uint32_t snapshot_count; -}; - #define WT_TS_VERBOSE_PREFIX "unexpected timestamp usage: " /* @@ -271,14 +255,17 @@ struct __wt_txn { uint32_t forced_iso; /* Isolation is currently forced. */ + /* + * Snapshot data: + * ids >= snap_max are invisible, + * ids < snap_min are visible, + * everything else is visible unless it is in the snapshot. + */ + uint64_t snap_min, snap_max; + uint64_t *snapshot; + uint32_t snapshot_count; uint32_t txn_logsync; /* Log sync configuration */ - /* Snapshot data. */ - WT_TXN_SNAPSHOT snapshot_data; - - /* Backup snapshot data. */ - WT_TXN_SNAPSHOT *backup_snapshot_data; - /* * Timestamp copied into updates created by this transaction. * @@ -349,14 +336,13 @@ struct __wt_txn { #define WT_TXN_PREPARE 0x00100u #define WT_TXN_PREPARE_IGNORE_API_CHECK 0x00200u #define WT_TXN_READONLY 0x00400u -#define WT_TXN_REFRESH_SNAPSHOT 0x00800u -#define WT_TXN_RUNNING 0x01000u -#define WT_TXN_SHARED_TS_DURABLE 0x02000u -#define WT_TXN_SHARED_TS_READ 0x04000u -#define WT_TXN_SYNC_SET 0x08000u -#define WT_TXN_TS_ROUND_PREPARED 0x10000u -#define WT_TXN_TS_ROUND_READ 0x20000u -#define WT_TXN_UPDATE 0x40000u +#define WT_TXN_RUNNING 0x00800u +#define WT_TXN_SHARED_TS_DURABLE 0x01000u +#define WT_TXN_SHARED_TS_READ 0x02000u +#define WT_TXN_SYNC_SET 0x04000u +#define WT_TXN_TS_ROUND_PREPARED 0x08000u +#define WT_TXN_TS_ROUND_READ 0x10000u +#define WT_TXN_UPDATE 0x20000u /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */ uint32_t flags; diff --git a/src/third_party/wiredtiger/src/include/txn_inline.h b/src/third_party/wiredtiger/src/include/txn_inline.h index 266986dc50d..4c2ae063e14 100644 --- a/src/third_party/wiredtiger/src/include/txn_inline.h +++ b/src/third_party/wiredtiger/src/include/txn_inline.h @@ -183,20 +183,6 @@ __txn_next_op(WT_SESSION_IMPL *session, WT_TXN_OP **opp) } /* - * __txn_swap_snapshot -- - * Swap the snapshot pointers. - */ -static inline void -__txn_swap_snapshot(uint64_t **snap_a, uint64_t **snap_b) -{ - uint64_t *temp; - - temp = *snap_a; - *snap_a = *snap_b; - *snap_b = temp; -} - -/* * __wt_txn_unmodify -- * If threads race making updates, they may discard the last referenced WT_UPDATE item while the * transaction is still active. This function removes the last update item from the "log". @@ -714,16 +700,16 @@ __txn_visible_id(WT_SESSION_IMPL *session, uint64_t id) /* Otherwise, we should be called with a snapshot or we are in a checkpoint cursor. */ WT_ASSERT(session, F_ISSET(txn, WT_TXN_HAS_SNAPSHOT) || session->dhandle->checkpoint != NULL); - return (__wt_txn_visible_id_snapshot(id, txn->snapshot_data.snap_min, - txn->snapshot_data.snap_max, txn->snapshot_data.snapshot, txn->snapshot_data.snapshot_count)); + return (__wt_txn_visible_id_snapshot( + id, txn->snap_min, txn->snap_max, txn->snapshot, txn->snapshot_count)); } /* - * __wt_txn_timestamp_visible -- - * Can the current transaction see the given timestamp? + * __wt_txn_visible -- + * Can the current transaction see the given ID / timestamp? */ static inline bool -__wt_txn_timestamp_visible(WT_SESSION_IMPL *session, wt_timestamp_t timestamp) +__wt_txn_visible(WT_SESSION_IMPL *session, uint64_t id, wt_timestamp_t timestamp) { WT_TXN *txn; WT_TXN_SHARED *txn_shared; @@ -731,30 +717,7 @@ __wt_txn_timestamp_visible(WT_SESSION_IMPL *session, wt_timestamp_t timestamp) txn = session->txn; txn_shared = WT_SESSION_TXN_SHARED(session); - /* Timestamp check. */ - if (!F_ISSET(txn, WT_TXN_SHARED_TS_READ) || timestamp == WT_TS_NONE) - return (true); - - return (timestamp <= txn_shared->read_timestamp); -} - -/* - * __wt_txn_snap_min_visible -- - * Can the current transaction snapshot minimum/read timestamp see the given ID/timestamp? This - * visibility check should only be used when assessing broader visibility based on aggregated - * time window. It does not reflect whether a specific update is visible to a transaction. - */ -static inline bool -__wt_txn_snap_min_visible( - WT_SESSION_IMPL *session, uint64_t id, wt_timestamp_t timestamp, wt_timestamp_t durable_timestamp) -{ - /* Not needed since 6.0 doesn't support checkpoint cursors. */ - WT_UNUSED(durable_timestamp); - - WT_ASSERT(session, F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT)); - - /* Transaction snapshot minimum check. */ - if (!WT_TXNID_LT(id, session->txn->snapshot_data.snap_min)) + if (!__txn_visible_id(session, id)) return (false); /* Transactions read their writes, regardless of timestamps. */ @@ -762,25 +725,10 @@ __wt_txn_snap_min_visible( return (true); /* Timestamp check. */ - return (__wt_txn_timestamp_visible(session, timestamp)); -} - -/* - * __wt_txn_visible -- - * Can the current transaction see the given ID/timestamp? - */ -static inline bool -__wt_txn_visible(WT_SESSION_IMPL *session, uint64_t id, wt_timestamp_t timestamp) -{ - if (!__txn_visible_id(session, id)) - return (false); - - /* Transactions read their writes, regardless of timestamps. */ - if (F_ISSET(session->txn, WT_TXN_HAS_ID) && id == session->txn->id) + if (!F_ISSET(txn, WT_TXN_SHARED_TS_READ) || timestamp == WT_TS_NONE) return (true); - /* Timestamp check. */ - return (__wt_txn_timestamp_visible(session, timestamp)); + return (timestamp <= txn_shared->read_timestamp); } /* @@ -902,11 +850,8 @@ __wt_txn_read_upd_list_internal(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, WT_UPDATE **prepare_updp, WT_UPDATE **restored_updp) { WT_VISIBLE_TYPE upd_visible; - uint64_t prepare_txnid; uint8_t prepare_state, type; - prepare_txnid = WT_TXN_NONE; - if (prepare_updp != NULL) *prepare_updp = NULL; if (restored_updp != NULL) @@ -920,35 +865,6 @@ __wt_txn_read_upd_list_internal(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, continue; WT_ORDERED_READ(prepare_state, upd->prepare_state); - - /* - * We previously found a prepared update, check if the update has the same transaction id, - * if it does it must not be visible as it is part of the same transaction as the previous - * prepared update. - */ - if (prepare_txnid != WT_TXN_NONE && upd->txnid == prepare_txnid) { - /* - * If we see an update with prepare resolved this indicates that the read, which is - * configured to ignore prepared updates raced with the commit of the same prepared - * transaction. Increment a stat to track this. - * - * This case exists as reconciliation chooses which update to write to disk in a newest - * to oldest fashion, and if prepared update resolution happens in the same direction - * some artifacts of a prepared transaction could be written to disk while some remain - * only in-memory. Instead prepared update resolution is recursively done from oldest to - * newest. Which mean that our reader would see a prepared update followed by a - * committed update. - * - * There is an alternate solution which would have reconciliation forget the chosen - * update if it sees a prepared update after it. That would allow the update chain - * resolution to occur from newest to oldest and this reader edge case would no longer - * exist. That solution needs further exploration. - */ - if (prepare_state == WT_PREPARE_RESOLVED) - WT_STAT_CONN_DATA_INCR(session, txn_read_race_prepare_commit); - continue; - } - /* * If the cursor is configured to ignore tombstones, copy the timestamps from the tombstones * to the stop time window of the update value being returned to the caller. Caller can @@ -992,10 +908,8 @@ __wt_txn_read_upd_list_internal(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, if (upd_visible == WT_VISIBLE_PREPARE) { /* Ignore the prepared update, if transaction configuration says so. */ - if (F_ISSET(session->txn, WT_TXN_IGNORE_PREPARE)) { - prepare_txnid = upd->txnid; + if (F_ISSET(session->txn, WT_TXN_IGNORE_PREPARE)) continue; - } return (WT_PREPARE_CONFLICT); } @@ -1456,16 +1370,13 @@ __wt_txn_modify_block( WT_ERR(__wt_scr_alloc(session, 1024, &buf)); WT_ERR(__wt_buf_fmt(session, buf, "snapshot_min=%" PRIu64 ", snapshot_max=%" PRIu64 ", snapshot_count=%" PRIu32, - txn->snapshot_data.snap_min, txn->snapshot_data.snap_max, - txn->snapshot_data.snapshot_count)); - if (txn->snapshot_data.snapshot_count > 0) { + txn->snap_min, txn->snap_max, txn->snapshot_count)); + if (txn->snapshot_count > 0) { WT_ERR(__wt_buf_catfmt(session, buf, ", snapshots=[")); - for (snap_count = 0; snap_count < txn->snapshot_data.snapshot_count - 1; - ++snap_count) - WT_ERR(__wt_buf_catfmt( - session, buf, "%" PRIu64 ",", txn->snapshot_data.snapshot[snap_count])); - WT_ERR(__wt_buf_catfmt( - session, buf, "%" PRIu64 "]", txn->snapshot_data.snapshot[snap_count])); + for (snap_count = 0; snap_count < txn->snapshot_count - 1; ++snap_count) + WT_ERR( + __wt_buf_catfmt(session, buf, "%" PRIu64 ",", txn->snapshot[snap_count])); + WT_ERR(__wt_buf_catfmt(session, buf, "%" PRIu64 "]", txn->snapshot[snap_count])); } __wt_verbose_debug(session, WT_VERB_TRANSACTION, "%s", (const char *)buf->data); } diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index 673601c26bb..5f61b805c77 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -974,9 +974,6 @@ struct __wt_session { * object into \c next_random_sample_size equal-sized pieces\, and each retrieval returns a * record from one of those pieces. See @ref cursor_random for details., a string; default * \c 0.} - * @config{next_random_seed, configure the cursor to set an initial random seed when using - * \c next_random configuration. This is used for testing purposes only. See @ref - * cursor_random for details., a string; default \c 0.} * @config{overwrite, configures whether the cursor's insert and update methods check the * existing state of the record. If \c overwrite is \c false\, WT_CURSOR::insert fails with * ::WT_DUPLICATE_KEY if the record exists\, WT_CURSOR::update fails with ::WT_NOTFOUND if @@ -1652,9 +1649,6 @@ struct __wt_session { * @config{dump_pages, Display the contents of in-memory pages as they are verified\, using * the application's message handler\, intended for debugging., a boolean flag; default \c * false.} - * @config{read_corrupt, A mode that allows verify to continue reading after encountering a - * checksum error. It will skip past the corrupt block and continue with the verification - * process., a boolean flag; default \c false.} * @config{stable_timestamp, Ensure that no data has a start timestamp after the stable * timestamp\, to be run after rollback_to_stable., a boolean flag; default \c false.} * @config{strict, Treat any verification problem as an error; by default\, verify will @@ -2205,16 +2199,14 @@ struct __wt_connection { * @config{error_prefix, prefix string for error messages., a string; default empty.} * @config{eviction = (, eviction configuration options., a set of related configuration * options defined below.} - * @config{ evict_sample_inmem, If no - * in-memory ref is found on the root page\, attempt to locate a random in-memory page by - * examining all entries on the root page., a boolean flag; default \c true.} - * @config{ threads_max, maximum number of threads WiredTiger will - * start to help evict pages from cache. The number of threads started will vary depending - * on the current eviction load. Each eviction worker thread uses a session from the - * configured session_max., an integer between 1 and 20; default \c 8.} - * @config{ threads_min, minimum number of threads WiredTiger will - * start to help evict pages from cache. The number of threads currently running will vary - * depending on the current eviction load., an integer between 1 and 20; default \c 1.} + * @config{ threads_max, maximum number of + * threads WiredTiger will start to help evict pages from cache. The number of threads + * started will vary depending on the current eviction load. Each eviction worker thread + * uses a session from the configured session_max., an integer between 1 and 20; default \c + * 8.} + * @config{ threads_min, minimum number of threads WiredTiger + * will start to help evict pages from cache. The number of threads currently running will + * vary depending on the current eviction load., an integer between 1 and 20; default \c 1.} * @config{ ),,} * @config{eviction_checkpoint_target, perform eviction at the beginning of checkpoints to * bring the dirty content in cache to this level. It is a percentage of the cache size if @@ -2315,11 +2307,10 @@ struct __wt_connection { * @config{ ),,} * @config{operation_timeout_ms, if non-zero\, a requested limit on the number of elapsed * real time milliseconds application threads will take to complete database operations. - * This setting only applies inside of a transaction. Time is measured from the start of - * each WiredTiger API call. There is no guarantee any operation will not take longer than - * this amount of time. If WiredTiger notices the limit has been exceeded\, an operation - * may return a WT_ROLLBACK error. The default of 0 is to have no limit., an integer - * greater than or equal to 0; default \c 0.} + * Time is measured from the start of each WiredTiger API call. There is no guarantee any + * operation will not take longer than this amount of time. If WiredTiger notices the limit + * has been exceeded\, an operation may return a WT_ROLLBACK error. The default of 0 is to + * have no limit., an integer greater than or equal to 0; default \c 0.} * @config{operation_tracking = (, enable tracking of performance-critical functions. See * @ref operation_tracking for more information., a set of related configuration options * defined below.} @@ -2385,6 +2376,9 @@ struct __wt_connection { * @config{ local_retention, time in seconds to retain data * on tiered storage on the local tier for faster read access., an integer between 0 and * 10000; default \c 300.} + * @config{ object_target_size, the + * approximate size of objects before creating them on the tiered storage tier., an integer + * between 100K and 10TB; default \c 10M.} * @config{ ),,} * @config{verbose, enable messages for various subsystems and operations. Options are * given as a list\, where each message type can optionally define an associated verbosity @@ -2954,16 +2948,14 @@ struct __wt_connection { * @config{error_prefix, prefix string for error messages., a string; default empty.} * @config{eviction = (, eviction configuration options., a set of related configuration options * defined below.} - * @config{ evict_sample_inmem, If no in-memory ref is found - * on the root page\, attempt to locate a random in-memory page by examining all entries on the root - * page., a boolean flag; default \c true.} - * @config{ threads_max, maximum - * number of threads WiredTiger will start to help evict pages from cache. The number of threads - * started will vary depending on the current eviction load. Each eviction worker thread uses a - * session from the configured session_max., an integer between 1 and 20; default \c 8.} - * @config{ threads_min, minimum number of threads WiredTiger will start to - * help evict pages from cache. The number of threads currently running will vary depending on the - * current eviction load., an integer between 1 and 20; default \c 1.} + * @config{ threads_max, maximum number of threads WiredTiger + * will start to help evict pages from cache. The number of threads started will vary depending on + * the current eviction load. Each eviction worker thread uses a session from the configured + * session_max., an integer between 1 and 20; default \c 8.} + * @config{ + * threads_min, minimum number of threads WiredTiger will start to help evict pages from cache. The + * number of threads currently running will vary depending on the current eviction load., an integer + * between 1 and 20; default \c 1.} * @config{ ),,} * @config{eviction_checkpoint_target, perform eviction at the beginning of checkpoints to bring the * dirty content in cache to this level. It is a percentage of the cache size if the value is @@ -3103,11 +3095,11 @@ struct __wt_connection { * for primary processes and use RPC for secondary processes). <b>Not yet supported in * WiredTiger</b>., a boolean flag; default \c false.} * @config{operation_timeout_ms, if non-zero\, a requested limit on the number of elapsed real time - * milliseconds application threads will take to complete database operations. This setting only - * applies inside of a transaction. Time is measured from the start of each WiredTiger API call. - * There is no guarantee any operation will not take longer than this amount of time. If WiredTiger - * notices the limit has been exceeded\, an operation may return a WT_ROLLBACK error. The default - * of 0 is to have no limit., an integer greater than or equal to 0; default \c 0.} + * milliseconds application threads will take to complete database operations. Time is measured + * from the start of each WiredTiger API call. There is no guarantee any operation will not take + * longer than this amount of time. If WiredTiger notices the limit has been exceeded\, an + * operation may return a WT_ROLLBACK error. The default of 0 is to have no limit., an integer + * greater than or equal to 0; default \c 0.} * @config{operation_tracking = (, enable tracking of performance-critical functions. See @ref * operation_tracking for more information., a set of related configuration options defined below.} * @config{ enabled, enable operation tracking subsystem., a boolean flag; @@ -5199,1316 +5191,1228 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1008 /*! LSM: tree queue hit maximum */ #define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1009 -/*! autocommit: retries for readonly operations */ -#define WT_STAT_CONN_AUTOCOMMIT_READONLY_RETRY 1010 -/*! autocommit: retries for update operations */ -#define WT_STAT_CONN_AUTOCOMMIT_UPDATE_RETRY 1011 /*! block-cache: cached blocks updated */ -#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_UPDATE 1012 +#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_UPDATE 1010 /*! block-cache: cached bytes updated */ -#define WT_STAT_CONN_BLOCK_CACHE_BYTES_UPDATE 1013 +#define WT_STAT_CONN_BLOCK_CACHE_BYTES_UPDATE 1011 /*! block-cache: evicted blocks */ -#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_EVICTED 1014 +#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_EVICTED 1012 /*! block-cache: file size causing bypass */ -#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_FILESIZE 1015 +#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_FILESIZE 1013 /*! block-cache: lookups */ -#define WT_STAT_CONN_BLOCK_CACHE_LOOKUPS 1016 +#define WT_STAT_CONN_BLOCK_CACHE_LOOKUPS 1014 /*! block-cache: number of blocks not evicted due to overhead */ -#define WT_STAT_CONN_BLOCK_CACHE_NOT_EVICTED_OVERHEAD 1017 +#define WT_STAT_CONN_BLOCK_CACHE_NOT_EVICTED_OVERHEAD 1015 /*! * block-cache: number of bypasses because no-write-allocate setting was * on */ -#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_WRITEALLOC 1018 +#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_WRITEALLOC 1016 /*! block-cache: number of bypasses due to overhead on put */ -#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_OVERHEAD_PUT 1019 +#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_OVERHEAD_PUT 1017 /*! block-cache: number of bypasses on get */ -#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_GET 1020 +#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_GET 1018 /*! block-cache: number of bypasses on put because file is too small */ -#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_PUT 1021 +#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_PUT 1019 /*! block-cache: number of eviction passes */ -#define WT_STAT_CONN_BLOCK_CACHE_EVICTION_PASSES 1022 +#define WT_STAT_CONN_BLOCK_CACHE_EVICTION_PASSES 1020 /*! block-cache: number of hits */ -#define WT_STAT_CONN_BLOCK_CACHE_HITS 1023 +#define WT_STAT_CONN_BLOCK_CACHE_HITS 1021 /*! block-cache: number of misses */ -#define WT_STAT_CONN_BLOCK_CACHE_MISSES 1024 +#define WT_STAT_CONN_BLOCK_CACHE_MISSES 1022 /*! block-cache: number of put bypasses on checkpoint I/O */ -#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_CHKPT 1025 +#define WT_STAT_CONN_BLOCK_CACHE_BYPASS_CHKPT 1023 /*! block-cache: removed blocks */ -#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_REMOVED 1026 +#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_REMOVED 1024 /*! block-cache: total blocks */ -#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS 1027 +#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS 1025 /*! block-cache: total blocks inserted on read path */ -#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_INSERT_READ 1028 +#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_INSERT_READ 1026 /*! block-cache: total blocks inserted on write path */ -#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_INSERT_WRITE 1029 +#define WT_STAT_CONN_BLOCK_CACHE_BLOCKS_INSERT_WRITE 1027 /*! block-cache: total bytes */ -#define WT_STAT_CONN_BLOCK_CACHE_BYTES 1030 +#define WT_STAT_CONN_BLOCK_CACHE_BYTES 1028 /*! block-cache: total bytes inserted on read path */ -#define WT_STAT_CONN_BLOCK_CACHE_BYTES_INSERT_READ 1031 +#define WT_STAT_CONN_BLOCK_CACHE_BYTES_INSERT_READ 1029 /*! block-cache: total bytes inserted on write path */ -#define WT_STAT_CONN_BLOCK_CACHE_BYTES_INSERT_WRITE 1032 +#define WT_STAT_CONN_BLOCK_CACHE_BYTES_INSERT_WRITE 1030 /*! block-manager: blocks pre-loaded */ -#define WT_STAT_CONN_BLOCK_PRELOAD 1033 +#define WT_STAT_CONN_BLOCK_PRELOAD 1031 /*! block-manager: blocks read */ -#define WT_STAT_CONN_BLOCK_READ 1034 +#define WT_STAT_CONN_BLOCK_READ 1032 /*! block-manager: blocks written */ -#define WT_STAT_CONN_BLOCK_WRITE 1035 +#define WT_STAT_CONN_BLOCK_WRITE 1033 /*! block-manager: bytes read */ -#define WT_STAT_CONN_BLOCK_BYTE_READ 1036 +#define WT_STAT_CONN_BLOCK_BYTE_READ 1034 /*! block-manager: bytes read via memory map API */ -#define WT_STAT_CONN_BLOCK_BYTE_READ_MMAP 1037 +#define WT_STAT_CONN_BLOCK_BYTE_READ_MMAP 1035 /*! block-manager: bytes read via system call API */ -#define WT_STAT_CONN_BLOCK_BYTE_READ_SYSCALL 1038 +#define WT_STAT_CONN_BLOCK_BYTE_READ_SYSCALL 1036 /*! block-manager: bytes written */ -#define WT_STAT_CONN_BLOCK_BYTE_WRITE 1039 +#define WT_STAT_CONN_BLOCK_BYTE_WRITE 1037 /*! block-manager: bytes written for checkpoint */ -#define WT_STAT_CONN_BLOCK_BYTE_WRITE_CHECKPOINT 1040 +#define WT_STAT_CONN_BLOCK_BYTE_WRITE_CHECKPOINT 1038 /*! block-manager: bytes written via memory map API */ -#define WT_STAT_CONN_BLOCK_BYTE_WRITE_MMAP 1041 +#define WT_STAT_CONN_BLOCK_BYTE_WRITE_MMAP 1039 /*! block-manager: bytes written via system call API */ -#define WT_STAT_CONN_BLOCK_BYTE_WRITE_SYSCALL 1042 +#define WT_STAT_CONN_BLOCK_BYTE_WRITE_SYSCALL 1040 /*! block-manager: mapped blocks read */ -#define WT_STAT_CONN_BLOCK_MAP_READ 1043 +#define WT_STAT_CONN_BLOCK_MAP_READ 1041 /*! block-manager: mapped bytes read */ -#define WT_STAT_CONN_BLOCK_BYTE_MAP_READ 1044 +#define WT_STAT_CONN_BLOCK_BYTE_MAP_READ 1042 /*! * block-manager: number of times the file was remapped because it * changed size via fallocate or truncate */ -#define WT_STAT_CONN_BLOCK_REMAP_FILE_RESIZE 1045 +#define WT_STAT_CONN_BLOCK_REMAP_FILE_RESIZE 1043 /*! block-manager: number of times the region was remapped via write */ -#define WT_STAT_CONN_BLOCK_REMAP_FILE_WRITE 1046 +#define WT_STAT_CONN_BLOCK_REMAP_FILE_WRITE 1044 /*! cache: application threads page read from disk to cache count */ -#define WT_STAT_CONN_CACHE_READ_APP_COUNT 1047 +#define WT_STAT_CONN_CACHE_READ_APP_COUNT 1045 /*! cache: application threads page read from disk to cache time (usecs) */ -#define WT_STAT_CONN_CACHE_READ_APP_TIME 1048 +#define WT_STAT_CONN_CACHE_READ_APP_TIME 1046 /*! cache: application threads page write from cache to disk count */ -#define WT_STAT_CONN_CACHE_WRITE_APP_COUNT 1049 +#define WT_STAT_CONN_CACHE_WRITE_APP_COUNT 1047 /*! cache: application threads page write from cache to disk time (usecs) */ -#define WT_STAT_CONN_CACHE_WRITE_APP_TIME 1050 +#define WT_STAT_CONN_CACHE_WRITE_APP_TIME 1048 /*! cache: bytes allocated for updates */ -#define WT_STAT_CONN_CACHE_BYTES_UPDATES 1051 +#define WT_STAT_CONN_CACHE_BYTES_UPDATES 1049 /*! cache: bytes belonging to page images in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_IMAGE 1052 +#define WT_STAT_CONN_CACHE_BYTES_IMAGE 1050 /*! cache: bytes belonging to the history store table in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_HS 1053 +#define WT_STAT_CONN_CACHE_BYTES_HS 1051 /*! cache: bytes currently in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_INUSE 1054 +#define WT_STAT_CONN_CACHE_BYTES_INUSE 1052 /*! cache: bytes dirty in the cache cumulative */ -#define WT_STAT_CONN_CACHE_BYTES_DIRTY_TOTAL 1055 +#define WT_STAT_CONN_CACHE_BYTES_DIRTY_TOTAL 1053 /*! cache: bytes not belonging to page images in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_OTHER 1056 +#define WT_STAT_CONN_CACHE_BYTES_OTHER 1054 /*! cache: bytes read into cache */ -#define WT_STAT_CONN_CACHE_BYTES_READ 1057 +#define WT_STAT_CONN_CACHE_BYTES_READ 1055 /*! cache: bytes written from cache */ -#define WT_STAT_CONN_CACHE_BYTES_WRITE 1058 +#define WT_STAT_CONN_CACHE_BYTES_WRITE 1056 /*! cache: checkpoint blocked page eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_CHECKPOINT 1059 +#define WT_STAT_CONN_CACHE_EVICTION_CHECKPOINT 1057 /*! * cache: checkpoint of history store file blocked non-history store page * eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_CHECKPOINT_HS 1060 +#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_CHECKPOINT_HS 1058 /*! cache: eviction calls to get a page */ -#define WT_STAT_CONN_CACHE_EVICTION_GET_REF 1061 +#define WT_STAT_CONN_CACHE_EVICTION_GET_REF 1059 /*! cache: eviction calls to get a page found queue empty */ -#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY 1062 +#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY 1060 /*! cache: eviction calls to get a page found queue empty after locking */ -#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2 1063 +#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2 1061 /*! cache: eviction currently operating in aggressive mode */ -#define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET 1064 +#define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET 1062 /*! cache: eviction empty score */ -#define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE 1065 +#define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE 1063 /*! * cache: eviction gave up due to detecting an out of order on disk value * behind the last update on the chain */ -#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_1 1066 +#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_1 1064 /*! * cache: eviction gave up due to detecting an out of order tombstone * ahead of the selected on disk update */ -#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_2 1067 +#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_2 1065 /*! * cache: eviction gave up due to detecting an out of order tombstone * ahead of the selected on disk update after validating the update chain */ -#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_3 1068 +#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_3 1066 /*! * cache: eviction gave up due to detecting out of order timestamps on * the update chain after the selected on disk update */ -#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_4 1069 -/*! - * cache: eviction gave up due to needing to remove a record from the - * history store but checkpoint is running - */ -#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_REMOVE_HS_RACE_WITH_CHECKPOINT 1070 +#define WT_STAT_CONN_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_4 1067 /*! cache: eviction passes of a file */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK_PASSES 1071 +#define WT_STAT_CONN_CACHE_EVICTION_WALK_PASSES 1068 /*! cache: eviction server candidate queue empty when topping up */ -#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1072 +#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1069 /*! cache: eviction server candidate queue not empty when topping up */ -#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1073 +#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1070 /*! cache: eviction server evicting pages */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1074 -/*! cache: eviction server skips dirty pages during a running checkpoint */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_DIRTY_PAGES_DURING_CHECKPOINT 1075 -/*! cache: eviction server skips metadata pages with history */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_METATDATA_WITH_HISTORY 1076 -/*! - * cache: eviction server skips pages that are written with transactions - * greater than the last running - */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_PAGES_LAST_RUNNING 1077 -/*! - * cache: eviction server skips pages that previously failed eviction and - * likely will again - */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_PAGES_RETRY 1078 -/*! cache: eviction server skips pages that we do not want to evict */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_UNWANTED_PAGES 1079 -/*! cache: eviction server skips tree that we do not want to evict */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_UNWANTED_TREE 1080 -/*! - * cache: eviction server skips trees because there are too many active - * walks - */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_TREES_TOO_MANY_ACTIVE_WALKS 1081 -/*! cache: eviction server skips trees that are being checkpointed */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_CHECKPOINTING_TREES 1082 -/*! - * cache: eviction server skips trees that are configured to stick in - * cache - */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_TREES_STICK_IN_CACHE 1083 -/*! cache: eviction server skips trees that disable eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_TREES_EVICTION_DISABLED 1084 -/*! cache: eviction server skips trees that were not useful before */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SKIP_TREES_NOT_USEFUL_BEFORE 1085 +#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1071 /*! * cache: eviction server slept, because we did not make progress with * eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1086 +#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1072 /*! cache: eviction server unable to reach eviction goal */ -#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1087 +#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1073 /*! cache: eviction server waiting for a leaf page */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK_LEAF_NOTFOUND 1088 +#define WT_STAT_CONN_CACHE_EVICTION_WALK_LEAF_NOTFOUND 1074 /*! cache: eviction state */ -#define WT_STAT_CONN_CACHE_EVICTION_STATE 1089 +#define WT_STAT_CONN_CACHE_EVICTION_STATE 1075 /*! * cache: eviction walk most recent sleeps for checkpoint handle * gathering */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK_SLEEPS 1090 +#define WT_STAT_CONN_CACHE_EVICTION_WALK_SLEEPS 1076 /*! cache: eviction walk target pages histogram - 0-9 */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT10 1091 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT10 1077 /*! cache: eviction walk target pages histogram - 10-31 */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT32 1092 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT32 1078 /*! cache: eviction walk target pages histogram - 128 and higher */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_GE128 1093 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_GE128 1079 /*! cache: eviction walk target pages histogram - 32-63 */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT64 1094 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT64 1080 /*! cache: eviction walk target pages histogram - 64-128 */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT128 1095 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT128 1081 /*! * cache: eviction walk target pages reduced due to history store cache * pressure */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_REDUCED 1096 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_REDUCED 1082 /*! cache: eviction walk target strategy both clean and dirty pages */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_BOTH_CLEAN_AND_DIRTY 1097 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_BOTH_CLEAN_AND_DIRTY 1083 /*! cache: eviction walk target strategy only clean pages */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_CLEAN 1098 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_CLEAN 1084 /*! cache: eviction walk target strategy only dirty pages */ -#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_DIRTY 1099 +#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_DIRTY 1085 /*! cache: eviction walks abandoned */ -#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1100 +#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1086 /*! cache: eviction walks gave up because they restarted their walk twice */ -#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STOPPED 1101 +#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STOPPED 1087 /*! * cache: eviction walks gave up because they saw too many pages and * found no candidates */ -#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 1102 +#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 1088 /*! * cache: eviction walks gave up because they saw too many pages and * found too few candidates */ -#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 1103 -/*! - * cache: eviction walks random search fails to locate a page, results in - * a null position - */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK_RANDOM_RETURNS_NULL_POSITION 1104 +#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 1089 /*! cache: eviction walks reached end of tree */ -#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ENDED 1105 +#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ENDED 1090 /*! cache: eviction walks restarted */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK_RESTART 1106 +#define WT_STAT_CONN_CACHE_EVICTION_WALK_RESTART 1091 /*! cache: eviction walks started from root of tree */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK_FROM_ROOT 1107 +#define WT_STAT_CONN_CACHE_EVICTION_WALK_FROM_ROOT 1092 /*! cache: eviction walks started from saved location in tree */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK_SAVED_POS 1108 +#define WT_STAT_CONN_CACHE_EVICTION_WALK_SAVED_POS 1093 /*! cache: eviction worker thread active */ -#define WT_STAT_CONN_CACHE_EVICTION_ACTIVE_WORKERS 1109 +#define WT_STAT_CONN_CACHE_EVICTION_ACTIVE_WORKERS 1094 /*! cache: eviction worker thread created */ -#define WT_STAT_CONN_CACHE_EVICTION_WORKER_CREATED 1110 +#define WT_STAT_CONN_CACHE_EVICTION_WORKER_CREATED 1095 /*! cache: eviction worker thread evicting pages */ -#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1111 +#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1096 /*! cache: eviction worker thread removed */ -#define WT_STAT_CONN_CACHE_EVICTION_WORKER_REMOVED 1112 +#define WT_STAT_CONN_CACHE_EVICTION_WORKER_REMOVED 1097 /*! cache: eviction worker thread stable number */ -#define WT_STAT_CONN_CACHE_EVICTION_STABLE_STATE_WORKERS 1113 +#define WT_STAT_CONN_CACHE_EVICTION_STABLE_STATE_WORKERS 1098 /*! cache: files with active eviction walks */ -#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1114 +#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1099 /*! cache: files with new eviction walks started */ -#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1115 +#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1100 /*! cache: force re-tuning of eviction workers once in a while */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_RETUNE 1116 -/*! - * cache: forced eviction - do not retry count to evict pages selected to - * evict during reconciliation - */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_NO_RETRY 1117 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_RETUNE 1101 /*! * cache: forced eviction - history store pages failed to evict while * session has history store cursor open */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS_FAIL 1118 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS_FAIL 1102 /*! * cache: forced eviction - history store pages selected while session * has history store cursor open */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS 1119 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS 1103 /*! * cache: forced eviction - history store pages successfully evicted * while session has history store cursor open */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS_SUCCESS 1120 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS_SUCCESS 1104 /*! cache: forced eviction - pages evicted that were clean count */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN 1121 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN 1105 /*! cache: forced eviction - pages evicted that were clean time (usecs) */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN_TIME 1122 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN_TIME 1106 /*! cache: forced eviction - pages evicted that were dirty count */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY 1123 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY 1107 /*! cache: forced eviction - pages evicted that were dirty time (usecs) */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY_TIME 1124 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY_TIME 1108 /*! * cache: forced eviction - pages selected because of a large number of * updates to a single item */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_LONG_UPDATE_LIST 1125 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_LONG_UPDATE_LIST 1109 /*! * cache: forced eviction - pages selected because of too many deleted * items count */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1126 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1110 /*! cache: forced eviction - pages selected count */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1127 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1111 /*! cache: forced eviction - pages selected unable to be evicted count */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1128 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1112 /*! cache: forced eviction - pages selected unable to be evicted time */ -#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL_TIME 1129 +#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL_TIME 1113 /*! cache: hazard pointer blocked page eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1130 +#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1114 /*! cache: hazard pointer check calls */ -#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1131 +#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1115 /*! cache: hazard pointer check entries walked */ -#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1132 +#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1116 /*! cache: hazard pointer maximum array length */ -#define WT_STAT_CONN_CACHE_HAZARD_MAX 1133 +#define WT_STAT_CONN_CACHE_HAZARD_MAX 1117 /*! cache: history store table insert calls */ -#define WT_STAT_CONN_CACHE_HS_INSERT 1134 +#define WT_STAT_CONN_CACHE_HS_INSERT 1118 /*! cache: history store table insert calls that returned restart */ -#define WT_STAT_CONN_CACHE_HS_INSERT_RESTART 1135 +#define WT_STAT_CONN_CACHE_HS_INSERT_RESTART 1119 /*! cache: history store table max on-disk size */ -#define WT_STAT_CONN_CACHE_HS_ONDISK_MAX 1136 +#define WT_STAT_CONN_CACHE_HS_ONDISK_MAX 1120 /*! cache: history store table on-disk size */ -#define WT_STAT_CONN_CACHE_HS_ONDISK 1137 +#define WT_STAT_CONN_CACHE_HS_ONDISK 1121 /*! * cache: history store table out-of-order resolved updates that lose * their durable timestamp */ -#define WT_STAT_CONN_CACHE_HS_ORDER_LOSE_DURABLE_TIMESTAMP 1138 +#define WT_STAT_CONN_CACHE_HS_ORDER_LOSE_DURABLE_TIMESTAMP 1122 /*! * cache: history store table out-of-order updates that were fixed up by * reinserting with the fixed timestamp */ -#define WT_STAT_CONN_CACHE_HS_ORDER_REINSERT 1139 +#define WT_STAT_CONN_CACHE_HS_ORDER_REINSERT 1123 /*! cache: history store table reads */ -#define WT_STAT_CONN_CACHE_HS_READ 1140 +#define WT_STAT_CONN_CACHE_HS_READ 1124 /*! cache: history store table reads missed */ -#define WT_STAT_CONN_CACHE_HS_READ_MISS 1141 +#define WT_STAT_CONN_CACHE_HS_READ_MISS 1125 /*! cache: history store table reads requiring squashed modifies */ -#define WT_STAT_CONN_CACHE_HS_READ_SQUASH 1142 +#define WT_STAT_CONN_CACHE_HS_READ_SQUASH 1126 /*! * cache: history store table truncation by rollback to stable to remove * an unstable update */ -#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_RTS_UNSTABLE 1143 +#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_RTS_UNSTABLE 1127 /*! * cache: history store table truncation by rollback to stable to remove * an update */ -#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_RTS 1144 +#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_RTS 1128 /*! cache: history store table truncation to remove an update */ -#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE 1145 +#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE 1129 /*! * cache: history store table truncation to remove range of updates due * to key being removed from the data page during reconciliation */ -#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL 1146 +#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL 1130 /*! * cache: history store table truncation to remove range of updates due * to out-of-order timestamp update on data page */ -#define WT_STAT_CONN_CACHE_HS_ORDER_REMOVE 1147 +#define WT_STAT_CONN_CACHE_HS_ORDER_REMOVE 1131 /*! cache: history store table writes requiring squashed modifies */ -#define WT_STAT_CONN_CACHE_HS_WRITE_SQUASH 1148 +#define WT_STAT_CONN_CACHE_HS_WRITE_SQUASH 1132 /*! cache: in-memory page passed criteria to be split */ -#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1149 +#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1133 /*! cache: in-memory page splits */ -#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1150 +#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1134 /*! cache: internal pages evicted */ -#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1151 +#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1135 /*! cache: internal pages queued for eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_QUEUED 1152 +#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_QUEUED 1136 /*! cache: internal pages seen by eviction walk */ -#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_SEEN 1153 +#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_SEEN 1137 /*! cache: internal pages seen by eviction walk that are already queued */ -#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_ALREADY_QUEUED 1154 +#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_ALREADY_QUEUED 1138 /*! cache: internal pages split during eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1155 +#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1139 /*! cache: leaf pages split during eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1156 -/*! - * cache: locate a random in-mem ref by examining all entries on the root - * page - */ -#define WT_STAT_CONN_CACHE_EVICTION_RANDOM_SAMPLE_INMEM_ROOT 1157 +#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1140 /*! cache: maximum bytes configured */ -#define WT_STAT_CONN_CACHE_BYTES_MAX 1158 -/*! cache: maximum milliseconds spent at a single eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_MILLISECONDS 1159 -/*! cache: maximum page size seen at eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1160 +#define WT_STAT_CONN_CACHE_BYTES_MAX 1141 +/*! cache: maximum page size at eviction */ +#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1142 /*! cache: modified pages evicted */ -#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1161 +#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1143 /*! cache: modified pages evicted by application threads */ -#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1162 +#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1144 /*! cache: operations timed out waiting for space in cache */ -#define WT_STAT_CONN_CACHE_TIMED_OUT_OPS 1163 +#define WT_STAT_CONN_CACHE_TIMED_OUT_OPS 1145 /*! cache: overflow pages read into cache */ -#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1164 +#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1146 /*! cache: page split during eviction deepened the tree */ -#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1165 +#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1147 /*! cache: page written requiring history store records */ -#define WT_STAT_CONN_CACHE_WRITE_HS 1166 +#define WT_STAT_CONN_CACHE_WRITE_HS 1148 /*! cache: pages currently held in the cache */ -#define WT_STAT_CONN_CACHE_PAGES_INUSE 1167 +#define WT_STAT_CONN_CACHE_PAGES_INUSE 1149 /*! cache: pages evicted by application threads */ -#define WT_STAT_CONN_CACHE_EVICTION_APP 1168 +#define WT_STAT_CONN_CACHE_EVICTION_APP 1150 /*! cache: pages evicted in parallel with checkpoint */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_IN_PARALLEL_WITH_CHECKPOINT 1169 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_IN_PARALLEL_WITH_CHECKPOINT 1151 /*! cache: pages queued for eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1170 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1152 /*! cache: pages queued for eviction post lru sorting */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_POST_LRU 1171 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_POST_LRU 1153 /*! cache: pages queued for urgent eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1172 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1154 /*! cache: pages queued for urgent eviction during walk */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1173 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1155 /*! * cache: pages queued for urgent eviction from history store due to high * dirty content */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT_HS_DIRTY 1174 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT_HS_DIRTY 1156 /*! cache: pages read into cache */ -#define WT_STAT_CONN_CACHE_READ 1175 +#define WT_STAT_CONN_CACHE_READ 1157 /*! cache: pages read into cache after truncate */ -#define WT_STAT_CONN_CACHE_READ_DELETED 1176 +#define WT_STAT_CONN_CACHE_READ_DELETED 1158 /*! cache: pages read into cache after truncate in prepare state */ -#define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED 1177 -/*! - * cache: pages removed from the ordinary queue to be queued for urgent - * eviction - */ -#define WT_STAT_CONN_CACHE_EVICTION_CLEAR_ORDINARY 1178 +#define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED 1159 /*! cache: pages requested from the cache */ -#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1179 +#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1160 /*! cache: pages seen by eviction walk */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1180 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1161 /*! cache: pages seen by eviction walk that are already queued */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_ALREADY_QUEUED 1181 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_ALREADY_QUEUED 1162 /*! cache: pages selected for eviction unable to be evicted */ -#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1182 +#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1163 /*! * cache: pages selected for eviction unable to be evicted because of * active children on an internal page */ -#define WT_STAT_CONN_CACHE_EVICTION_FAIL_ACTIVE_CHILDREN_ON_AN_INTERNAL_PAGE 1183 +#define WT_STAT_CONN_CACHE_EVICTION_FAIL_ACTIVE_CHILDREN_ON_AN_INTERNAL_PAGE 1164 /*! * cache: pages selected for eviction unable to be evicted because of * failure in reconciliation */ -#define WT_STAT_CONN_CACHE_EVICTION_FAIL_IN_RECONCILIATION 1184 +#define WT_STAT_CONN_CACHE_EVICTION_FAIL_IN_RECONCILIATION 1165 /*! * cache: pages selected for eviction unable to be evicted because of * race between checkpoint and out of order timestamps handling */ -#define WT_STAT_CONN_CACHE_EVICTION_FAIL_CHECKPOINT_OUT_OF_ORDER_TS 1185 +#define WT_STAT_CONN_CACHE_EVICTION_FAIL_CHECKPOINT_OUT_OF_ORDER_TS 1166 /*! cache: pages walked for eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK 1186 +#define WT_STAT_CONN_CACHE_EVICTION_WALK 1167 /*! cache: pages written from cache */ -#define WT_STAT_CONN_CACHE_WRITE 1187 +#define WT_STAT_CONN_CACHE_WRITE 1168 /*! cache: pages written requiring in-memory restoration */ -#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1188 +#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1169 /*! cache: percentage overhead */ -#define WT_STAT_CONN_CACHE_OVERHEAD 1189 +#define WT_STAT_CONN_CACHE_OVERHEAD 1170 /*! cache: the number of times full update inserted to history store */ -#define WT_STAT_CONN_CACHE_HS_INSERT_FULL_UPDATE 1190 +#define WT_STAT_CONN_CACHE_HS_INSERT_FULL_UPDATE 1171 /*! cache: the number of times reverse modify inserted to history store */ -#define WT_STAT_CONN_CACHE_HS_INSERT_REVERSE_MODIFY 1191 -/*! - * cache: total milliseconds spent inside reentrant history store - * evictions in a reconciliation - */ -#define WT_STAT_CONN_CACHE_REENTRY_HS_EVICTION_MILLISECONDS 1192 +#define WT_STAT_CONN_CACHE_HS_INSERT_REVERSE_MODIFY 1172 /*! cache: tracked bytes belonging to internal pages in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1193 +#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1173 /*! cache: tracked bytes belonging to leaf pages in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_LEAF 1194 +#define WT_STAT_CONN_CACHE_BYTES_LEAF 1174 /*! cache: tracked dirty bytes in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1195 +#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1175 /*! cache: tracked dirty pages in the cache */ -#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1196 +#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1176 /*! cache: unmodified pages evicted */ -#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1197 +#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1177 /*! capacity: background fsync file handles considered */ -#define WT_STAT_CONN_FSYNC_ALL_FH_TOTAL 1198 +#define WT_STAT_CONN_FSYNC_ALL_FH_TOTAL 1178 /*! capacity: background fsync file handles synced */ -#define WT_STAT_CONN_FSYNC_ALL_FH 1199 +#define WT_STAT_CONN_FSYNC_ALL_FH 1179 /*! capacity: background fsync time (msecs) */ -#define WT_STAT_CONN_FSYNC_ALL_TIME 1200 +#define WT_STAT_CONN_FSYNC_ALL_TIME 1180 /*! capacity: bytes read */ -#define WT_STAT_CONN_CAPACITY_BYTES_READ 1201 +#define WT_STAT_CONN_CAPACITY_BYTES_READ 1181 /*! capacity: bytes written for checkpoint */ -#define WT_STAT_CONN_CAPACITY_BYTES_CKPT 1202 +#define WT_STAT_CONN_CAPACITY_BYTES_CKPT 1182 /*! capacity: bytes written for eviction */ -#define WT_STAT_CONN_CAPACITY_BYTES_EVICT 1203 +#define WT_STAT_CONN_CAPACITY_BYTES_EVICT 1183 /*! capacity: bytes written for log */ -#define WT_STAT_CONN_CAPACITY_BYTES_LOG 1204 +#define WT_STAT_CONN_CAPACITY_BYTES_LOG 1184 /*! capacity: bytes written total */ -#define WT_STAT_CONN_CAPACITY_BYTES_WRITTEN 1205 +#define WT_STAT_CONN_CAPACITY_BYTES_WRITTEN 1185 /*! capacity: threshold to call fsync */ -#define WT_STAT_CONN_CAPACITY_THRESHOLD 1206 +#define WT_STAT_CONN_CAPACITY_THRESHOLD 1186 /*! capacity: time waiting due to total capacity (usecs) */ -#define WT_STAT_CONN_CAPACITY_TIME_TOTAL 1207 +#define WT_STAT_CONN_CAPACITY_TIME_TOTAL 1187 /*! capacity: time waiting during checkpoint (usecs) */ -#define WT_STAT_CONN_CAPACITY_TIME_CKPT 1208 +#define WT_STAT_CONN_CAPACITY_TIME_CKPT 1188 /*! capacity: time waiting during eviction (usecs) */ -#define WT_STAT_CONN_CAPACITY_TIME_EVICT 1209 +#define WT_STAT_CONN_CAPACITY_TIME_EVICT 1189 /*! capacity: time waiting during logging (usecs) */ -#define WT_STAT_CONN_CAPACITY_TIME_LOG 1210 +#define WT_STAT_CONN_CAPACITY_TIME_LOG 1190 /*! capacity: time waiting during read (usecs) */ -#define WT_STAT_CONN_CAPACITY_TIME_READ 1211 +#define WT_STAT_CONN_CAPACITY_TIME_READ 1191 /*! checkpoint-cleanup: pages added for eviction */ -#define WT_STAT_CONN_CC_PAGES_EVICT 1212 +#define WT_STAT_CONN_CC_PAGES_EVICT 1192 /*! checkpoint-cleanup: pages removed */ -#define WT_STAT_CONN_CC_PAGES_REMOVED 1213 +#define WT_STAT_CONN_CC_PAGES_REMOVED 1193 /*! checkpoint-cleanup: pages skipped during tree walk */ -#define WT_STAT_CONN_CC_PAGES_WALK_SKIPPED 1214 +#define WT_STAT_CONN_CC_PAGES_WALK_SKIPPED 1194 /*! checkpoint-cleanup: pages visited */ -#define WT_STAT_CONN_CC_PAGES_VISITED 1215 +#define WT_STAT_CONN_CC_PAGES_VISITED 1195 /*! connection: auto adjusting condition resets */ -#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1216 +#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1196 /*! connection: auto adjusting condition wait calls */ -#define WT_STAT_CONN_COND_AUTO_WAIT 1217 +#define WT_STAT_CONN_COND_AUTO_WAIT 1197 /*! * connection: auto adjusting condition wait raced to update timeout and * skipped updating */ -#define WT_STAT_CONN_COND_AUTO_WAIT_SKIPPED 1218 +#define WT_STAT_CONN_COND_AUTO_WAIT_SKIPPED 1198 /*! connection: detected system time went backwards */ -#define WT_STAT_CONN_TIME_TRAVEL 1219 +#define WT_STAT_CONN_TIME_TRAVEL 1199 /*! connection: files currently open */ -#define WT_STAT_CONN_FILE_OPEN 1220 +#define WT_STAT_CONN_FILE_OPEN 1200 /*! connection: hash bucket array size for data handles */ -#define WT_STAT_CONN_BUCKETS_DH 1221 +#define WT_STAT_CONN_BUCKETS_DH 1201 /*! connection: hash bucket array size general */ -#define WT_STAT_CONN_BUCKETS 1222 +#define WT_STAT_CONN_BUCKETS 1202 /*! connection: memory allocations */ -#define WT_STAT_CONN_MEMORY_ALLOCATION 1223 +#define WT_STAT_CONN_MEMORY_ALLOCATION 1203 /*! connection: memory frees */ -#define WT_STAT_CONN_MEMORY_FREE 1224 +#define WT_STAT_CONN_MEMORY_FREE 1204 /*! connection: memory re-allocations */ -#define WT_STAT_CONN_MEMORY_GROW 1225 +#define WT_STAT_CONN_MEMORY_GROW 1205 /*! connection: pthread mutex condition wait calls */ -#define WT_STAT_CONN_COND_WAIT 1226 +#define WT_STAT_CONN_COND_WAIT 1206 /*! connection: pthread mutex shared lock read-lock calls */ -#define WT_STAT_CONN_RWLOCK_READ 1227 +#define WT_STAT_CONN_RWLOCK_READ 1207 /*! connection: pthread mutex shared lock write-lock calls */ -#define WT_STAT_CONN_RWLOCK_WRITE 1228 +#define WT_STAT_CONN_RWLOCK_WRITE 1208 /*! connection: total fsync I/Os */ -#define WT_STAT_CONN_FSYNC_IO 1229 +#define WT_STAT_CONN_FSYNC_IO 1209 /*! connection: total read I/Os */ -#define WT_STAT_CONN_READ_IO 1230 +#define WT_STAT_CONN_READ_IO 1210 /*! connection: total write I/Os */ -#define WT_STAT_CONN_WRITE_IO 1231 -/*! cursor: Total number of deleted pages skipped during tree walk */ -#define WT_STAT_CONN_CURSOR_TREE_WALK_DEL_PAGE_SKIP 1232 +#define WT_STAT_CONN_WRITE_IO 1211 /*! cursor: Total number of entries skipped by cursor next calls */ -#define WT_STAT_CONN_CURSOR_NEXT_SKIP_TOTAL 1233 +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_TOTAL 1212 /*! cursor: Total number of entries skipped by cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV_SKIP_TOTAL 1234 +#define WT_STAT_CONN_CURSOR_PREV_SKIP_TOTAL 1213 /*! * cursor: Total number of entries skipped to position the history store * cursor */ -#define WT_STAT_CONN_CURSOR_SKIP_HS_CUR_POSITION 1235 -/*! - * cursor: Total number of in-memory deleted pages skipped during tree - * walk - */ -#define WT_STAT_CONN_CURSOR_TREE_WALK_INMEM_DEL_PAGE_SKIP 1236 +#define WT_STAT_CONN_CURSOR_SKIP_HS_CUR_POSITION 1214 /*! * cursor: Total number of times a search near has exited due to prefix * config */ -#define WT_STAT_CONN_CURSOR_SEARCH_NEAR_PREFIX_FAST_PATHS 1237 -/*! cursor: bulk cursor count */ -#define WT_STAT_CONN_CURSOR_BULK_COUNT 1238 +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR_PREFIX_FAST_PATHS 1215 /*! cursor: cached cursor count */ -#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1239 +#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1216 /*! cursor: cursor bulk loaded cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT_BULK 1240 +#define WT_STAT_CONN_CURSOR_INSERT_BULK 1217 /*! cursor: cursor close calls that result in cache */ -#define WT_STAT_CONN_CURSOR_CACHE 1241 +#define WT_STAT_CONN_CURSOR_CACHE 1218 /*! cursor: cursor create calls */ -#define WT_STAT_CONN_CURSOR_CREATE 1242 +#define WT_STAT_CONN_CURSOR_CREATE 1219 /*! cursor: cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT 1243 +#define WT_STAT_CONN_CURSOR_INSERT 1220 /*! cursor: cursor insert key and value bytes */ -#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1244 +#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1221 /*! cursor: cursor modify calls */ -#define WT_STAT_CONN_CURSOR_MODIFY 1245 +#define WT_STAT_CONN_CURSOR_MODIFY 1222 /*! cursor: cursor modify key and value bytes affected */ -#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1246 +#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1223 /*! cursor: cursor modify value bytes modified */ -#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1247 +#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1224 /*! cursor: cursor next calls */ -#define WT_STAT_CONN_CURSOR_NEXT 1248 +#define WT_STAT_CONN_CURSOR_NEXT 1225 /*! * cursor: cursor next calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_CONN_CURSOR_NEXT_HS_TOMBSTONE 1249 +#define WT_STAT_CONN_CURSOR_NEXT_HS_TOMBSTONE 1226 /*! * cursor: cursor next calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1250 +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100 1227 /*! cursor: cursor next calls that skip less than 100 entries */ -#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1251 +#define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 1228 /*! cursor: cursor operation restarted */ -#define WT_STAT_CONN_CURSOR_RESTART 1252 +#define WT_STAT_CONN_CURSOR_RESTART 1229 /*! cursor: cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV 1253 +#define WT_STAT_CONN_CURSOR_PREV 1230 /*! * cursor: cursor prev calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE 1254 +#define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE 1231 /*! * cursor: cursor prev calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1255 +#define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100 1232 /*! cursor: cursor prev calls that skip less than 100 entries */ -#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1256 +#define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100 1233 /*! cursor: cursor remove calls */ -#define WT_STAT_CONN_CURSOR_REMOVE 1257 +#define WT_STAT_CONN_CURSOR_REMOVE 1234 /*! cursor: cursor remove key bytes removed */ -#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1258 +#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1235 /*! cursor: cursor reserve calls */ -#define WT_STAT_CONN_CURSOR_RESERVE 1259 +#define WT_STAT_CONN_CURSOR_RESERVE 1236 /*! cursor: cursor reset calls */ -#define WT_STAT_CONN_CURSOR_RESET 1260 +#define WT_STAT_CONN_CURSOR_RESET 1237 /*! cursor: cursor search calls */ -#define WT_STAT_CONN_CURSOR_SEARCH 1261 +#define WT_STAT_CONN_CURSOR_SEARCH 1238 /*! cursor: cursor search history store calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_HS 1262 +#define WT_STAT_CONN_CURSOR_SEARCH_HS 1239 /*! cursor: cursor search near calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1263 +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1240 /*! cursor: cursor sweep buckets */ -#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1264 +#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1241 /*! cursor: cursor sweep cursors closed */ -#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1265 +#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1242 /*! cursor: cursor sweep cursors examined */ -#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1266 +#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1243 /*! cursor: cursor sweeps */ -#define WT_STAT_CONN_CURSOR_SWEEP 1267 +#define WT_STAT_CONN_CURSOR_SWEEP 1244 /*! cursor: cursor truncate calls */ -#define WT_STAT_CONN_CURSOR_TRUNCATE 1268 +#define WT_STAT_CONN_CURSOR_TRUNCATE 1245 /*! cursor: cursor update calls */ -#define WT_STAT_CONN_CURSOR_UPDATE 1269 +#define WT_STAT_CONN_CURSOR_UPDATE 1246 /*! cursor: cursor update key and value bytes */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1270 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1247 /*! cursor: cursor update value size change */ -#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1271 +#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1248 /*! cursor: cursors reused from cache */ -#define WT_STAT_CONN_CURSOR_REOPEN 1272 +#define WT_STAT_CONN_CURSOR_REOPEN 1249 /*! cursor: open cursor count */ -#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1273 +#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1250 /*! data-handle: connection data handle size */ -#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1274 +#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1251 /*! data-handle: connection data handles currently active */ -#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1275 +#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1252 /*! data-handle: connection sweep candidate became referenced */ -#define WT_STAT_CONN_DH_SWEEP_REF 1276 +#define WT_STAT_CONN_DH_SWEEP_REF 1253 /*! data-handle: connection sweep dhandles closed */ -#define WT_STAT_CONN_DH_SWEEP_CLOSE 1277 +#define WT_STAT_CONN_DH_SWEEP_CLOSE 1254 /*! data-handle: connection sweep dhandles removed from hash list */ -#define WT_STAT_CONN_DH_SWEEP_REMOVE 1278 +#define WT_STAT_CONN_DH_SWEEP_REMOVE 1255 /*! data-handle: connection sweep time-of-death sets */ -#define WT_STAT_CONN_DH_SWEEP_TOD 1279 +#define WT_STAT_CONN_DH_SWEEP_TOD 1256 /*! data-handle: connection sweeps */ -#define WT_STAT_CONN_DH_SWEEPS 1280 +#define WT_STAT_CONN_DH_SWEEPS 1257 /*! * data-handle: connection sweeps skipped due to checkpoint gathering * handles */ -#define WT_STAT_CONN_DH_SWEEP_SKIP_CKPT 1281 +#define WT_STAT_CONN_DH_SWEEP_SKIP_CKPT 1258 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1282 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1259 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1283 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1260 /*! lock: checkpoint lock acquisitions */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1284 +#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1261 /*! lock: checkpoint lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1285 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1262 /*! lock: checkpoint lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1286 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1263 /*! lock: dhandle lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1287 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1264 /*! lock: dhandle lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1288 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1265 /*! lock: dhandle read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1289 +#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1266 /*! lock: dhandle write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1290 +#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1267 /*! * lock: durable timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1291 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1268 /*! * lock: durable timestamp queue lock internal thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1292 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1269 /*! lock: durable timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1293 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1270 /*! lock: durable timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1294 +#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1271 /*! lock: metadata lock acquisitions */ -#define WT_STAT_CONN_LOCK_METADATA_COUNT 1295 +#define WT_STAT_CONN_LOCK_METADATA_COUNT 1272 /*! lock: metadata lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1296 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1273 /*! lock: metadata lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1297 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1274 /*! * lock: read timestamp queue lock application thread time waiting * (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1298 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1275 /*! lock: read timestamp queue lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1299 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1276 /*! lock: read timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1300 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1277 /*! lock: read timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1301 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1278 /*! lock: schema lock acquisitions */ -#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1302 +#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1279 /*! lock: schema lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1303 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1280 /*! lock: schema lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1304 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1281 /*! * lock: table lock application thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1305 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1282 /*! * lock: table lock internal thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1306 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1283 /*! lock: table read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1307 +#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1284 /*! lock: table write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1308 +#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1285 /*! lock: txn global lock application thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1309 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1286 /*! lock: txn global lock internal thread time waiting (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1310 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1287 /*! lock: txn global read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1311 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1288 /*! lock: txn global write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1312 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1289 /*! log: busy returns attempting to switch slots */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1313 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1290 /*! log: force log remove time sleeping (usecs) */ -#define WT_STAT_CONN_LOG_FORCE_REMOVE_SLEEP 1314 +#define WT_STAT_CONN_LOG_FORCE_REMOVE_SLEEP 1291 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1315 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1292 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1316 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1293 /*! log: log files manually zero-filled */ -#define WT_STAT_CONN_LOG_ZERO_FILLS 1317 +#define WT_STAT_CONN_LOG_ZERO_FILLS 1294 /*! log: log flush operations */ -#define WT_STAT_CONN_LOG_FLUSH 1318 +#define WT_STAT_CONN_LOG_FLUSH 1295 /*! log: log force write operations */ -#define WT_STAT_CONN_LOG_FORCE_WRITE 1319 +#define WT_STAT_CONN_LOG_FORCE_WRITE 1296 /*! log: log force write operations skipped */ -#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1320 +#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1297 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1321 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1298 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1322 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1299 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1323 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1300 /*! log: log release advances write LSN */ -#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1324 +#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1301 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1325 +#define WT_STAT_CONN_LOG_SCANS 1302 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1326 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1303 /*! log: log server thread advances write LSN */ -#define WT_STAT_CONN_LOG_WRITE_LSN 1327 +#define WT_STAT_CONN_LOG_WRITE_LSN 1304 /*! log: log server thread write LSN walk skipped */ -#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1328 +#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1305 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1329 +#define WT_STAT_CONN_LOG_SYNC 1306 /*! log: log sync time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DURATION 1330 +#define WT_STAT_CONN_LOG_SYNC_DURATION 1307 /*! log: log sync_dir operations */ -#define WT_STAT_CONN_LOG_SYNC_DIR 1331 +#define WT_STAT_CONN_LOG_SYNC_DIR 1308 /*! log: log sync_dir time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1332 +#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1309 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1333 +#define WT_STAT_CONN_LOG_WRITES 1310 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1334 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1311 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1335 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1312 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1336 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1313 /*! log: pre-allocated log files not ready and missed */ -#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1337 +#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1314 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1338 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1315 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1339 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1316 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1340 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1317 /*! log: slot close lost race */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1341 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1318 /*! log: slot close unbuffered waits */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1342 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1319 /*! log: slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1343 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1320 /*! log: slot join atomic update races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1344 +#define WT_STAT_CONN_LOG_SLOT_RACES 1321 /*! log: slot join calls atomic updates raced */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1345 +#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1322 /*! log: slot join calls did not yield */ -#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1346 +#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1323 /*! log: slot join calls found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1347 +#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1324 /*! log: slot join calls slept */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1348 +#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1325 /*! log: slot join calls yielded */ -#define WT_STAT_CONN_LOG_SLOT_YIELD 1349 +#define WT_STAT_CONN_LOG_SLOT_YIELD 1326 /*! log: slot join found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1350 +#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1327 /*! log: slot joins yield time (usecs) */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1351 +#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1328 /*! log: slot transitions unable to find free slot */ -#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1352 +#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1329 /*! log: slot unbuffered writes */ -#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1353 +#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1330 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1354 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1331 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1355 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1332 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1356 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1333 /*! log: written slots coalesced */ -#define WT_STAT_CONN_LOG_SLOT_COALESCED 1357 +#define WT_STAT_CONN_LOG_SLOT_COALESCED 1334 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1358 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1335 /*! perf: file system read latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1359 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1336 /*! perf: file system read latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1360 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1337 /*! perf: file system read latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1361 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1338 /*! perf: file system read latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1362 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1339 /*! perf: file system read latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1363 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1340 /*! perf: file system read latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1364 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1341 /*! perf: file system write latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1365 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1342 /*! perf: file system write latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1366 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1343 /*! perf: file system write latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1367 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1344 /*! perf: file system write latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1368 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1345 /*! perf: file system write latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1369 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1346 /*! perf: file system write latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1370 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1347 /*! perf: operation read latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1371 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1348 /*! perf: operation read latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1372 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1349 /*! perf: operation read latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1373 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1350 /*! perf: operation read latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1374 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1351 /*! perf: operation read latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1375 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1352 /*! perf: operation write latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1376 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1353 /*! perf: operation write latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1377 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1354 /*! perf: operation write latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1378 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1355 /*! perf: operation write latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1379 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1356 /*! perf: operation write latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1380 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1357 /*! reconciliation: approximate byte size of timestamps in pages written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1381 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS 1358 /*! * reconciliation: approximate byte size of transaction IDs in pages * written */ -#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1382 +#define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN 1359 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1383 +#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1360 /*! reconciliation: leaf-page overflow keys */ -#define WT_STAT_CONN_REC_OVERFLOW_KEY_LEAF 1384 -/*! reconciliation: maximum milliseconds spent in a reconciliation call */ -#define WT_STAT_CONN_REC_MAXIMUM_MILLISECONDS 1385 -/*! - * reconciliation: maximum milliseconds spent in building a disk image in - * a reconciliation - */ -#define WT_STAT_CONN_REC_MAXIMUM_IMAGE_BUILD_MILLISECONDS 1386 -/*! - * reconciliation: maximum milliseconds spent in moving updates to the - * history store in a reconciliation - */ -#define WT_STAT_CONN_REC_MAXIMUM_HS_WRAPUP_MILLISECONDS 1387 +#define WT_STAT_CONN_REC_OVERFLOW_KEY_LEAF 1361 +/*! reconciliation: maximum seconds spent in a reconciliation call */ +#define WT_STAT_CONN_REC_MAXIMUM_SECONDS 1362 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1388 +#define WT_STAT_CONN_REC_PAGES 1363 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1389 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1364 /*! * reconciliation: page reconciliation calls that resulted in values with * prepared transaction metadata */ -#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1390 +#define WT_STAT_CONN_REC_PAGES_WITH_PREPARE 1365 /*! * reconciliation: page reconciliation calls that resulted in values with * timestamps */ -#define WT_STAT_CONN_REC_PAGES_WITH_TS 1391 +#define WT_STAT_CONN_REC_PAGES_WITH_TS 1366 /*! * reconciliation: page reconciliation calls that resulted in values with * transaction ids */ -#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1392 +#define WT_STAT_CONN_REC_PAGES_WITH_TXN 1367 /*! reconciliation: pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE 1393 +#define WT_STAT_CONN_REC_PAGE_DELETE 1368 /*! * reconciliation: pages written including an aggregated newest start * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1394 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 1369 /*! * reconciliation: pages written including an aggregated newest stop * durable timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1395 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 1370 /*! * reconciliation: pages written including an aggregated newest stop * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1396 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS 1371 /*! * reconciliation: pages written including an aggregated newest stop * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1397 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN 1372 /*! * reconciliation: pages written including an aggregated newest * transaction ID */ -#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_TXN 1398 +#define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_TXN 1373 /*! * reconciliation: pages written including an aggregated oldest start * timestamp */ -#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1399 +#define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS 1374 /*! reconciliation: pages written including an aggregated prepare */ -#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1400 +#define WT_STAT_CONN_REC_TIME_AGGR_PREPARED 1375 /*! reconciliation: pages written including at least one prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1401 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1376 /*! * reconciliation: pages written including at least one start durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1402 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1377 /*! reconciliation: pages written including at least one start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1403 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1378 /*! * reconciliation: pages written including at least one start transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1404 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN 1379 /*! * reconciliation: pages written including at least one stop durable * timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1405 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 1380 /*! reconciliation: pages written including at least one stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1406 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS 1381 /*! * reconciliation: pages written including at least one stop transaction * ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1407 +#define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1382 /*! reconciliation: records written including a prepare state */ -#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1408 +#define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED 1383 /*! reconciliation: records written including a start durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1409 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS 1384 /*! reconciliation: records written including a start timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1410 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TS 1385 /*! reconciliation: records written including a start transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1411 +#define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN 1386 /*! reconciliation: records written including a stop durable timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1412 +#define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS 1387 /*! reconciliation: records written including a stop timestamp */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1413 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS 1388 /*! reconciliation: records written including a stop transaction ID */ -#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1414 +#define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN 1389 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1415 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1390 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1416 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1391 /*! session: attempts to remove a local object and the object is in use */ -#define WT_STAT_CONN_LOCAL_OBJECTS_INUSE 1417 +#define WT_STAT_CONN_LOCAL_OBJECTS_INUSE 1392 /*! session: flush_tier operation calls */ -#define WT_STAT_CONN_FLUSH_TIER 1418 +#define WT_STAT_CONN_FLUSH_TIER 1393 /*! session: flush_tier tables skipped due to no checkpoint */ -#define WT_STAT_CONN_FLUSH_TIER_SKIPPED 1419 +#define WT_STAT_CONN_FLUSH_TIER_SKIPPED 1394 /*! session: flush_tier tables switched */ -#define WT_STAT_CONN_FLUSH_TIER_SWITCHED 1420 +#define WT_STAT_CONN_FLUSH_TIER_SWITCHED 1395 /*! session: local objects removed */ -#define WT_STAT_CONN_LOCAL_OBJECTS_REMOVED 1421 +#define WT_STAT_CONN_LOCAL_OBJECTS_REMOVED 1396 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1422 +#define WT_STAT_CONN_SESSION_OPEN 1397 /*! session: session query timestamp calls */ -#define WT_STAT_CONN_SESSION_QUERY_TS 1423 +#define WT_STAT_CONN_SESSION_QUERY_TS 1398 /*! session: table alter failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1424 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1399 /*! session: table alter successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1425 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1400 /*! session: table alter triggering checkpoint calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_TRIGGER_CHECKPOINT 1426 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_TRIGGER_CHECKPOINT 1401 /*! session: table alter unchanged and skipped */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1427 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1402 /*! session: table compact failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1428 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1403 /*! session: table compact failed calls due to cache pressure */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL_CACHE_PRESSURE 1429 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL_CACHE_PRESSURE 1404 /*! session: table compact running */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_RUNNING 1430 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_RUNNING 1405 /*! session: table compact skipped as process would not reduce file size */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SKIPPED 1431 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SKIPPED 1406 /*! session: table compact successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1432 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1407 /*! session: table compact timeout */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_TIMEOUT 1433 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_TIMEOUT 1408 /*! session: table create failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1434 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1409 /*! session: table create successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1435 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1410 /*! session: table drop failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1436 +#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1411 /*! session: table drop successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1437 +#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1412 /*! session: table rename failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1438 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1413 /*! session: table rename successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1439 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1414 /*! session: table salvage failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1440 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1415 /*! session: table salvage successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1441 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1416 /*! session: table truncate failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1442 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1417 /*! session: table truncate successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1443 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1418 /*! session: table verify failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1444 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1419 /*! session: table verify successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1445 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1420 /*! session: tiered operations dequeued and processed */ -#define WT_STAT_CONN_TIERED_WORK_UNITS_DEQUEUED 1446 +#define WT_STAT_CONN_TIERED_WORK_UNITS_DEQUEUED 1421 /*! session: tiered operations scheduled */ -#define WT_STAT_CONN_TIERED_WORK_UNITS_CREATED 1447 +#define WT_STAT_CONN_TIERED_WORK_UNITS_CREATED 1422 /*! session: tiered storage local retention time (secs) */ -#define WT_STAT_CONN_TIERED_RETENTION 1448 +#define WT_STAT_CONN_TIERED_RETENTION 1423 /*! thread-state: active filesystem fsync calls */ -#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1449 +#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1424 /*! thread-state: active filesystem read calls */ -#define WT_STAT_CONN_THREAD_READ_ACTIVE 1450 +#define WT_STAT_CONN_THREAD_READ_ACTIVE 1425 /*! thread-state: active filesystem write calls */ -#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1451 -/*! thread-yield: application thread snapshot refreshed for eviction */ -#define WT_STAT_CONN_APPLICATION_EVICT_SNAPSHOT_REFRESHED 1452 +#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1426 /*! thread-yield: application thread time evicting (usecs) */ -#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1453 +#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1427 /*! thread-yield: application thread time waiting for cache (usecs) */ -#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1454 +#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1428 /*! * thread-yield: connection close blocked waiting for transaction state * stabilization */ -#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1455 +#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1429 /*! thread-yield: connection close yielded for lsm manager shutdown */ -#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1456 +#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1430 /*! thread-yield: data handle lock yielded */ -#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1457 +#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1431 /*! * thread-yield: get reference for page index and slot time sleeping * (usecs) */ -#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1458 +#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1432 /*! thread-yield: page access yielded due to prepare state change */ -#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1459 +#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1433 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1460 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1434 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1461 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1435 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1462 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1436 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1463 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1437 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1464 +#define WT_STAT_CONN_PAGE_SLEEP 1438 /*! * thread-yield: page delete rollback time sleeping for state change * (usecs) */ -#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1465 +#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1439 /*! thread-yield: page reconciliation yielded due to child modification */ -#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1466 +#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1440 /*! transaction: Number of prepared updates */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES 1467 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES 1441 /*! transaction: Number of prepared updates committed */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COMMITTED 1468 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COMMITTED 1442 /*! transaction: Number of prepared updates repeated on the same key */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_KEY_REPEATED 1469 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_KEY_REPEATED 1443 /*! transaction: Number of prepared updates rolled back */ -#define WT_STAT_CONN_TXN_PREPARED_UPDATES_ROLLEDBACK 1470 -/*! - * transaction: a reader raced with a prepared transaction commit and - * skipped an update or updates - */ -#define WT_STAT_CONN_TXN_READ_RACE_PREPARE_COMMIT 1471 -/*! transaction: checkpoint has acquired a snapshot for its transaction */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SNAPSHOT_ACQUIRED 1472 -/*! transaction: oldest pinned transaction ID rolled back for eviction */ -#define WT_STAT_CONN_TXN_ROLLBACK_OLDEST_PINNED 1473 +#define WT_STAT_CONN_TXN_PREPARED_UPDATES_ROLLEDBACK 1444 /*! transaction: prepared transactions */ -#define WT_STAT_CONN_TXN_PREPARE 1474 +#define WT_STAT_CONN_TXN_PREPARE 1445 /*! transaction: prepared transactions committed */ -#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1475 +#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1446 /*! transaction: prepared transactions currently active */ -#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1476 +#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1447 /*! transaction: prepared transactions rolled back */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1477 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1448 +/*! + * transaction: prepared transactions rolled back and do not remove the + * history store entry + */ +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK_DO_NOT_REMOVE_HS_UPDATE 1449 +/*! + * transaction: prepared transactions rolled back and fix the history + * store entry with checkpoint reserved transaction id + */ +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK_FIX_HS_UPDATE_WITH_CKPT_RESERVED_TXNID 1450 /*! transaction: query timestamp calls */ -#define WT_STAT_CONN_TXN_QUERY_TS 1478 +#define WT_STAT_CONN_TXN_QUERY_TS 1451 /*! transaction: race to read prepared update retry */ -#define WT_STAT_CONN_TXN_READ_RACE_PREPARE_UPDATE 1479 +#define WT_STAT_CONN_TXN_READ_RACE_PREPARE_UPDATE 1452 /*! transaction: rollback to stable calls */ -#define WT_STAT_CONN_TXN_RTS 1480 +#define WT_STAT_CONN_TXN_RTS 1453 /*! * transaction: rollback to stable history store records with stop * timestamps older than newer records */ -#define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1481 +#define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1454 /*! transaction: rollback to stable inconsistent checkpoint */ -#define WT_STAT_CONN_TXN_RTS_INCONSISTENT_CKPT 1482 +#define WT_STAT_CONN_TXN_RTS_INCONSISTENT_CKPT 1455 /*! transaction: rollback to stable keys removed */ -#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1483 +#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1456 /*! transaction: rollback to stable keys restored */ -#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1484 +#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1457 /*! transaction: rollback to stable pages visited */ -#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1485 +#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1458 /*! transaction: rollback to stable restored tombstones from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1486 +#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES 1459 /*! transaction: rollback to stable restored updates from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_UPDATES 1487 +#define WT_STAT_CONN_TXN_RTS_HS_RESTORE_UPDATES 1460 /*! transaction: rollback to stable skipping delete rle */ -#define WT_STAT_CONN_TXN_RTS_DELETE_RLE_SKIPPED 1488 +#define WT_STAT_CONN_TXN_RTS_DELETE_RLE_SKIPPED 1461 /*! transaction: rollback to stable skipping stable rle */ -#define WT_STAT_CONN_TXN_RTS_STABLE_RLE_SKIPPED 1489 +#define WT_STAT_CONN_TXN_RTS_STABLE_RLE_SKIPPED 1462 /*! transaction: rollback to stable sweeping history store keys */ -#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1490 +#define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS 1463 /*! transaction: rollback to stable tree walk skipping pages */ -#define WT_STAT_CONN_TXN_RTS_TREE_WALK_SKIP_PAGES 1491 +#define WT_STAT_CONN_TXN_RTS_TREE_WALK_SKIP_PAGES 1464 /*! transaction: rollback to stable updates aborted */ -#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1492 +#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1465 /*! transaction: rollback to stable updates removed from history store */ -#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1493 +#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1466 /*! transaction: sessions scanned in each walk of concurrent sessions */ -#define WT_STAT_CONN_TXN_SESSIONS_WALKED 1494 +#define WT_STAT_CONN_TXN_SESSIONS_WALKED 1467 /*! transaction: set timestamp calls */ -#define WT_STAT_CONN_TXN_SET_TS 1495 +#define WT_STAT_CONN_TXN_SET_TS 1468 /*! transaction: set timestamp durable calls */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1496 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1469 /*! transaction: set timestamp durable updates */ -#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1497 +#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1470 /*! transaction: set timestamp oldest calls */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1498 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1471 /*! transaction: set timestamp oldest updates */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1499 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1472 /*! transaction: set timestamp stable calls */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE 1500 +#define WT_STAT_CONN_TXN_SET_TS_STABLE 1473 /*! transaction: set timestamp stable updates */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1501 +#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1474 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1502 +#define WT_STAT_CONN_TXN_BEGIN 1475 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1503 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1476 /*! * transaction: transaction checkpoint currently running for history * store file */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING_HS 1504 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING_HS 1477 /*! transaction: transaction checkpoint generation */ -#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1505 +#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1478 /*! * transaction: transaction checkpoint history store file duration * (usecs) */ -#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1506 +#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1479 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1507 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1480 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1508 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1481 /*! * transaction: transaction checkpoint most recent duration for gathering * all handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1509 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1482 /*! * transaction: transaction checkpoint most recent duration for gathering * applied handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1510 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY 1483 /*! * transaction: transaction checkpoint most recent duration for gathering * skipped handles (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1511 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP 1484 /*! transaction: transaction checkpoint most recent handles applied */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1512 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED 1485 /*! transaction: transaction checkpoint most recent handles skipped */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1513 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED 1486 /*! transaction: transaction checkpoint most recent handles walked */ -#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1514 +#define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED 1487 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1515 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1488 /*! transaction: transaction checkpoint prepare currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1516 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1489 /*! transaction: transaction checkpoint prepare max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1517 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1490 /*! transaction: transaction checkpoint prepare min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1518 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1491 /*! transaction: transaction checkpoint prepare most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1519 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1492 /*! transaction: transaction checkpoint prepare total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1520 +#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1493 /*! transaction: transaction checkpoint scrub dirty target */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1521 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1494 /*! transaction: transaction checkpoint scrub time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1522 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1495 /*! transaction: transaction checkpoint stop timing stress active */ -#define WT_STAT_CONN_TXN_CHECKPOINT_STOP_STRESS_ACTIVE 1523 +#define WT_STAT_CONN_TXN_CHECKPOINT_STOP_STRESS_ACTIVE 1496 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1524 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1497 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1525 +#define WT_STAT_CONN_TXN_CHECKPOINT 1498 /*! transaction: transaction checkpoints due to obsolete pages */ -#define WT_STAT_CONN_TXN_CHECKPOINT_OBSOLETE_APPLIED 1526 +#define WT_STAT_CONN_TXN_CHECKPOINT_OBSOLETE_APPLIED 1499 /*! * transaction: transaction checkpoints skipped because database was * clean */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1527 +#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1500 +/*! transaction: transaction failures due to history store */ +#define WT_STAT_CONN_TXN_FAIL_CACHE 1501 /*! * transaction: transaction fsync calls for checkpoint after allocating * the transaction ID */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1528 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1502 /*! * transaction: transaction fsync duration for checkpoint after * allocating the transaction ID (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1529 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1503 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1530 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1504 /*! transaction: transaction range of IDs currently pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1531 +#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1505 /*! transaction: transaction range of timestamps currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1532 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1506 /*! transaction: transaction range of timestamps pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1533 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1507 /*! * transaction: transaction range of timestamps pinned by the oldest * active read timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1534 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1508 /*! * transaction: transaction range of timestamps pinned by the oldest * timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1535 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1509 /*! transaction: transaction read timestamp of the oldest active reader */ -#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1536 +#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1510 /*! transaction: transaction rollback to stable currently running */ -#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE_RUNNING 1537 +#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE_RUNNING 1511 /*! transaction: transaction walk of concurrent sessions */ -#define WT_STAT_CONN_TXN_WALK_SESSIONS 1538 +#define WT_STAT_CONN_TXN_WALK_SESSIONS 1512 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1539 +#define WT_STAT_CONN_TXN_COMMIT 1513 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1540 +#define WT_STAT_CONN_TXN_ROLLBACK 1514 /*! transaction: update conflicts */ -#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1541 +#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1515 /*! * @} @@ -6543,680 +6447,647 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_DSRC_LSM_MERGE_THROTTLE 2010 /*! LSM: total size of bloom filters */ #define WT_STAT_DSRC_BLOOM_SIZE 2011 -/*! autocommit: retries for readonly operations */ -#define WT_STAT_DSRC_AUTOCOMMIT_READONLY_RETRY 2012 -/*! autocommit: retries for update operations */ -#define WT_STAT_DSRC_AUTOCOMMIT_UPDATE_RETRY 2013 /*! block-manager: allocations requiring file extension */ -#define WT_STAT_DSRC_BLOCK_EXTENSION 2014 +#define WT_STAT_DSRC_BLOCK_EXTENSION 2012 /*! block-manager: blocks allocated */ -#define WT_STAT_DSRC_BLOCK_ALLOC 2015 +#define WT_STAT_DSRC_BLOCK_ALLOC 2013 /*! block-manager: blocks freed */ -#define WT_STAT_DSRC_BLOCK_FREE 2016 +#define WT_STAT_DSRC_BLOCK_FREE 2014 /*! block-manager: checkpoint size */ -#define WT_STAT_DSRC_BLOCK_CHECKPOINT_SIZE 2017 +#define WT_STAT_DSRC_BLOCK_CHECKPOINT_SIZE 2015 /*! block-manager: file allocation unit size */ -#define WT_STAT_DSRC_ALLOCATION_SIZE 2018 +#define WT_STAT_DSRC_ALLOCATION_SIZE 2016 /*! block-manager: file bytes available for reuse */ -#define WT_STAT_DSRC_BLOCK_REUSE_BYTES 2019 +#define WT_STAT_DSRC_BLOCK_REUSE_BYTES 2017 /*! block-manager: file magic number */ -#define WT_STAT_DSRC_BLOCK_MAGIC 2020 +#define WT_STAT_DSRC_BLOCK_MAGIC 2018 /*! block-manager: file major version number */ -#define WT_STAT_DSRC_BLOCK_MAJOR 2021 +#define WT_STAT_DSRC_BLOCK_MAJOR 2019 /*! block-manager: file size in bytes */ -#define WT_STAT_DSRC_BLOCK_SIZE 2022 +#define WT_STAT_DSRC_BLOCK_SIZE 2020 /*! block-manager: minor version number */ -#define WT_STAT_DSRC_BLOCK_MINOR 2023 +#define WT_STAT_DSRC_BLOCK_MINOR 2021 /*! btree: btree checkpoint generation */ -#define WT_STAT_DSRC_BTREE_CHECKPOINT_GENERATION 2024 +#define WT_STAT_DSRC_BTREE_CHECKPOINT_GENERATION 2022 /*! btree: btree clean tree checkpoint expiration time */ -#define WT_STAT_DSRC_BTREE_CLEAN_CHECKPOINT_TIMER 2025 +#define WT_STAT_DSRC_BTREE_CLEAN_CHECKPOINT_TIMER 2023 /*! btree: btree compact pages reviewed */ -#define WT_STAT_DSRC_BTREE_COMPACT_PAGES_REVIEWED 2026 +#define WT_STAT_DSRC_BTREE_COMPACT_PAGES_REVIEWED 2024 /*! btree: btree compact pages rewritten */ -#define WT_STAT_DSRC_BTREE_COMPACT_PAGES_REWRITTEN 2027 +#define WT_STAT_DSRC_BTREE_COMPACT_PAGES_REWRITTEN 2025 /*! btree: btree compact pages skipped */ -#define WT_STAT_DSRC_BTREE_COMPACT_PAGES_SKIPPED 2028 -/*! btree: btree number of pages reconciled during checkpoint */ -#define WT_STAT_DSRC_BTREE_CHECKPOINT_PAGES_RECONCILED 2029 +#define WT_STAT_DSRC_BTREE_COMPACT_PAGES_SKIPPED 2026 /*! btree: btree skipped by compaction as process would not reduce size */ -#define WT_STAT_DSRC_BTREE_COMPACT_SKIPPED 2030 +#define WT_STAT_DSRC_BTREE_COMPACT_SKIPPED 2027 /*! * btree: column-store fixed-size leaf pages, only reported if tree_walk * or all statistics are enabled */ -#define WT_STAT_DSRC_BTREE_COLUMN_FIX 2031 +#define WT_STAT_DSRC_BTREE_COLUMN_FIX 2028 /*! * btree: column-store fixed-size time windows, only reported if * tree_walk or all statistics are enabled */ -#define WT_STAT_DSRC_BTREE_COLUMN_TWS 2032 +#define WT_STAT_DSRC_BTREE_COLUMN_TWS 2029 /*! * btree: column-store internal pages, only reported if tree_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_BTREE_COLUMN_INTERNAL 2033 +#define WT_STAT_DSRC_BTREE_COLUMN_INTERNAL 2030 /*! * btree: column-store variable-size RLE encoded values, only reported if * tree_walk or all statistics are enabled */ -#define WT_STAT_DSRC_BTREE_COLUMN_RLE 2034 +#define WT_STAT_DSRC_BTREE_COLUMN_RLE 2031 /*! * btree: column-store variable-size deleted values, only reported if * tree_walk or all statistics are enabled */ -#define WT_STAT_DSRC_BTREE_COLUMN_DELETED 2035 +#define WT_STAT_DSRC_BTREE_COLUMN_DELETED 2032 /*! * btree: column-store variable-size leaf pages, only reported if * tree_walk or all statistics are enabled */ -#define WT_STAT_DSRC_BTREE_COLUMN_VARIABLE 2036 +#define WT_STAT_DSRC_BTREE_COLUMN_VARIABLE 2033 /*! btree: fixed-record size */ -#define WT_STAT_DSRC_BTREE_FIXED_LEN 2037 +#define WT_STAT_DSRC_BTREE_FIXED_LEN 2034 /*! btree: maximum internal page size */ -#define WT_STAT_DSRC_BTREE_MAXINTLPAGE 2038 +#define WT_STAT_DSRC_BTREE_MAXINTLPAGE 2035 /*! btree: maximum leaf page key size */ -#define WT_STAT_DSRC_BTREE_MAXLEAFKEY 2039 +#define WT_STAT_DSRC_BTREE_MAXLEAFKEY 2036 /*! btree: maximum leaf page size */ -#define WT_STAT_DSRC_BTREE_MAXLEAFPAGE 2040 +#define WT_STAT_DSRC_BTREE_MAXLEAFPAGE 2037 /*! btree: maximum leaf page value size */ -#define WT_STAT_DSRC_BTREE_MAXLEAFVALUE 2041 +#define WT_STAT_DSRC_BTREE_MAXLEAFVALUE 2038 /*! btree: maximum tree depth */ -#define WT_STAT_DSRC_BTREE_MAXIMUM_DEPTH 2042 +#define WT_STAT_DSRC_BTREE_MAXIMUM_DEPTH 2039 /*! * btree: number of key/value pairs, only reported if tree_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_BTREE_ENTRIES 2043 +#define WT_STAT_DSRC_BTREE_ENTRIES 2040 /*! * btree: overflow pages, only reported if tree_walk or all statistics * are enabled */ -#define WT_STAT_DSRC_BTREE_OVERFLOW 2044 +#define WT_STAT_DSRC_BTREE_OVERFLOW 2041 /*! * btree: row-store empty values, only reported if tree_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_BTREE_ROW_EMPTY_VALUES 2045 +#define WT_STAT_DSRC_BTREE_ROW_EMPTY_VALUES 2042 /*! * btree: row-store internal pages, only reported if tree_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_BTREE_ROW_INTERNAL 2046 +#define WT_STAT_DSRC_BTREE_ROW_INTERNAL 2043 /*! * btree: row-store leaf pages, only reported if tree_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_BTREE_ROW_LEAF 2047 +#define WT_STAT_DSRC_BTREE_ROW_LEAF 2044 /*! cache: bytes currently in the cache */ -#define WT_STAT_DSRC_CACHE_BYTES_INUSE 2048 +#define WT_STAT_DSRC_CACHE_BYTES_INUSE 2045 /*! cache: bytes dirty in the cache cumulative */ -#define WT_STAT_DSRC_CACHE_BYTES_DIRTY_TOTAL 2049 +#define WT_STAT_DSRC_CACHE_BYTES_DIRTY_TOTAL 2046 /*! cache: bytes read into cache */ -#define WT_STAT_DSRC_CACHE_BYTES_READ 2050 +#define WT_STAT_DSRC_CACHE_BYTES_READ 2047 /*! cache: bytes written from cache */ -#define WT_STAT_DSRC_CACHE_BYTES_WRITE 2051 +#define WT_STAT_DSRC_CACHE_BYTES_WRITE 2048 /*! cache: checkpoint blocked page eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_CHECKPOINT 2052 +#define WT_STAT_DSRC_CACHE_EVICTION_CHECKPOINT 2049 /*! * cache: checkpoint of history store file blocked non-history store page * eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_CHECKPOINT_HS 2053 +#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_CHECKPOINT_HS 2050 /*! cache: data source pages selected for eviction unable to be evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_FAIL 2054 +#define WT_STAT_DSRC_CACHE_EVICTION_FAIL 2051 /*! * cache: eviction gave up due to detecting an out of order on disk value * behind the last update on the chain */ -#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_1 2055 +#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_1 2052 /*! * cache: eviction gave up due to detecting an out of order tombstone * ahead of the selected on disk update */ -#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_2 2056 +#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_2 2053 /*! * cache: eviction gave up due to detecting an out of order tombstone * ahead of the selected on disk update after validating the update chain */ -#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_3 2057 +#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_3 2054 /*! * cache: eviction gave up due to detecting out of order timestamps on * the update chain after the selected on disk update */ -#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_4 2058 -/*! - * cache: eviction gave up due to needing to remove a record from the - * history store but checkpoint is running - */ -#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_REMOVE_HS_RACE_WITH_CHECKPOINT 2059 +#define WT_STAT_DSRC_CACHE_EVICTION_BLOCKED_OOO_CHECKPOINT_RACE_4 2055 /*! cache: eviction walk passes of a file */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALK_PASSES 2060 +#define WT_STAT_DSRC_CACHE_EVICTION_WALK_PASSES 2056 /*! cache: eviction walk target pages histogram - 0-9 */ -#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT10 2061 +#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT10 2057 /*! cache: eviction walk target pages histogram - 10-31 */ -#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT32 2062 +#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT32 2058 /*! cache: eviction walk target pages histogram - 128 and higher */ -#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_GE128 2063 +#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_GE128 2059 /*! cache: eviction walk target pages histogram - 32-63 */ -#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT64 2064 +#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT64 2060 /*! cache: eviction walk target pages histogram - 64-128 */ -#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT128 2065 +#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT128 2061 /*! * cache: eviction walk target pages reduced due to history store cache * pressure */ -#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_REDUCED 2066 +#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_REDUCED 2062 /*! cache: eviction walks abandoned */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ABANDONED 2067 +#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ABANDONED 2063 /*! cache: eviction walks gave up because they restarted their walk twice */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_STOPPED 2068 +#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_STOPPED 2064 /*! * cache: eviction walks gave up because they saw too many pages and * found no candidates */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 2069 +#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 2065 /*! * cache: eviction walks gave up because they saw too many pages and * found too few candidates */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 2070 -/*! - * cache: eviction walks random search fails to locate a page, results in - * a null position - */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALK_RANDOM_RETURNS_NULL_POSITION 2071 +#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 2066 /*! cache: eviction walks reached end of tree */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ENDED 2072 +#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ENDED 2067 /*! cache: eviction walks restarted */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALK_RESTART 2073 +#define WT_STAT_DSRC_CACHE_EVICTION_WALK_RESTART 2068 /*! cache: eviction walks started from root of tree */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALK_FROM_ROOT 2074 +#define WT_STAT_DSRC_CACHE_EVICTION_WALK_FROM_ROOT 2069 /*! cache: eviction walks started from saved location in tree */ -#define WT_STAT_DSRC_CACHE_EVICTION_WALK_SAVED_POS 2075 +#define WT_STAT_DSRC_CACHE_EVICTION_WALK_SAVED_POS 2070 /*! cache: hazard pointer blocked page eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_HAZARD 2076 +#define WT_STAT_DSRC_CACHE_EVICTION_HAZARD 2071 /*! cache: history store table insert calls */ -#define WT_STAT_DSRC_CACHE_HS_INSERT 2077 +#define WT_STAT_DSRC_CACHE_HS_INSERT 2072 /*! cache: history store table insert calls that returned restart */ -#define WT_STAT_DSRC_CACHE_HS_INSERT_RESTART 2078 +#define WT_STAT_DSRC_CACHE_HS_INSERT_RESTART 2073 /*! * cache: history store table out-of-order resolved updates that lose * their durable timestamp */ -#define WT_STAT_DSRC_CACHE_HS_ORDER_LOSE_DURABLE_TIMESTAMP 2079 +#define WT_STAT_DSRC_CACHE_HS_ORDER_LOSE_DURABLE_TIMESTAMP 2074 /*! * cache: history store table out-of-order updates that were fixed up by * reinserting with the fixed timestamp */ -#define WT_STAT_DSRC_CACHE_HS_ORDER_REINSERT 2080 +#define WT_STAT_DSRC_CACHE_HS_ORDER_REINSERT 2075 /*! cache: history store table reads */ -#define WT_STAT_DSRC_CACHE_HS_READ 2081 +#define WT_STAT_DSRC_CACHE_HS_READ 2076 /*! cache: history store table reads missed */ -#define WT_STAT_DSRC_CACHE_HS_READ_MISS 2082 +#define WT_STAT_DSRC_CACHE_HS_READ_MISS 2077 /*! cache: history store table reads requiring squashed modifies */ -#define WT_STAT_DSRC_CACHE_HS_READ_SQUASH 2083 +#define WT_STAT_DSRC_CACHE_HS_READ_SQUASH 2078 /*! * cache: history store table truncation by rollback to stable to remove * an unstable update */ -#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_RTS_UNSTABLE 2084 +#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_RTS_UNSTABLE 2079 /*! * cache: history store table truncation by rollback to stable to remove * an update */ -#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_RTS 2085 +#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_RTS 2080 /*! cache: history store table truncation to remove an update */ -#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE 2086 +#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE 2081 /*! * cache: history store table truncation to remove range of updates due * to key being removed from the data page during reconciliation */ -#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL 2087 +#define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL 2082 /*! * cache: history store table truncation to remove range of updates due * to out-of-order timestamp update on data page */ -#define WT_STAT_DSRC_CACHE_HS_ORDER_REMOVE 2088 +#define WT_STAT_DSRC_CACHE_HS_ORDER_REMOVE 2083 /*! cache: history store table writes requiring squashed modifies */ -#define WT_STAT_DSRC_CACHE_HS_WRITE_SQUASH 2089 +#define WT_STAT_DSRC_CACHE_HS_WRITE_SQUASH 2084 /*! cache: in-memory page passed criteria to be split */ -#define WT_STAT_DSRC_CACHE_INMEM_SPLITTABLE 2090 +#define WT_STAT_DSRC_CACHE_INMEM_SPLITTABLE 2085 /*! cache: in-memory page splits */ -#define WT_STAT_DSRC_CACHE_INMEM_SPLIT 2091 +#define WT_STAT_DSRC_CACHE_INMEM_SPLIT 2086 /*! cache: internal pages evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_INTERNAL 2092 +#define WT_STAT_DSRC_CACHE_EVICTION_INTERNAL 2087 /*! cache: internal pages split during eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_INTERNAL 2093 +#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_INTERNAL 2088 /*! cache: leaf pages split during eviction */ -#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_LEAF 2094 -/*! - * cache: locate a random in-mem ref by examining all entries on the root - * page - */ -#define WT_STAT_DSRC_CACHE_EVICTION_RANDOM_SAMPLE_INMEM_ROOT 2095 +#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_LEAF 2089 /*! cache: modified pages evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_DIRTY 2096 +#define WT_STAT_DSRC_CACHE_EVICTION_DIRTY 2090 /*! cache: overflow pages read into cache */ -#define WT_STAT_DSRC_CACHE_READ_OVERFLOW 2097 +#define WT_STAT_DSRC_CACHE_READ_OVERFLOW 2091 /*! cache: page split during eviction deepened the tree */ -#define WT_STAT_DSRC_CACHE_EVICTION_DEEPEN 2098 +#define WT_STAT_DSRC_CACHE_EVICTION_DEEPEN 2092 /*! cache: page written requiring history store records */ -#define WT_STAT_DSRC_CACHE_WRITE_HS 2099 +#define WT_STAT_DSRC_CACHE_WRITE_HS 2093 /*! cache: pages read into cache */ -#define WT_STAT_DSRC_CACHE_READ 2100 +#define WT_STAT_DSRC_CACHE_READ 2094 /*! cache: pages read into cache after truncate */ -#define WT_STAT_DSRC_CACHE_READ_DELETED 2101 +#define WT_STAT_DSRC_CACHE_READ_DELETED 2095 /*! cache: pages read into cache after truncate in prepare state */ -#define WT_STAT_DSRC_CACHE_READ_DELETED_PREPARED 2102 +#define WT_STAT_DSRC_CACHE_READ_DELETED_PREPARED 2096 /*! cache: pages requested from the cache */ -#define WT_STAT_DSRC_CACHE_PAGES_REQUESTED 2103 +#define WT_STAT_DSRC_CACHE_PAGES_REQUESTED 2097 /*! cache: pages seen by eviction walk */ -#define WT_STAT_DSRC_CACHE_EVICTION_PAGES_SEEN 2104 +#define WT_STAT_DSRC_CACHE_EVICTION_PAGES_SEEN 2098 /*! cache: pages written from cache */ -#define WT_STAT_DSRC_CACHE_WRITE 2105 +#define WT_STAT_DSRC_CACHE_WRITE 2099 /*! cache: pages written requiring in-memory restoration */ -#define WT_STAT_DSRC_CACHE_WRITE_RESTORE 2106 +#define WT_STAT_DSRC_CACHE_WRITE_RESTORE 2100 /*! cache: the number of times full update inserted to history store */ -#define WT_STAT_DSRC_CACHE_HS_INSERT_FULL_UPDATE 2107 +#define WT_STAT_DSRC_CACHE_HS_INSERT_FULL_UPDATE 2101 /*! cache: the number of times reverse modify inserted to history store */ -#define WT_STAT_DSRC_CACHE_HS_INSERT_REVERSE_MODIFY 2108 +#define WT_STAT_DSRC_CACHE_HS_INSERT_REVERSE_MODIFY 2102 /*! cache: tracked dirty bytes in the cache */ -#define WT_STAT_DSRC_CACHE_BYTES_DIRTY 2109 +#define WT_STAT_DSRC_CACHE_BYTES_DIRTY 2103 /*! cache: unmodified pages evicted */ -#define WT_STAT_DSRC_CACHE_EVICTION_CLEAN 2110 +#define WT_STAT_DSRC_CACHE_EVICTION_CLEAN 2104 /*! * cache_walk: Average difference between current eviction generation * when the page was last considered, only reported if cache_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_GEN_AVG_GAP 2111 +#define WT_STAT_DSRC_CACHE_STATE_GEN_AVG_GAP 2105 /*! * cache_walk: Average on-disk page image size seen, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_AVG_WRITTEN_SIZE 2112 +#define WT_STAT_DSRC_CACHE_STATE_AVG_WRITTEN_SIZE 2106 /*! * cache_walk: Average time in cache for pages that have been visited by * the eviction server, only reported if cache_walk or all statistics are * enabled */ -#define WT_STAT_DSRC_CACHE_STATE_AVG_VISITED_AGE 2113 +#define WT_STAT_DSRC_CACHE_STATE_AVG_VISITED_AGE 2107 /*! * cache_walk: Average time in cache for pages that have not been visited * by the eviction server, only reported if cache_walk or all statistics * are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_AVG_UNVISITED_AGE 2114 +#define WT_STAT_DSRC_CACHE_STATE_AVG_UNVISITED_AGE 2108 /*! * cache_walk: Clean pages currently in cache, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_PAGES_CLEAN 2115 +#define WT_STAT_DSRC_CACHE_STATE_PAGES_CLEAN 2109 /*! * cache_walk: Current eviction generation, only reported if cache_walk * or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_GEN_CURRENT 2116 +#define WT_STAT_DSRC_CACHE_STATE_GEN_CURRENT 2110 /*! * cache_walk: Dirty pages currently in cache, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_PAGES_DIRTY 2117 +#define WT_STAT_DSRC_CACHE_STATE_PAGES_DIRTY 2111 /*! * cache_walk: Entries in the root page, only reported if cache_walk or * all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_ROOT_ENTRIES 2118 +#define WT_STAT_DSRC_CACHE_STATE_ROOT_ENTRIES 2112 /*! * cache_walk: Internal pages currently in cache, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_PAGES_INTERNAL 2119 +#define WT_STAT_DSRC_CACHE_STATE_PAGES_INTERNAL 2113 /*! * cache_walk: Leaf pages currently in cache, only reported if cache_walk * or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_PAGES_LEAF 2120 +#define WT_STAT_DSRC_CACHE_STATE_PAGES_LEAF 2114 /*! * cache_walk: Maximum difference between current eviction generation * when the page was last considered, only reported if cache_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_GEN_MAX_GAP 2121 +#define WT_STAT_DSRC_CACHE_STATE_GEN_MAX_GAP 2115 /*! * cache_walk: Maximum page size seen, only reported if cache_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_MAX_PAGESIZE 2122 +#define WT_STAT_DSRC_CACHE_STATE_MAX_PAGESIZE 2116 /*! * cache_walk: Minimum on-disk page image size seen, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_MIN_WRITTEN_SIZE 2123 +#define WT_STAT_DSRC_CACHE_STATE_MIN_WRITTEN_SIZE 2117 /*! * cache_walk: Number of pages never visited by eviction server, only * reported if cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_UNVISITED_COUNT 2124 +#define WT_STAT_DSRC_CACHE_STATE_UNVISITED_COUNT 2118 /*! * cache_walk: On-disk page image sizes smaller than a single allocation * unit, only reported if cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_SMALLER_ALLOC_SIZE 2125 +#define WT_STAT_DSRC_CACHE_STATE_SMALLER_ALLOC_SIZE 2119 /*! * cache_walk: Pages created in memory and never written, only reported * if cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_MEMORY 2126 +#define WT_STAT_DSRC_CACHE_STATE_MEMORY 2120 /*! * cache_walk: Pages currently queued for eviction, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_QUEUED 2127 +#define WT_STAT_DSRC_CACHE_STATE_QUEUED 2121 /*! * cache_walk: Pages that could not be queued for eviction, only reported * if cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_NOT_QUEUEABLE 2128 +#define WT_STAT_DSRC_CACHE_STATE_NOT_QUEUEABLE 2122 /*! * cache_walk: Refs skipped during cache traversal, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_REFS_SKIPPED 2129 +#define WT_STAT_DSRC_CACHE_STATE_REFS_SKIPPED 2123 /*! * cache_walk: Size of the root page, only reported if cache_walk or all * statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_ROOT_SIZE 2130 +#define WT_STAT_DSRC_CACHE_STATE_ROOT_SIZE 2124 /*! * cache_walk: Total number of pages currently in cache, only reported if * cache_walk or all statistics are enabled */ -#define WT_STAT_DSRC_CACHE_STATE_PAGES 2131 +#define WT_STAT_DSRC_CACHE_STATE_PAGES 2125 /*! checkpoint-cleanup: pages added for eviction */ -#define WT_STAT_DSRC_CC_PAGES_EVICT 2132 +#define WT_STAT_DSRC_CC_PAGES_EVICT 2126 /*! checkpoint-cleanup: pages removed */ -#define WT_STAT_DSRC_CC_PAGES_REMOVED 2133 +#define WT_STAT_DSRC_CC_PAGES_REMOVED 2127 /*! checkpoint-cleanup: pages skipped during tree walk */ -#define WT_STAT_DSRC_CC_PAGES_WALK_SKIPPED 2134 +#define WT_STAT_DSRC_CC_PAGES_WALK_SKIPPED 2128 /*! checkpoint-cleanup: pages visited */ -#define WT_STAT_DSRC_CC_PAGES_VISITED 2135 +#define WT_STAT_DSRC_CC_PAGES_VISITED 2129 /*! * compression: compressed page maximum internal page size prior to * compression */ -#define WT_STAT_DSRC_COMPRESS_PRECOMP_INTL_MAX_PAGE_SIZE 2136 +#define WT_STAT_DSRC_COMPRESS_PRECOMP_INTL_MAX_PAGE_SIZE 2130 /*! * compression: compressed page maximum leaf page size prior to * compression */ -#define WT_STAT_DSRC_COMPRESS_PRECOMP_LEAF_MAX_PAGE_SIZE 2137 +#define WT_STAT_DSRC_COMPRESS_PRECOMP_LEAF_MAX_PAGE_SIZE 2131 /*! compression: compressed pages read */ -#define WT_STAT_DSRC_COMPRESS_READ 2138 +#define WT_STAT_DSRC_COMPRESS_READ 2132 /*! compression: compressed pages written */ -#define WT_STAT_DSRC_COMPRESS_WRITE 2139 +#define WT_STAT_DSRC_COMPRESS_WRITE 2133 /*! compression: number of blocks with compress ratio greater than 64 */ -#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_MAX 2140 +#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_MAX 2134 /*! compression: number of blocks with compress ratio smaller than 16 */ -#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_16 2141 +#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_16 2135 /*! compression: number of blocks with compress ratio smaller than 2 */ -#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_2 2142 +#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_2 2136 /*! compression: number of blocks with compress ratio smaller than 32 */ -#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_32 2143 +#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_32 2137 /*! compression: number of blocks with compress ratio smaller than 4 */ -#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_4 2144 +#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_4 2138 /*! compression: number of blocks with compress ratio smaller than 64 */ -#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_64 2145 +#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_64 2139 /*! compression: number of blocks with compress ratio smaller than 8 */ -#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_8 2146 +#define WT_STAT_DSRC_COMPRESS_HIST_RATIO_8 2140 /*! compression: page written failed to compress */ -#define WT_STAT_DSRC_COMPRESS_WRITE_FAIL 2147 +#define WT_STAT_DSRC_COMPRESS_WRITE_FAIL 2141 /*! compression: page written was too small to compress */ -#define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL 2148 -/*! cursor: Total number of deleted pages skipped during tree walk */ -#define WT_STAT_DSRC_CURSOR_TREE_WALK_DEL_PAGE_SKIP 2149 +#define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL 2142 /*! cursor: Total number of entries skipped by cursor next calls */ -#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_TOTAL 2150 +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_TOTAL 2143 /*! cursor: Total number of entries skipped by cursor prev calls */ -#define WT_STAT_DSRC_CURSOR_PREV_SKIP_TOTAL 2151 +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_TOTAL 2144 /*! * cursor: Total number of entries skipped to position the history store * cursor */ -#define WT_STAT_DSRC_CURSOR_SKIP_HS_CUR_POSITION 2152 -/*! - * cursor: Total number of in-memory deleted pages skipped during tree - * walk - */ -#define WT_STAT_DSRC_CURSOR_TREE_WALK_INMEM_DEL_PAGE_SKIP 2153 +#define WT_STAT_DSRC_CURSOR_SKIP_HS_CUR_POSITION 2145 /*! * cursor: Total number of times a search near has exited due to prefix * config */ -#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR_PREFIX_FAST_PATHS 2154 +#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR_PREFIX_FAST_PATHS 2146 /*! cursor: bulk loaded cursor insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2155 +#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2147 /*! cursor: cache cursors reuse count */ -#define WT_STAT_DSRC_CURSOR_REOPEN 2156 +#define WT_STAT_DSRC_CURSOR_REOPEN 2148 /*! cursor: close calls that result in cache */ -#define WT_STAT_DSRC_CURSOR_CACHE 2157 +#define WT_STAT_DSRC_CURSOR_CACHE 2149 /*! cursor: create calls */ -#define WT_STAT_DSRC_CURSOR_CREATE 2158 +#define WT_STAT_DSRC_CURSOR_CREATE 2150 /*! * cursor: cursor next calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_DSRC_CURSOR_NEXT_HS_TOMBSTONE 2159 +#define WT_STAT_DSRC_CURSOR_NEXT_HS_TOMBSTONE 2151 /*! * cursor: cursor next calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100 2160 +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100 2152 /*! cursor: cursor next calls that skip less than 100 entries */ -#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100 2161 +#define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100 2153 /*! * cursor: cursor prev calls that skip due to a globally visible history * store tombstone */ -#define WT_STAT_DSRC_CURSOR_PREV_HS_TOMBSTONE 2162 +#define WT_STAT_DSRC_CURSOR_PREV_HS_TOMBSTONE 2154 /*! * cursor: cursor prev calls that skip greater than or equal to 100 * entries */ -#define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100 2163 +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100 2155 /*! cursor: cursor prev calls that skip less than 100 entries */ -#define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100 2164 +#define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100 2156 /*! cursor: insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT 2165 +#define WT_STAT_DSRC_CURSOR_INSERT 2157 /*! cursor: insert key and value bytes */ -#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2166 +#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2158 /*! cursor: modify */ -#define WT_STAT_DSRC_CURSOR_MODIFY 2167 +#define WT_STAT_DSRC_CURSOR_MODIFY 2159 /*! cursor: modify key and value bytes affected */ -#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2168 +#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES 2160 /*! cursor: modify value bytes modified */ -#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2169 +#define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH 2161 /*! cursor: next calls */ -#define WT_STAT_DSRC_CURSOR_NEXT 2170 +#define WT_STAT_DSRC_CURSOR_NEXT 2162 /*! cursor: open cursor count */ -#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2171 +#define WT_STAT_DSRC_CURSOR_OPEN_COUNT 2163 /*! cursor: operation restarted */ -#define WT_STAT_DSRC_CURSOR_RESTART 2172 +#define WT_STAT_DSRC_CURSOR_RESTART 2164 /*! cursor: prev calls */ -#define WT_STAT_DSRC_CURSOR_PREV 2173 +#define WT_STAT_DSRC_CURSOR_PREV 2165 /*! cursor: remove calls */ -#define WT_STAT_DSRC_CURSOR_REMOVE 2174 +#define WT_STAT_DSRC_CURSOR_REMOVE 2166 /*! cursor: remove key bytes removed */ -#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2175 +#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2167 /*! cursor: reserve calls */ -#define WT_STAT_DSRC_CURSOR_RESERVE 2176 +#define WT_STAT_DSRC_CURSOR_RESERVE 2168 /*! cursor: reset calls */ -#define WT_STAT_DSRC_CURSOR_RESET 2177 +#define WT_STAT_DSRC_CURSOR_RESET 2169 /*! cursor: search calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH 2178 +#define WT_STAT_DSRC_CURSOR_SEARCH 2170 /*! cursor: search history store calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH_HS 2179 +#define WT_STAT_DSRC_CURSOR_SEARCH_HS 2171 /*! cursor: search near calls */ -#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2180 +#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2172 /*! cursor: truncate calls */ -#define WT_STAT_DSRC_CURSOR_TRUNCATE 2181 +#define WT_STAT_DSRC_CURSOR_TRUNCATE 2173 /*! cursor: update calls */ -#define WT_STAT_DSRC_CURSOR_UPDATE 2182 +#define WT_STAT_DSRC_CURSOR_UPDATE 2174 /*! cursor: update key and value bytes */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2183 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2175 /*! cursor: update value size change */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2184 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED 2176 /*! reconciliation: approximate byte size of timestamps in pages written */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2185 +#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS 2177 /*! * reconciliation: approximate byte size of transaction IDs in pages * written */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2186 +#define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN 2178 /*! reconciliation: dictionary matches */ -#define WT_STAT_DSRC_REC_DICTIONARY 2187 +#define WT_STAT_DSRC_REC_DICTIONARY 2179 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2188 +#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2180 /*! * reconciliation: internal page key bytes discarded using suffix * compression */ -#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2189 +#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2181 /*! reconciliation: internal page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2190 +#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2182 /*! reconciliation: leaf page key bytes discarded using prefix compression */ -#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2191 +#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2183 /*! reconciliation: leaf page multi-block writes */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2192 +#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2184 /*! reconciliation: leaf-page overflow keys */ -#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2193 +#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2185 /*! reconciliation: maximum blocks required for a page */ -#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2194 +#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2186 /*! reconciliation: overflow values written */ -#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2195 +#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2187 +/*! reconciliation: page checksum matches */ +#define WT_STAT_DSRC_REC_PAGE_MATCH 2188 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_DSRC_REC_PAGES 2196 +#define WT_STAT_DSRC_REC_PAGES 2189 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_DSRC_REC_PAGES_EVICTION 2197 +#define WT_STAT_DSRC_REC_PAGES_EVICTION 2190 /*! reconciliation: pages deleted */ -#define WT_STAT_DSRC_REC_PAGE_DELETE 2198 +#define WT_STAT_DSRC_REC_PAGE_DELETE 2191 /*! * reconciliation: pages written including an aggregated newest start * durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2199 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS 2192 /*! * reconciliation: pages written including an aggregated newest stop * durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2200 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS 2193 /*! * reconciliation: pages written including an aggregated newest stop * timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2201 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS 2194 /*! * reconciliation: pages written including an aggregated newest stop * transaction ID */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2202 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN 2195 /*! * reconciliation: pages written including an aggregated newest * transaction ID */ -#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_TXN 2203 +#define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_TXN 2196 /*! * reconciliation: pages written including an aggregated oldest start * timestamp */ -#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2204 +#define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS 2197 /*! reconciliation: pages written including an aggregated prepare */ -#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2205 +#define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED 2198 /*! reconciliation: pages written including at least one prepare */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2206 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2199 /*! * reconciliation: pages written including at least one start durable * timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2207 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2200 /*! reconciliation: pages written including at least one start timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2208 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2201 /*! * reconciliation: pages written including at least one start transaction * ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2209 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN 2202 /*! * reconciliation: pages written including at least one stop durable * timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2210 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS 2203 /*! reconciliation: pages written including at least one stop timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2211 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS 2204 /*! * reconciliation: pages written including at least one stop transaction * ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2212 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2205 /*! reconciliation: records written including a prepare */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2213 +#define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED 2206 /*! reconciliation: records written including a start durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2214 +#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS 2207 /*! reconciliation: records written including a start timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2215 +#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS 2208 /*! reconciliation: records written including a start transaction ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2216 +#define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN 2209 /*! reconciliation: records written including a stop durable timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2217 +#define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS 2210 /*! reconciliation: records written including a stop timestamp */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2218 +#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS 2211 /*! reconciliation: records written including a stop transaction ID */ -#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2219 +#define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN 2212 /*! session: object compaction */ -#define WT_STAT_DSRC_SESSION_COMPACT 2220 +#define WT_STAT_DSRC_SESSION_COMPACT 2213 /*! session: tiered operations dequeued and processed */ -#define WT_STAT_DSRC_TIERED_WORK_UNITS_DEQUEUED 2221 +#define WT_STAT_DSRC_TIERED_WORK_UNITS_DEQUEUED 2214 /*! session: tiered operations scheduled */ -#define WT_STAT_DSRC_TIERED_WORK_UNITS_CREATED 2222 +#define WT_STAT_DSRC_TIERED_WORK_UNITS_CREATED 2215 /*! session: tiered storage local retention time (secs) */ -#define WT_STAT_DSRC_TIERED_RETENTION 2223 -/*! - * transaction: a reader raced with a prepared transaction commit and - * skipped an update or updates - */ -#define WT_STAT_DSRC_TXN_READ_RACE_PREPARE_COMMIT 2224 -/*! transaction: checkpoint has acquired a snapshot for its transaction */ -#define WT_STAT_DSRC_TXN_CHECKPOINT_SNAPSHOT_ACQUIRED 2225 +#define WT_STAT_DSRC_TIERED_RETENTION 2216 /*! transaction: race to read prepared update retry */ -#define WT_STAT_DSRC_TXN_READ_RACE_PREPARE_UPDATE 2226 +#define WT_STAT_DSRC_TXN_READ_RACE_PREPARE_UPDATE 2217 /*! * transaction: rollback to stable history store records with stop * timestamps older than newer records */ -#define WT_STAT_DSRC_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 2227 +#define WT_STAT_DSRC_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 2218 /*! transaction: rollback to stable inconsistent checkpoint */ -#define WT_STAT_DSRC_TXN_RTS_INCONSISTENT_CKPT 2228 +#define WT_STAT_DSRC_TXN_RTS_INCONSISTENT_CKPT 2219 /*! transaction: rollback to stable keys removed */ -#define WT_STAT_DSRC_TXN_RTS_KEYS_REMOVED 2229 +#define WT_STAT_DSRC_TXN_RTS_KEYS_REMOVED 2220 /*! transaction: rollback to stable keys restored */ -#define WT_STAT_DSRC_TXN_RTS_KEYS_RESTORED 2230 +#define WT_STAT_DSRC_TXN_RTS_KEYS_RESTORED 2221 /*! transaction: rollback to stable restored tombstones from history store */ -#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_TOMBSTONES 2231 +#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_TOMBSTONES 2222 /*! transaction: rollback to stable restored updates from history store */ -#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_UPDATES 2232 +#define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_UPDATES 2223 /*! transaction: rollback to stable skipping delete rle */ -#define WT_STAT_DSRC_TXN_RTS_DELETE_RLE_SKIPPED 2233 +#define WT_STAT_DSRC_TXN_RTS_DELETE_RLE_SKIPPED 2224 /*! transaction: rollback to stable skipping stable rle */ -#define WT_STAT_DSRC_TXN_RTS_STABLE_RLE_SKIPPED 2234 +#define WT_STAT_DSRC_TXN_RTS_STABLE_RLE_SKIPPED 2225 /*! transaction: rollback to stable sweeping history store keys */ -#define WT_STAT_DSRC_TXN_RTS_SWEEP_HS_KEYS 2235 +#define WT_STAT_DSRC_TXN_RTS_SWEEP_HS_KEYS 2226 /*! transaction: rollback to stable updates removed from history store */ -#define WT_STAT_DSRC_TXN_RTS_HS_REMOVED 2236 +#define WT_STAT_DSRC_TXN_RTS_HS_REMOVED 2227 /*! transaction: transaction checkpoints due to obsolete pages */ -#define WT_STAT_DSRC_TXN_CHECKPOINT_OBSOLETE_APPLIED 2237 +#define WT_STAT_DSRC_TXN_CHECKPOINT_OBSOLETE_APPLIED 2228 /*! transaction: update conflicts */ -#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2238 +#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2229 /*! * @} @@ -7247,16 +7118,14 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_SESSION_BYTES_WRITE 4001 /*! session: dhandle lock wait time (usecs) */ #define WT_STAT_SESSION_LOCK_DHANDLE_WAIT 4002 -/*! session: dirty bytes in this txn */ -#define WT_STAT_SESSION_TXN_BYTES_DIRTY 4003 /*! session: page read from disk to cache time (usecs) */ -#define WT_STAT_SESSION_READ_TIME 4004 +#define WT_STAT_SESSION_READ_TIME 4003 /*! session: page write from cache to disk time (usecs) */ -#define WT_STAT_SESSION_WRITE_TIME 4005 +#define WT_STAT_SESSION_WRITE_TIME 4004 /*! session: schema lock wait time (usecs) */ -#define WT_STAT_SESSION_LOCK_SCHEMA_WAIT 4006 +#define WT_STAT_SESSION_LOCK_SCHEMA_WAIT 4005 /*! session: time waiting for cache (usecs) */ -#define WT_STAT_SESSION_CACHE_TIME 4007 +#define WT_STAT_SESSION_CACHE_TIME 4006 /*! @} */ /* * Statistics section: END diff --git a/src/third_party/wiredtiger/src/include/wt_internal.h b/src/third_party/wiredtiger/src/include/wt_internal.h index c5d445e1804..1fa544ab841 100644 --- a/src/third_party/wiredtiger/src/include/wt_internal.h +++ b/src/third_party/wiredtiger/src/include/wt_internal.h @@ -185,8 +185,6 @@ struct __wt_data_handle; typedef struct __wt_data_handle WT_DATA_HANDLE; struct __wt_data_handle_cache; typedef struct __wt_data_handle_cache WT_DATA_HANDLE_CACHE; -struct __wt_delete_hs_upd; -typedef struct __wt_delete_hs_upd WT_DELETE_HS_UPD; struct __wt_dlh; typedef struct __wt_dlh WT_DLH; struct __wt_dsrc_stats; @@ -195,8 +193,6 @@ struct __wt_evict_entry; typedef struct __wt_evict_entry WT_EVICT_ENTRY; struct __wt_evict_queue; typedef struct __wt_evict_queue WT_EVICT_QUEUE; -struct __wt_evict_timeline; -typedef struct __wt_evict_timeline WT_EVICT_TIMELINE; struct __wt_ext; typedef struct __wt_ext WT_EXT; struct __wt_extlist; @@ -291,8 +287,6 @@ struct __wt_page_index; typedef struct __wt_page_index WT_PAGE_INDEX; struct __wt_page_modify; typedef struct __wt_page_modify WT_PAGE_MODIFY; -struct __wt_page_walk_skip_stats; -typedef struct __wt_page_walk_skip_stats WT_PAGE_WALK_SKIP_STATS; struct __wt_process; typedef struct __wt_process WT_PROCESS; struct __wt_rec_chunk; @@ -303,10 +297,6 @@ struct __wt_rec_kv; typedef struct __wt_rec_kv WT_REC_KV; struct __wt_reconcile; typedef struct __wt_reconcile WT_RECONCILE; -struct __wt_reconcile_timeline; -typedef struct __wt_reconcile_timeline WT_RECONCILE_TIMELINE; -struct __wt_recovery_timeline; -typedef struct __wt_recovery_timeline WT_RECOVERY_TIMELINE; struct __wt_ref; typedef struct __wt_ref WT_REF; struct __wt_ref_hist; @@ -327,8 +317,6 @@ struct __wt_session_stash; typedef struct __wt_session_stash WT_SESSION_STASH; struct __wt_session_stats; typedef struct __wt_session_stats WT_SESSION_STATS; -struct __wt_shutdown_timeline; -typedef struct __wt_shutdown_timeline WT_SHUTDOWN_TIMELINE; struct __wt_size; typedef struct __wt_size WT_SIZE; struct __wt_spinlock; @@ -367,8 +355,6 @@ struct __wt_txn_printlog_args; typedef struct __wt_txn_printlog_args WT_TXN_PRINTLOG_ARGS; struct __wt_txn_shared; typedef struct __wt_txn_shared WT_TXN_SHARED; -struct __wt_txn_snapshot; -typedef struct __wt_txn_snapshot WT_TXN_SNAPSHOT; struct __wt_update; typedef struct __wt_update WT_UPDATE; struct __wt_update_value; @@ -384,7 +370,6 @@ typedef union __wt_lsn WT_LSN; union __wt_rand_state; typedef union __wt_rand_state WT_RAND_STATE; -typedef struct timespec WT_TIMER; typedef uint64_t wt_timestamp_t; /* diff --git a/src/third_party/wiredtiger/src/log/log.c b/src/third_party/wiredtiger/src/log/log.c index c78e7ed8533..51f05371f62 100644 --- a/src/third_party/wiredtiger/src/log/log.c +++ b/src/third_party/wiredtiger/src/log/log.c @@ -600,8 +600,7 @@ __log_prealloc(WT_SESSION_IMPL *session, WT_FH *fh) /* * We have exclusive access to the log file and there are no other writes happening - * concurrently, so there are no locking issues. We don't need to worry about hot backup because - * logging never reduces the length of the file in pre-allocate. + * concurrently, so there are no locking issues. */ ret = __wt_fextend(session, fh, conn->log_extend_len); return (ret == EBUSY || ret == ENOTSUP ? 0 : ret); @@ -1319,7 +1318,7 @@ __wt_log_acquire(WT_SESSION_IMPL *session, uint64_t recsize, WT_LOGSLOT *slot) WT_RET(__log_newfile(session, false, &created_log)); F_CLR(log, WT_LOG_FORCE_NEWFILE); if (log->log_close_fh != NULL) - F_SET_ATOMIC_16(slot, WT_SLOT_CLOSEFH); + F_SET(slot, WT_SLOT_CLOSEFH); } /* @@ -1881,7 +1880,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) * the worker thread. The caller is responsible for freeing the slot in that case. Otherwise the * worker thread will free it. */ - if (!F_ISSET_ATOMIC_16(slot, WT_SLOT_FLUSH | WT_SLOT_SYNC_FLAGS)) { + if (!F_ISSET(slot, WT_SLOT_FLUSH | WT_SLOT_SYNC_FLAGS)) { if (freep != NULL) *freep = 0; slot->slot_state = WT_LOG_SLOT_WRITTEN; @@ -1908,15 +1907,15 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) WT_ASSERT(session, slot != log->active_slot); __wt_cond_signal(session, log->log_write_cond); - F_CLR_ATOMIC_16(slot, WT_SLOT_FLUSH); + F_CLR(slot, WT_SLOT_FLUSH); /* * Signal the close thread if needed. */ - if (F_ISSET_ATOMIC_16(slot, WT_SLOT_CLOSEFH)) + if (F_ISSET(slot, WT_SLOT_CLOSEFH)) __wt_cond_signal(session, conn->log_file_cond); - if (F_ISSET_ATOMIC_16(slot, WT_SLOT_SYNC_DIRTY) && !F_ISSET_ATOMIC_16(slot, WT_SLOT_SYNC) && + if (F_ISSET(slot, WT_SLOT_SYNC_DIRTY) && !F_ISSET(slot, WT_SLOT_SYNC) && (ret = __wt_fsync(session, log->log_fh, false)) != 0) { /* * Ignore ENOTSUP, but don't try again. @@ -1930,7 +1929,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) * Try to consolidate calls to fsync to wait less. Acquire a spin lock so that threads finishing * writing to the log will wait while the current fsync completes and advance log->sync_lsn. */ - while (F_ISSET_ATOMIC_16(slot, WT_SLOT_SYNC | WT_SLOT_SYNC_DIR)) { + while (F_ISSET(slot, WT_SLOT_SYNC | WT_SLOT_SYNC_DIR)) { /* * We have to wait until earlier log files have finished their sync operations. The most * recent one will set the LSN to the beginning of our file. @@ -1951,8 +1950,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) * Check if we have to sync the parent directory. Some combinations of sync flags may result * in the log file not yet stable in its parent directory. Do that now if needed. */ - if (F_ISSET_ATOMIC_16(slot, WT_SLOT_SYNC_DIR) && - (log->sync_dir_lsn.l.file < sync_lsn.l.file)) { + if (F_ISSET(slot, WT_SLOT_SYNC_DIR) && (log->sync_dir_lsn.l.file < sync_lsn.l.file)) { WT_ASSERT(session, log->log_dir_fh != NULL); __wt_verbose(session, WT_VERB_LOG, "log_release: sync directory %s to LSN %" PRIu32 "/%" PRIu32, log->log_dir_fh->name, @@ -1969,8 +1967,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) /* * Sync the log file if needed. */ - if (F_ISSET_ATOMIC_16(slot, WT_SLOT_SYNC) && - __wt_log_cmp(&log->sync_lsn, &slot->slot_end_lsn) < 0) { + if (F_ISSET(slot, WT_SLOT_SYNC) && __wt_log_cmp(&log->sync_lsn, &slot->slot_end_lsn) < 0) { __wt_verbose(session, WT_VERB_LOG, "log_release: sync log %s to LSN %" PRIu32 "/%" PRIu32, log->log_fh->name, sync_lsn.l.file, sync_lsn.l.offset); @@ -1986,7 +1983,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) /* * Clear the flags before leaving the loop. */ - F_CLR_ATOMIC_16(slot, WT_SLOT_SYNC | WT_SLOT_SYNC_DIR); + F_CLR(slot, WT_SLOT_SYNC | WT_SLOT_SYNC_DIR); locked = false; __wt_spin_unlock(session, &log->log_sync_lock); } @@ -2648,7 +2645,6 @@ __log_write_internal(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp, ui * The only time joining a slot should ever return an error is if it detects a panic. */ __wt_log_slot_join(session, rdup_len, flags, &myslot); - /* * If the addition of this record crosses the buffer boundary, switch in a new slot. */ diff --git a/src/third_party/wiredtiger/src/log/log_slot.c b/src/third_party/wiredtiger/src/log/log_slot.c index 567ad087c88..70a84b8d527 100644 --- a/src/third_party/wiredtiger/src/log/log_slot.c +++ b/src/third_party/wiredtiger/src/log/log_slot.c @@ -32,8 +32,8 @@ __log_slot_dump(WT_SESSION_IMPL *session) if (__wt_log_cmp(&slot->slot_release_lsn, &log->slot_pool[earliest].slot_release_lsn) < 0) earliest = i; __wt_errx(session, "Slot %d (0x%p):", i, (void *)slot); - __wt_errx(session, " State: %" PRIx64 " Flags: %" PRIx16, (uint64_t)slot->slot_state, - slot->flags_atomic); + __wt_errx(session, " State: %" PRIx64 " Flags: %" PRIx32, (uint64_t)slot->slot_state, + slot->flags); __wt_errx(session, " Start LSN: %" PRIu32 "/%" PRIu32, slot->slot_start_lsn.l.file, slot->slot_start_lsn.l.offset); __wt_errx(session, " End LSN: %" PRIu32 "/%" PRIu32, slot->slot_end_lsn.l.file, @@ -214,7 +214,7 @@ __log_slot_dirty_max_check(WT_SESSION_IMPL *session, WT_LOGSLOT *slot) if (current->l.file == last_sync->l.file && current->l.offset > last_sync->l.offset && current->l.offset - last_sync->l.offset > conn->log_dirty_max) { /* Schedule the asynchronous sync */ - F_SET_ATOMIC_16(slot, WT_SLOT_SYNC_DIRTY); + F_SET(slot, WT_SLOT_SYNC_DIRTY); WT_ASSIGN_LSN(&log->dirty_lsn, &slot->slot_release_lsn); } } @@ -454,7 +454,7 @@ __wt_log_slot_init(WT_SESSION_IMPL *session, bool alloc) (uint32_t)WT_MIN((size_t)conn->log_file_max / 10, WT_LOG_SLOT_BUF_SIZE); for (i = 0; i < WT_SLOT_POOL; i++) { WT_ERR(__wt_buf_init(session, &log->slot_pool[i].slot_buf, log->slot_buf_size)); - F_SET_ATOMIC_16(&log->slot_pool[i], WT_SLOT_INIT_FLAGS); + F_SET(&log->slot_pool[i], WT_SLOT_INIT_FLAGS); } WT_STAT_CONN_SET(session, log_buffer_size, log->slot_buf_size * WT_SLOT_POOL); } @@ -619,11 +619,11 @@ __wt_log_slot_join(WT_SESSION_IMPL *session, uint64_t mysize, uint32_t flags, WT WT_STAT_CONN_INCR(session, log_slot_yield_sleep); } if (LF_ISSET(WT_LOG_DSYNC | WT_LOG_FSYNC)) - F_SET_ATOMIC_16(slot, WT_SLOT_SYNC_DIR); + F_SET(slot, WT_SLOT_SYNC_DIR); if (LF_ISSET(WT_LOG_FLUSH)) - F_SET_ATOMIC_16(slot, WT_SLOT_FLUSH); + F_SET(slot, WT_SLOT_FLUSH); if (LF_ISSET(WT_LOG_FSYNC)) - F_SET_ATOMIC_16(slot, WT_SLOT_SYNC); + F_SET(slot, WT_SLOT_SYNC); if (F_ISSET(myslot, WT_MYSLOT_UNBUFFERED)) { WT_ASSERT(session, slot->slot_unbuffered == 0); WT_STAT_CONN_INCR(session, log_slot_unbuffered); @@ -686,7 +686,7 @@ __wt_log_slot_free(WT_SESSION_IMPL *session, WT_LOGSLOT *slot) * initialize the rest of the slot. */ WT_UNUSED(session); - slot->flags_atomic = WT_SLOT_INIT_FLAGS; + slot->flags = WT_SLOT_INIT_FLAGS; slot->slot_error = 0; slot->slot_state = WT_LOG_SLOT_FREE; } diff --git a/src/third_party/wiredtiger/src/log/log_sys.c b/src/third_party/wiredtiger/src/log/log_sys.c index 55b9242bb45..bb7d4dec077 100644 --- a/src/third_party/wiredtiger/src/log/log_sys.c +++ b/src/third_party/wiredtiger/src/log/log_sys.c @@ -117,11 +117,13 @@ __wt_verbose_dump_log(WT_SESSION_IMPL *session) WT_RET(__wt_msg(session, "Logging directory: %s", conn->log_path)); WT_RET(__wt_msg(session, "Logging maximum file size: %" PRId64, (int64_t)conn->log_file_max)); WT_RET(__wt_msg(session, "Log sync setting: %s", - !FLD_ISSET(conn->txn_logsync, WT_LOG_SYNC_ENABLED) ? "none" : - FLD_ISSET(conn->txn_logsync, WT_LOG_DSYNC) ? "dsync" : - FLD_ISSET(conn->txn_logsync, WT_LOG_FLUSH) ? "write to OS" : - FLD_ISSET(conn->txn_logsync, WT_LOG_FSYNC) ? "fsync to disk" : - "unknown sync setting")); + !FLD_ISSET(conn->txn_logsync, WT_LOG_SYNC_ENABLED) ? + "none" : + FLD_ISSET(conn->txn_logsync, WT_LOG_DSYNC) ? + "dsync" : + FLD_ISSET(conn->txn_logsync, WT_LOG_FLUSH) ? + "write to OS" : + FLD_ISSET(conn->txn_logsync, WT_LOG_FSYNC) ? "fsync to disk" : "unknown sync setting")); WT_RET(__wt_msg(session, "Log record allocation alignment: %" PRIu32, log->allocsize)); WT_RET(__wt_msg(session, "Current log file number: %" PRIu32, log->fileid)); WT_RET(__wt_msg(session, "Current log version number: %" PRIu16, log->log_version)); diff --git a/src/third_party/wiredtiger/src/lsm/lsm_cursor_bulk.c b/src/third_party/wiredtiger/src/lsm/lsm_cursor_bulk.c index ce71219fc79..0289bbde228 100644 --- a/src/third_party/wiredtiger/src/lsm/lsm_cursor_bulk.c +++ b/src/third_party/wiredtiger/src/lsm/lsm_cursor_bulk.c @@ -48,7 +48,6 @@ __clsm_close_bulk(WT_CURSOR *cursor) /* Close the LSM cursor */ WT_RET(__wt_clsm_close(cursor)); - WT_STAT_CONN_DECR_ATOMIC(session, cursor_bulk_count); return (0); } @@ -133,7 +132,5 @@ __wt_clsm_open_bulk(WT_CURSOR_LSM *clsm, const char *cfg[]) /* LSM cursors are always raw */ F_SET(bulk_cursor, WT_CURSTD_RAW); - WT_STAT_CONN_INCR_ATOMIC(session, cursor_bulk_count); - return (0); } diff --git a/src/third_party/wiredtiger/src/meta/meta_ckpt.c b/src/third_party/wiredtiger/src/meta/meta_ckpt.c index 5e74939045d..f4c09631439 100644 --- a/src/third_party/wiredtiger/src/meta/meta_ckpt.c +++ b/src/third_party/wiredtiger/src/meta/meta_ckpt.c @@ -193,11 +193,10 @@ __wt_meta_checkpoint_clear(WT_SESSION_IMPL *session, const char *fname) static int __ckpt_set(WT_SESSION_IMPL *session, const char *fname, const char *v, bool use_base) { - struct timespec ts; WT_DATA_HANDLE *dhandle; WT_DECL_ITEM(tmp); WT_DECL_RET; - uint64_t base_hash; + size_t meta_base_length; char *config, *newcfg; const char *cfg[3], *meta_base, *str; @@ -216,23 +215,27 @@ __ckpt_set(WT_SESSION_IMPL *session, const char *fname, const char *v, bool use_ /* Check the metadata is not corrupted. */ meta_base = dhandle->meta_base; - base_hash = __wt_hash_city64(meta_base, strlen(meta_base)); - __wt_epoch(session, &ts); - if (dhandle->meta_hash != base_hash) + meta_base_length = strlen(meta_base); + if (dhandle->meta_base_length != meta_base_length) WT_ERR_PANIC(session, WT_PANIC, - "Corrupted metadata. The original metadata inserted was %s and the current " + "Corrupted metadata. The original metadata length was %lu while the new one is %lu.", + dhandle->meta_base_length, meta_base_length); +#ifdef HAVE_DIAGNOSTIC + if (!WT_STREQ(dhandle->orig_meta_base, meta_base)) + WT_ERR_PANIC(session, WT_PANIC, + "Corrupted metadata. The original metadata length was %lu while the new one is %lu. " + "The original metadata inserted was %s and the current " "metadata is now %s.", - dhandle->orig_meta_base, meta_base); - else - /* - * Only if the hash matches, update the time structure to know when we last had a - * matching hash. If there is a problem with the metadata string then we have bounded - * the time from what is in the dhandle to the local time structure we have. - */ - dhandle->base_upd = ts; + dhandle->meta_base_length, meta_base_length, dhandle->orig_meta_base, meta_base); +#endif /* Concatenate the metadata base string with the checkpoint string. */ WT_ERR(__wt_buf_fmt(session, tmp, "%s,%s", meta_base, str)); + /* + * Check the new metadata length is at least as long as the original metadata string with + * the checkpoint base stripped out. + */ + WT_ASSERT(session, tmp->size >= dhandle->meta_base_length); WT_ERR(__wt_metadata_update(session, fname, tmp->mem)); } else { /* Retrieve the metadata for this file. */ @@ -785,11 +788,6 @@ __wt_meta_ckptlist_get_from_config(WT_SESSION_IMPL *session, bool update, WT_CKP ckpt = &ckptbase[slot]; WT_ERR(__ckpt_load(session, &k, &v, ckpt)); - /* - * Load any incremental information from the configuration string into the existing base - * checkpoints. - */ - WT_ERR(__ckpt_load_blk_mods(session, config, ckpt)); WT_ERR(__wt_meta_block_metadata(session, config, ckpt)); } } @@ -940,12 +938,11 @@ format: } /* - * __wt_metadata_update_connection -- - * Update the connection's base write generation and most recent checkpoint time from the config - * string. + * __wt_metadata_update_base_write_gen -- + * Update the connection's base write generation from the config string. */ int -__wt_metadata_update_connection(WT_SESSION_IMPL *session, const char *config) +__wt_metadata_update_base_write_gen(WT_SESSION_IMPL *session, const char *config) { WT_CKPT ckpt; WT_CONNECTION_IMPL *conn; @@ -956,7 +953,6 @@ __wt_metadata_update_connection(WT_SESSION_IMPL *session, const char *config) if ((ret = __ckpt_last(session, config, &ckpt)) == 0) { conn->base_write_gen = WT_MAX(ckpt.write_gen + 1, conn->base_write_gen); - conn->ckpt_most_recent = WT_MAX(ckpt.sec, conn->ckpt_most_recent); __wt_meta_checkpoint_free(session, &ckpt); } else WT_RET_NOTFOUND_OK(ret); @@ -965,26 +961,21 @@ __wt_metadata_update_connection(WT_SESSION_IMPL *session, const char *config) } /* - * __wt_metadata_load_prior_state -- - * Initialize the connection's base write generation and most recent checkpoint time. + * __wt_metadata_init_base_write_gen -- + * Initialize the connection's base write generation. */ int -__wt_metadata_load_prior_state(WT_SESSION_IMPL *session) +__wt_metadata_init_base_write_gen(WT_SESSION_IMPL *session) { - WT_CONNECTION_IMPL *conn; WT_DECL_RET; char *config; - conn = S2C(session); - /* Initialize the base write gen to 1 */ - conn->base_write_gen = 1; - /* Initialize most recent checkpoint time with current clock */ - __wt_seconds(session, &conn->ckpt_most_recent); + S2C(session)->base_write_gen = 1; /* Retrieve the metadata entry for the metadata file. */ WT_ERR(__wt_metadata_search(session, WT_METAFILE_URI, &config)); - /* Update base write gen and most recent checkpoint time from the metadata. */ - WT_ERR(__wt_metadata_update_connection(session, config)); + /* Update base write gen to the write gen of metadata. */ + WT_ERR(__wt_metadata_update_base_write_gen(session, config)); err: __wt_free(session, config); @@ -1013,8 +1004,8 @@ __wt_metadata_correct_base_write_gen(WT_SESSION_IMPL *session) WT_ERR(cursor->get_value(cursor, &config)); - /* Update base write gen and most recent checkpoint time. */ - WT_ERR(__wt_metadata_update_connection(session, config)); + /* Update base write gen to the write gen. */ + WT_ERR(__wt_metadata_update_base_write_gen(session, config)); } WT_ERR_NOTFOUND_OK(ret, false); @@ -1127,9 +1118,7 @@ __wt_ckpt_blkmod_to_meta(WT_SESSION_IMPL *session, WT_ITEM *buf, WT_CKPT *ckpt) "%s\"%s\"=(id=%" PRIu32 ",granularity=%" PRIu64 ",nbits=%" PRIu64 ",offset=%" PRIu64 "%s,blocks=%.*s)", i == 0 ? "" : ",", blk->id_str, i, blk->granularity, blk->nbits, blk->offset, - skip_rename ? "" : - F_ISSET(blk, WT_BLOCK_MODS_RENAME) ? ",rename=1" : - ",rename=0", + skip_rename ? "" : F_ISSET(blk, WT_BLOCK_MODS_RENAME) ? ",rename=1" : ",rename=0", (int)bitstring.size, (char *)bitstring.data)); /* The hex string length should match the appropriate number of bits. */ WT_ASSERT(session, (blk->nbits >> 2) <= bitstring.size); @@ -1339,16 +1328,14 @@ __wt_meta_sysinfo_set(WT_SESSION_IMPL *session) WT_ERR(__wt_buf_fmt(session, buf, WT_SYSTEM_CKPT_SNAPSHOT_MIN "=%" PRIu64 "," WT_SYSTEM_CKPT_SNAPSHOT_MAX "=%" PRIu64 "," WT_SYSTEM_CKPT_SNAPSHOT_COUNT "=%" PRIu32, - txn->snapshot_data.snap_min, txn->snapshot_data.snap_max, txn->snapshot_data.snapshot_count)); + txn->snap_min, txn->snap_max, txn->snapshot_count)); - if (txn->snapshot_data.snapshot_count > 0) { + if (txn->snapshot_count > 0) { WT_ERR(__wt_buf_catfmt(session, buf, "," WT_SYSTEM_CKPT_SNAPSHOT "=[")); - for (snap_count = 0; snap_count < txn->snapshot_data.snapshot_count - 1; ++snap_count) - WT_ERR(__wt_buf_catfmt( - session, buf, "%" PRIu64 "%s", txn->snapshot_data.snapshot[snap_count], ",")); + for (snap_count = 0; snap_count < txn->snapshot_count - 1; ++snap_count) + WT_ERR(__wt_buf_catfmt(session, buf, "%" PRIu64 "%s", txn->snapshot[snap_count], ",")); - WT_ERR(__wt_buf_catfmt( - session, buf, "%" PRIu64 "%s", txn->snapshot_data.snapshot[snap_count], "]")); + WT_ERR(__wt_buf_catfmt(session, buf, "%" PRIu64 "%s", txn->snapshot[snap_count], "]")); } WT_ERR(__wt_metadata_update(session, WT_SYSTEM_CKPT_SNAPSHOT_URI, buf->data)); @@ -1357,7 +1344,7 @@ __wt_meta_sysinfo_set(WT_SESSION_IMPL *session) " snapshot count: %" PRIu32 ", oldest timestamp: %s , meta checkpoint timestamp: %s" " base write gen: %" PRIu64, - txn->snapshot_data.snap_min, txn->snapshot_data.snap_max, txn->snapshot_data.snapshot_count, + txn->snap_min, txn->snap_max, txn->snapshot_count, __wt_timestamp_to_string(txn_global->oldest_timestamp, ts_string[0]), __wt_timestamp_to_string(txn_global->meta_ckpt_timestamp, ts_string[1]), S2C(session)->base_write_gen); diff --git a/src/third_party/wiredtiger/src/meta/meta_turtle.c b/src/third_party/wiredtiger/src/meta/meta_turtle.c index 240ee1d5ea7..41362018a3a 100644 --- a/src/third_party/wiredtiger/src/meta/meta_turtle.c +++ b/src/third_party/wiredtiger/src/meta/meta_turtle.c @@ -539,11 +539,8 @@ err: } __wt_free(session, backuphash); - /* - * We used to remove the backup file here. But we cannot do that until the metadata is fully - * synced to disk after recovery. - */ - return (ret); + /* Remove the backup files, we'll never read them again. */ + return (__wt_backup_file_remove(session)); } /* diff --git a/src/third_party/wiredtiger/src/os_posix/os_fs.c b/src/third_party/wiredtiger/src/os_posix/os_fs.c index bb5a80644fb..1ae6259e5d8 100644 --- a/src/third_party/wiredtiger/src/os_posix/os_fs.c +++ b/src/third_party/wiredtiger/src/os_posix/os_fs.c @@ -401,7 +401,6 @@ static int __posix_file_read( WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_off_t offset, size_t len, void *buf) { - WT_DECL_RET; WT_FILE_HANDLE_POSIX *pfh; WT_SESSION_IMPL *session; size_t chunk; @@ -421,16 +420,10 @@ __posix_file_read( len >= S2C(session)->buffer_alignment && len % S2C(session)->buffer_alignment == 0)); /* Break reads larger than 1GB into 1GB chunks. */ - nr = 0; for (addr = buf; len > 0; addr += nr, len -= (size_t)nr, offset += nr) { chunk = WT_MIN(len, WT_GIGABYTE); - /* - * The WT_SYSCALL_RETRY macro expects 0 for success. pread returns > 0 when successful, - * adjust the return value. - */ - WT_SYSCALL_RETRY((nr = pread(pfh->fd, addr, chunk, offset)) <= 0 ? -1 : 0, ret); - if (ret != 0) - WT_RET_MSG(session, nr == 0 ? WT_ERROR : ret, + if ((nr = pread(pfh->fd, addr, chunk, offset)) <= 0) + WT_RET_MSG(session, nr == 0 ? WT_ERROR : __wt_errno(), "%s: handle-read: pread: failed to read %" WT_SIZET_FMT " bytes at offset %" PRIuMAX, file_handle->name, chunk, (uintmax_t)offset); } diff --git a/src/third_party/wiredtiger/src/reconcile/rec_col.c b/src/third_party/wiredtiger/src/reconcile/rec_col.c index 9b4fda8f107..3a726134a6f 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_col.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_col.c @@ -765,7 +765,16 @@ __wt_rec_col_fix( /* If there's an update to apply, apply the value. */ if (upd->type == WT_UPDATE_TOMBSTONE) { + /* + * When an out-of-order or mixed-mode tombstone is getting written to disk, remove any + * historical versions that are greater in the history store for this key. + */ + if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) + WT_ERR(__wt_rec_hs_clear_on_tombstone( + session, r, upd_select.tw.durable_stop_ts, recno, NULL, false)); + val = 0; + /* Do not write a time window; if we get just a tombstone, it is globally visible. */ } else { /* MODIFY is not allowed in FLCS. */ @@ -774,19 +783,19 @@ __wt_rec_col_fix( /* Write the time window. */ if (!WT_TIME_WINDOW_IS_EMPTY(&upd_select.tw)) { + /* + * When an out-of-order or mixed-mode tombstone is getting written to disk, remove + * any historical versions that are greater in the history store for this key. + */ + if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) + WT_ERR(__wt_rec_hs_clear_on_tombstone( + session, r, upd_select.tw.durable_stop_ts, recno, NULL, true)); + WT_ERR(__wt_rec_col_fix_addtw( session, r, (uint32_t)(recno - curstartrecno), &upd_select.tw)); } } - /* - * When a tombstone without a timestamp is written to disk, remove any historical versions - * that are greater in the history store for this key. - */ - if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) - WT_ERR(__wt_rec_hs_clear_on_tombstone(session, r, upd_select.tw.durable_stop_ts, recno, - NULL, upd->type == WT_UPDATE_TOMBSTONE ? false : true)); - /* Write the data. */ __bit_setv(r->first_free, recno - curstartrecno, btree->bitcnt, val); @@ -911,20 +920,9 @@ __wt_rec_col_fix( /* MODIFY is not allowed in FLCS, so the update must be an ordinary value. */ WT_ASSERT(session, upd->type == WT_UPDATE_STANDARD); val = *upd->data; - if (!WT_TIME_WINDOW_IS_EMPTY(&upd_select.tw)) WT_ERR(__wt_rec_col_fix_addtw(session, r, entry, &upd_select.tw)); } - - /* - * When a tombstone without a timestamp is written to disk, remove any historical - * versions that are greater in the history store for this key. - */ - if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) - WT_ERR(__wt_rec_hs_clear_on_tombstone(session, r, upd_select.tw.durable_stop_ts, - recno, NULL, - (upd == NULL || upd->type == WT_UPDATE_TOMBSTONE) ? false : true)); - __bit_setv(r->first_free, entry, btree->bitcnt, val); --nrecs; ++entry; @@ -1106,14 +1104,11 @@ __wt_rec_col_fix_write_auxheader(WT_SESSION_IMPL *session, uint32_t entries, */ static int __rec_col_var_helper(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_SALVAGE_COOKIE *salvage, - WT_ITEM *value, WT_TIME_WINDOW *tw, uint64_t rle, bool deleted, bool *ovfl_usedp) + WT_ITEM *value, WT_TIME_WINDOW *tw, uint64_t rle, bool deleted, bool overflow_type) { WT_BTREE *btree; WT_REC_KV *val; - if (ovfl_usedp != NULL) - *ovfl_usedp = false; - btree = S2BT(session); val = &r->v; @@ -1152,13 +1147,12 @@ __rec_col_var_helper(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_SALVAGE_COOKI val->buf.data = NULL; val->buf.size = 0; val->len = val->cell_len; - } else if (ovfl_usedp != NULL) { + } else if (overflow_type) { val->cell_len = __wt_cell_pack_ovfl(session, &val->cell, WT_CELL_VALUE_OVFL, tw, rle, value->size); val->buf.data = value->data; val->buf.size = value->size; val->len = val->cell_len + value->size; - *ovfl_usedp = true; } else WT_RET(__wt_rec_cell_build_val(session, r, value->data, value->size, tw, rle)); @@ -1167,7 +1161,7 @@ __rec_col_var_helper(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_SALVAGE_COOKI WT_RET(__wt_rec_split_crossing_bnd(session, r, val->len)); /* Copy the value onto the page. */ - if (!deleted && ovfl_usedp == NULL && btree->dictionary) + if (!deleted && !overflow_type && btree->dictionary) WT_RET(__wt_rec_dict_replace(session, r, tw, rle, val)); __wt_rec_image_copy(session, r, val); WT_TIME_AGGREGATE_UPDATE(session, &r->cur_ptr->ta, tw); @@ -1206,7 +1200,7 @@ __wt_rec_col_var( WT_UPDATE_SELECT upd_select; uint64_t n, nrepeat, repeat_count, rle, skip, src_recno; uint32_t i, size; - bool deleted, orig_deleted, orig_stale, ovfl_used, update_no_copy; + bool deleted, orig_deleted, orig_stale, update_no_copy; const void *data; btree = S2BT(session); @@ -1254,7 +1248,7 @@ __wt_rec_col_var( salvage->take += salvage->missing; } else WT_ERR(__rec_col_var_helper( - session, r, NULL, NULL, &clear_tw, salvage->missing, true, NULL)); + session, r, NULL, NULL, &clear_tw, salvage->missing, true, false)); } /* @@ -1373,23 +1367,19 @@ record_loop: */ if (rle != 0) { WT_ERR(__rec_col_var_helper( - session, r, salvage, last.value, &last.tw, rle, last.deleted, NULL)); + session, r, salvage, last.value, &last.tw, rle, last.deleted, false)); rle = 0; } last.value->data = vpack->data; last.value->size = vpack->size; WT_ERR(__rec_col_var_helper( - session, r, salvage, last.value, twp, repeat_count, false, &ovfl_used)); + session, r, salvage, last.value, twp, repeat_count, false, true)); - /* - * Salvage may have caused us to skip the overflow item, only update overflow - * items we use. - */ - if (ovfl_used) { - r->ovfl_items = true; /* Track if page has overflow items. */ - ovfl_state = OVFL_USED; - } + /* Track if page has overflow items. */ + r->ovfl_items = true; + + ovfl_state = OVFL_USED; continue; case OVFL_USED: /* @@ -1425,22 +1415,32 @@ record_loop: case WT_UPDATE_STANDARD: data = upd->data; size = upd->size; + /* + * When an out-of-order or mixed-mode tombstone is getting written to disk, + * remove any historical versions that are greater in the history store for this + * key. + */ + if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) + WT_ERR(__wt_rec_hs_clear_on_tombstone( + session, r, twp->durable_stop_ts, src_recno, NULL, true)); + break; case WT_UPDATE_TOMBSTONE: + /* + * When an out-of-order or mixed-mode tombstone is getting written to disk, + * remove any historical versions that are greater in the history store for this + * key. + */ + if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) + WT_ERR(__wt_rec_hs_clear_on_tombstone( + session, r, twp->durable_stop_ts, src_recno, NULL, false)); + deleted = true; twp = &clear_tw; break; default: WT_ERR(__wt_illegal_value(session, upd->type)); } - - /* - * When a tombstone without a timestamp is written to disk, remove any historical - * versions that are greater in the history store for this key. - */ - if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) - WT_ERR(__wt_rec_hs_clear_on_tombstone(session, r, twp->durable_stop_ts, - src_recno, NULL, upd->type == WT_UPDATE_TOMBSTONE ? false : true)); } compare: @@ -1464,7 +1464,7 @@ compare: continue; } WT_ERR(__rec_col_var_helper( - session, r, salvage, last.value, &last.tw, rle, last.deleted, NULL)); + session, r, salvage, last.value, &last.tw, rle, last.deleted, false)); } /* @@ -1590,14 +1590,6 @@ compare: default: WT_ERR(__wt_illegal_value(session, upd->type)); } - - /* - * When a tombstone without a timestamp is written to disk, remove any historical - * versions that are greater in the history store for this key. - */ - if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) - WT_ERR(__wt_rec_hs_clear_on_tombstone(session, r, upd_select.tw.durable_stop_ts, - src_recno, NULL, upd->type == WT_UPDATE_TOMBSTONE ? false : true)); } /* @@ -1618,7 +1610,7 @@ compare: goto next; } WT_ERR(__rec_col_var_helper( - session, r, salvage, last.value, &last.tw, rle, last.deleted, NULL)); + session, r, salvage, last.value, &last.tw, rle, last.deleted, false)); } /* @@ -1661,8 +1653,8 @@ next: /* If we were tracking a record, write it. */ if (rle != 0) - WT_ERR( - __rec_col_var_helper(session, r, salvage, last.value, &last.tw, rle, last.deleted, NULL)); + WT_ERR(__rec_col_var_helper( + session, r, salvage, last.value, &last.tw, rle, last.deleted, false)); /* Write the remnant page. */ ret = __wt_rec_split_finish(session, r); diff --git a/src/third_party/wiredtiger/src/reconcile/rec_row.c b/src/third_party/wiredtiger/src/reconcile/rec_row.c index e1cb28bef06..a3657631701 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_row.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_row.c @@ -479,8 +479,6 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) { WT_BTREE *btree; WT_CURSOR_BTREE *cbt; - WT_DECL_ITEM(tmpkey); - WT_DECL_RET; WT_REC_KV *key, *val; WT_TIME_WINDOW tw; WT_UPDATE *upd; @@ -497,11 +495,8 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) upd = NULL; - /* Temporary buffer in which to instantiate any uninstantiated keys or value items we need. */ - WT_RET(__wt_scr_alloc(session, 0, &tmpkey)); - for (; ins != NULL; ins = WT_SKIP_NEXT(ins)) { - WT_ERR(__wt_rec_upd_select(session, r, ins, NULL, NULL, &upd_select)); + WT_RET(__wt_rec_upd_select(session, r, ins, NULL, NULL, &upd_select)); if ((upd = upd_select.upd) == NULL) { /* * In cases where a page has grown so large we are trying to force evict it (there is @@ -514,8 +509,8 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) if (!upd_select.upd_saved || !__wt_rec_need_split(r, 0)) continue; - WT_ERR(__wt_buf_set(session, r->cur, WT_INSERT_KEY(ins), WT_INSERT_KEY_SIZE(ins))); - WT_ERR(__wt_rec_split_crossing_bnd(session, r, 0)); + WT_RET(__wt_buf_set(session, r->cur, WT_INSERT_KEY(ins), WT_INSERT_KEY_SIZE(ins))); + WT_RET(__wt_rec_split_crossing_bnd(session, r, 0)); /* * Turn off prefix and suffix compression until a full key is written into the new page. @@ -544,9 +539,9 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) * Impossible slot, there's no backing on-page item. */ cbt->slot = UINT32_MAX; - WT_ERR(__wt_modify_reconstruct_from_upd_list(session, cbt, upd, cbt->upd_value)); + WT_RET(__wt_modify_reconstruct_from_upd_list(session, cbt, upd, cbt->upd_value)); __wt_value_return(cbt, cbt->upd_value); - WT_ERR(__wt_rec_cell_build_val( + WT_RET(__wt_rec_cell_build_val( session, r, cbt->iface.value.data, cbt->iface.value.size, &tw, 0)); break; case WT_UPDATE_STANDARD: @@ -554,30 +549,15 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) val->len = 0; else /* Take the value from the update. */ - WT_ERR(__wt_rec_cell_build_val(session, r, upd->data, upd->size, &tw, 0)); + WT_RET(__wt_rec_cell_build_val(session, r, upd->data, upd->size, &tw, 0)); break; case WT_UPDATE_TOMBSTONE: - break; + continue; default: - WT_ERR(__wt_illegal_value(session, upd->type)); - } - - /* - * When a tombstone without a timestamp is written to disk, remove any historical versions - * that are greater in the history store for this key. - */ - if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) { - tmpkey->data = WT_INSERT_KEY(ins); - tmpkey->size = WT_INSERT_KEY_SIZE(ins); - WT_ERR(__wt_rec_hs_clear_on_tombstone(session, r, upd_select.tw.durable_stop_ts, - WT_RECNO_OOB, tmpkey, upd->type == WT_UPDATE_TOMBSTONE ? false : true)); + WT_RET(__wt_illegal_value(session, upd->type)); } - - if (upd->type == WT_UPDATE_TOMBSTONE) - continue; - /* Build key cell. */ - WT_ERR(__rec_cell_build_leaf_key( + WT_RET(__rec_cell_build_leaf_key( session, r, WT_INSERT_KEY(ins), WT_INSERT_KEY_SIZE(ins), &ovfl_key)); /* Boundary: split or write the page. */ @@ -590,10 +570,10 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) r->key_pfx_compress = false; r->key_pfx_last = 0; if (!ovfl_key) - WT_ERR(__rec_cell_build_leaf_key(session, r, NULL, 0, &ovfl_key)); + WT_RET(__rec_cell_build_leaf_key(session, r, NULL, 0, &ovfl_key)); } - WT_ERR(__wt_rec_split_crossing_bnd(session, r, key->len + val->len)); + WT_RET(__wt_rec_split_crossing_bnd(session, r, key->len + val->len)); } /* Copy the key/value pair onto the page. */ @@ -603,7 +583,7 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) else { r->all_empty_value = false; if (btree->dictionary) - WT_ERR(__wt_rec_dict_replace(session, r, &tw, 0, val)); + WT_RET(__wt_rec_dict_replace(session, r, &tw, 0, val)); __wt_rec_image_copy(session, r, val); } WT_TIME_AGGREGATE_UPDATE(session, &r->cur_ptr->ta, &tw); @@ -612,9 +592,7 @@ __rec_row_leaf_insert(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins) __rec_key_state_update(r, ovfl_key); } -err: - __wt_scr_free(session, &tmpkey); - return (ret); + return (0); } /* @@ -829,6 +807,15 @@ __wt_rec_row_leaf( case WT_UPDATE_STANDARD: /* Take the value from the update. */ WT_ERR(__wt_rec_cell_build_val(session, r, upd->data, upd->size, twp, 0)); + /* + * When an out-of-order or mixed-mode tombstone is getting written to disk, remove + * any historical versions that are greater in the history store for that key. + */ + if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) { + WT_ERR(__wt_row_leaf_key(session, page, rip, tmpkey, true)); + WT_ERR(__wt_rec_hs_clear_on_tombstone( + session, r, twp->durable_stop_ts, WT_RECNO_OOB, tmpkey, true)); + } dictionary = true; break; case WT_UPDATE_TOMBSTONE: @@ -853,28 +840,26 @@ __wt_rec_row_leaf( } /* + * When an out-of-order or mixed-mode tombstone is getting written to disk, remove + * any historical versions that are greater in the history store for this key. + */ + if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) { + WT_ERR(__wt_row_leaf_key(session, page, rip, tmpkey, true)); + WT_ERR(__wt_rec_hs_clear_on_tombstone( + session, r, twp->durable_stop_ts, WT_RECNO_OOB, tmpkey, false)); + } + + /* * We aren't creating a key so we can't use bytes from this key to provide prefix * information for a subsequent key. */ tmpkey->size = 0; - break; + + /* Proceed with appended key/value pairs. */ + goto leaf_insert; default: WT_ERR(__wt_illegal_value(session, upd->type)); } - - /* - * When an out-of-order or mixed-mode tombstone is getting written to disk, remove any - * historical versions that are greater in the history store for this key. - */ - if (upd_select.ooo_tombstone && r->hs_clear_on_tombstone) { - WT_ERR(__wt_row_leaf_key(session, page, rip, tmpkey, true)); - WT_ERR(__wt_rec_hs_clear_on_tombstone(session, r, twp->durable_stop_ts, - WT_RECNO_OOB, tmpkey, upd->type == WT_UPDATE_TOMBSTONE ? false : true)); - } - - /* Proceed with appended key/value pairs. */ - if (upd->type == WT_UPDATE_TOMBSTONE) - goto leaf_insert; } /* diff --git a/src/third_party/wiredtiger/src/reconcile/rec_track.c b/src/third_party/wiredtiger/src/reconcile/rec_track.c index 72d2e2388ab..d10590d453c 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_track.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_track.c @@ -34,10 +34,6 @@ __ovfl_discard_verbose(WT_SESSION_IMPL *session, WT_PAGE *page, WT_CELL *cell, c WT_CELL_UNPACK_KV *unpack, _unpack; WT_DECL_ITEM(tmp); - /* Because we dereference the page pointer, it can't be NULL */ - if (page == NULL) - WT_RET(EINVAL); - WT_RET(__wt_scr_alloc(session, 512, &tmp)); unpack = &_unpack; diff --git a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c index 39c4611ce5c..c1f48d84612 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c @@ -40,27 +40,6 @@ __rec_update_save(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, WT_ } /* - * __rec_delete_hs_upd_save -- - * Save an update into a WT_DELETE_HS_UPD list to delete it from the history store later. - */ -static inline int -__rec_delete_hs_upd_save(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, WT_ROW *rip, - WT_UPDATE *upd, WT_UPDATE *tombstone) -{ - WT_DELETE_HS_UPD *delete_hs_upd; - - WT_RET(__wt_realloc_def( - session, &r->delete_hs_upd_allocated, r->delete_hs_upd_next + 1, &r->delete_hs_upd)); - delete_hs_upd = &r->delete_hs_upd[r->delete_hs_upd_next]; - delete_hs_upd->ins = ins; - delete_hs_upd->rip = rip; - delete_hs_upd->upd = upd; - delete_hs_upd->tombstone = tombstone; - ++r->delete_hs_upd_next; - return (0); -} - -/* * __rec_append_orig_value -- * Append the key's original value to its update list. It assumes that we have an onpage value, * the onpage value is not a prepared update, and we don't overwrite transaction id to @@ -80,18 +59,11 @@ __rec_append_orig_value( session, upd != NULL && unpack != NULL && unpack->type != WT_CELL_DEL && !unpack->tw.prepare); append = oldest_upd = tombstone = NULL; - size = total_size = 0; + total_size = 0; tombstone_globally_visible = false; /* Review the current update list, checking conditions that mean no work is needed. */ for (;; upd = upd->next) { - if (upd->txnid == WT_TXN_ABORTED) { - if (upd->next == NULL) - break; - else - continue; - } - /* Done if the update was restored from the data store or the history store. */ if (F_ISSET(upd, WT_UPDATE_RESTORED_FROM_DS | WT_UPDATE_RESTORED_FROM_HS)) return (0); @@ -119,7 +91,8 @@ __rec_append_orig_value( if (WT_UPDATE_DATA_VALUE(upd) && __wt_txn_upd_visible_all(session, upd)) return (0); - oldest_upd = upd; + if (upd->txnid != WT_TXN_ABORTED) + oldest_upd = upd; /* Leave reference pointing to the last item in the update list. */ if (upd->next == NULL) @@ -209,65 +182,19 @@ err: } /* - * __rec_find_and_save_delete_hs_upd -- - * Find and save the update that needs to be deleted from the history store later - */ -static int -__rec_find_and_save_delete_hs_upd(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, - WT_ROW *rip, WT_UPDATE_SELECT *upd_select) -{ - WT_UPDATE *delete_tombstone, *delete_upd; - - delete_tombstone = NULL; - - for (delete_upd = upd_select->tombstone != NULL ? upd_select->tombstone : upd_select->upd; - delete_upd != NULL; delete_upd = delete_upd->next) { - if (delete_upd->txnid == WT_TXN_ABORTED) - continue; - - if (F_ISSET(delete_upd, WT_UPDATE_TO_DELETE_FROM_HS)) { - /* - * If we want to remove an update from the history store in WiredTiger, it must be in - * history store. - */ - WT_ASSERT(session, F_ISSET(delete_upd, WT_UPDATE_HS | WT_UPDATE_RESTORED_FROM_HS)); - if (delete_upd->type == WT_UPDATE_TOMBSTONE) - delete_tombstone = delete_upd; - else { - WT_RET( - __rec_delete_hs_upd_save(session, r, ins, rip, delete_upd, delete_tombstone)); - break; - } - } - } - - /* If we delete a tombstone from the history store, we must also delete the update. */ - WT_ASSERT(session, delete_tombstone == NULL || delete_upd != NULL); - - return (0); -} - -/* * __rec_need_save_upd -- * Return if we need to save the update chain */ static inline bool -__rec_need_save_upd(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_UPDATE_SELECT *upd_select, - WT_CELL_UNPACK_KV *vpack, bool has_newer_updates) +__rec_need_save_upd( + WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_UPDATE_SELECT *upd_select, bool has_newer_updates) { - WT_UPDATE *upd; - bool supd_restore, visible_all; - if (upd_select->tw.prepare) return (true); if (F_ISSET(r, WT_REC_EVICT) && has_newer_updates) return (true); - /* No need to save the update chain if we want to delete the key from the disk image. */ - if (upd_select->upd != NULL && upd_select->upd->type == WT_UPDATE_TOMBSTONE) - return (false); - /* * Don't save updates for any reconciliation that doesn't involve history store (in-memory * database, metadata, and history store reconciliation itself), except when the selected stop @@ -281,33 +208,9 @@ __rec_need_save_upd(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_UPDATE_SELECT return (false); if (WT_TIME_WINDOW_HAS_STOP(&upd_select->tw)) - visible_all = __wt_txn_tw_stop_visible_all(session, &upd_select->tw); + return (!__wt_txn_tw_stop_visible_all(session, &upd_select->tw)); else - visible_all = __wt_txn_tw_start_visible_all(session, &upd_select->tw); - - if (visible_all) - return (false); - - /* - * Update chains are only need to be saved when there are: - * 1. Newer uncommitted updates or database is configured for in-memory storage. - * 2. On-disk entry exists. - * 3. Valid updates exist in the update chain to be written to the history store. - */ - supd_restore = - F_ISSET(r, WT_REC_EVICT) && (has_newer_updates || F_ISSET(S2C(session), WT_CONN_IN_MEMORY)); - - if (!supd_restore && vpack == NULL && upd_select->upd != NULL) { - upd = upd_select->upd; - while (upd->next != NULL) { - upd = upd->next; - if (upd->txnid != WT_TXN_ABORTED) - return (true); - } - return (false); - } - - return (true); + return (!__wt_txn_tw_start_visible_all(session, &upd_select->tw)); } /* @@ -376,12 +279,6 @@ __rec_validate_upd_chain(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_UPDATE *s if (!F_ISSET(r, WT_REC_CHECKPOINT_RUNNING)) return (0); - /* Cannot delete the update from history store when checkpoint is running. */ - if (r->delete_hs_upd_next > 0) { - WT_STAT_CONN_DATA_INCR(session, cache_eviction_blocked_remove_hs_race_with_checkpoint); - return (EBUSY); - } - /* * The selected time window may contain information that isn't visible given the selected * update, as such we have to check it separately. This is true when there is a tombstone ahead @@ -483,16 +380,12 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W size_t upd_memsize; uint64_t max_txn, session_txnid, txnid; bool has_newer_updates, is_hs_page, supd_restore, upd_saved; -#ifdef HAVE_DIAGNOSTIC - bool seen_prepare; -#endif /* * The "saved updates" return value is used independently of returning an update we can write, * both must be initialized. */ upd_select->upd = NULL; - upd_select->tombstone = NULL; upd_select->upd_saved = false; upd_select->ooo_tombstone = false; select_tw = &upd_select->tw; @@ -507,10 +400,6 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W is_hs_page = F_ISSET(session->dhandle, WT_DHANDLE_HS); session_txnid = WT_SESSION_TXN_SHARED(session)->id; -#ifdef HAVE_DIAGNOSTIC - seen_prepare = false; -#endif - /* * If called with a WT_INSERT item, use its WT_UPDATE list (which must exist), otherwise check * for an on-page row-store WT_UPDATE list (which may not exist). Return immediately if the item @@ -590,9 +479,6 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W has_newer_updates = true; if (upd->start_ts > max_ts) max_ts = upd->start_ts; -#ifdef HAVE_DIADNOSTIC - seen_prepare = true; -#endif continue; } else { /* @@ -686,7 +572,7 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W */ if (upd->type == WT_UPDATE_TOMBSTONE) { WT_TIME_WINDOW_SET_STOP(select_tw, upd); - tombstone = upd_select->tombstone = upd; + tombstone = upd; /* Find the update this tombstone applies to. */ if (!__wt_txn_upd_visible_all(session, upd)) { @@ -789,13 +675,6 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W NULL : upd_select->upd; - /* - * If we have done a prepared rollback, we may have restored a history store value to the update - * chain but the same value is left in the history store. Save it to delete it from the history - * store later. - */ - WT_RET(__rec_find_and_save_delete_hs_upd(session, r, ins, rip, upd_select)); - /* Check the update chain for conditions that could prevent it's eviction. */ WT_RET(__rec_validate_upd_chain(session, r, onpage_upd, select_tw, vpack)); @@ -837,7 +716,7 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W /* Catch this case in diagnostic builds. */ WT_STAT_CONN_DATA_INCR(session, cache_eviction_blocked_ooo_checkpoint_race_3); WT_ASSERT(session, false); - return (EBUSY); + WT_RET(EBUSY); } /* @@ -847,7 +726,7 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W * * Additionally history store reconciliation is not set skip saving an update. */ - if (__rec_need_save_upd(session, r, upd_select, vpack, has_newer_updates)) { + if (__rec_need_save_upd(session, r, upd_select, has_newer_updates)) { /* * We should restore the update chains to the new disk image if there are newer updates in * eviction, or for cases that don't support history store, such as an in-memory database. @@ -858,20 +737,19 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W WT_RET(__rec_update_save( session, r, ins, rip, onpage_upd, tombstone, supd_restore, upd_memsize)); + /* + * Mark the selected update (and potentially the tombstone preceding it) as being destined + * for the data store. Subsequent reconciliations should know that they can select this + * update regardless of visibility. + */ + if (upd_select->upd != NULL) + F_SET(upd_select->upd, WT_UPDATE_DS); + if (tombstone != NULL) + F_SET(tombstone, WT_UPDATE_DS); upd_saved = upd_select->upd_saved = true; } /* - * Mark the selected update (and potentially the tombstone preceding it) as being destined for - * the data store. Subsequent reconciliations should know that they can select this update - * regardless of visibility. - */ - if (upd_select->upd != NULL) - F_SET(upd_select->upd, WT_UPDATE_DS); - if (tombstone != NULL) - F_SET(tombstone, WT_UPDATE_DS); - - /* * Set statistics for update restore evictions. Update restore eviction debug mode forces update * restores to both committed or uncommitted changes. */ @@ -882,19 +760,9 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W * Paranoia: check that we didn't choose an update that has since been rolled back. */ WT_ASSERT(session, upd_select->upd == NULL || upd_select->upd->txnid != WT_TXN_ABORTED); - /* - * We should never select an update that has been written to the history store except checkpoint - * writes the update that is older than a prepared update or we need to first delete the update - * from the history store. - */ - WT_ASSERT(session, - upd_select->upd == NULL || !F_ISSET(upd_select->upd, WT_UPDATE_HS) || - F_ISSET(upd_select->upd, WT_UPDATE_TO_DELETE_FROM_HS) || - (!F_ISSET(r, WT_REC_EVICT) && seen_prepare)); - WT_ASSERT(session, - tombstone == NULL || !F_ISSET(tombstone, WT_UPDATE_HS) || - F_ISSET(tombstone, WT_UPDATE_TO_DELETE_FROM_HS) || - (!F_ISSET(r, WT_REC_EVICT) && seen_prepare)); + /* We should never select an update that has been written to the history store. */ + WT_ASSERT(session, upd_select->upd == NULL || !F_ISSET(upd_select->upd, WT_UPDATE_HS)); + WT_ASSERT(session, tombstone == NULL || !F_ISSET(tombstone, WT_UPDATE_HS)); /* * Returning an update means the original on-page value might be lost, and that's a problem if @@ -917,8 +785,5 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W __wt_rec_time_window_clear_obsolete(session, upd_select, NULL, r); - WT_ASSERT( - session, upd_select->tw.stop_txn != WT_TXN_MAX || upd_select->tw.stop_ts == WT_TS_MAX); - return (0); } diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c index 528a273c981..88a156d3b1f 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_write.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c @@ -32,11 +32,14 @@ __wt_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage WT_BTREE *btree; WT_DECL_RET; WT_PAGE *page; + uint64_t start, now; bool no_reconcile_set, page_locked; btree = S2BT(session); page = ref->page; + __wt_seconds(session, &start); + __wt_verbose(session, WT_VERB_RECONCILE, "%p reconcile %s (%s%s)", (void *)ref, __wt_page_type_string(page->type), LF_ISSET(WT_REC_EVICT) ? "evict" : "checkpoint", LF_ISSET(WT_REC_HS) ? ", history store" : ""); @@ -102,6 +105,11 @@ err: if (!no_reconcile_set) F_CLR(session, WT_SESSION_NO_RECONCILE); + /* Track the longest reconciliation, ignoring races (it's just a statistic). */ + __wt_seconds(session, &now); + if (now - start > S2C(session)->rec_maximum_seconds) + S2C(session)->rec_maximum_seconds = now - start; + return (ret); } @@ -211,36 +219,23 @@ __reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage, u bool *page_lockedp) { WT_BTREE *btree; - WT_CONNECTION_IMPL *conn; WT_DECL_RET; WT_PAGE *page; WT_RECONCILE *r; - uint64_t rec_hs_wrapup, rec_img_build, rec, rec_start, rec_finish; #ifdef HAVE_DIAGNOSTIC void *addr; #endif btree = S2BT(session); - conn = S2C(session); page = ref->page; - rec_start = __wt_clock(session); - WT_ASSERT(session, rec_start != 0); - /* Save the eviction state. */ __reconcile_save_evict_state(session, ref, flags); - /* Initialize the reconciliation structures for each new run. */ + /* Initialize the reconciliation structure for each new run. */ WT_RET(__rec_init(session, ref, flags, salvage, &session->reconcile)); - WT_CLEAR(session->reconcile_timeline); - session->reconcile_timeline.reconcile_start = rec_start; - r = session->reconcile; - /* Only update if we are in the first entry into eviction. */ - if (!session->evict_timeline.reentry_hs_eviction) - session->reconcile_timeline.image_build_start = __wt_clock(session); - /* Reconcile the page. */ switch (page->type) { case WT_PAGE_COL_FIX: @@ -268,9 +263,6 @@ __reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage, u break; } - if (!session->evict_timeline.reentry_hs_eviction) - session->reconcile_timeline.image_build_finish = __wt_clock(session); - /* * If we failed, don't bail out yet; we still need to update stats and tidy up. */ @@ -285,16 +277,8 @@ __reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage, u */ if (ret == 0 && !(btree->evict_disabled > 0 || !F_ISSET(btree->dhandle, WT_DHANDLE_OPEN)) && F_ISSET(r, WT_REC_EVICT) && !WT_PAGE_IS_INTERNAL(r->page) && r->multi_next == 1 && - F_ISSET(r, WT_REC_CALL_URGENT) && !r->update_used && r->cache_write_restore) { - /* - * If eviction didn't make any progress, let application threads know they should refresh - * the transaction's snapshot (and try to evict the latest content). - */ - if (F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT)) - F_SET(session->txn, WT_TXN_REFRESH_SNAPSHOT); - + F_ISSET(r, WT_REC_CALL_URGENT) && !r->update_used && r->cache_write_restore) ret = __wt_set_return(session, EBUSY); - } #ifdef HAVE_DIAGNOSTIC addr = ref->addr; @@ -342,36 +326,6 @@ __reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage, u */ WT_ERR(__wt_page_parent_modify_set(session, ref, true)); - /* - * Track the longest reconciliation and time spent in each reconciliation stage, ignoring races - * (it's just a statistic). - */ - rec_finish = __wt_clock(session); - session->reconcile_timeline.reconcile_finish = rec_finish; - - rec_hs_wrapup = WT_CLOCKDIFF_MS( - session->reconcile_timeline.hs_wrapup_finish, session->reconcile_timeline.hs_wrapup_start); - rec_img_build = WT_CLOCKDIFF_MS(session->reconcile_timeline.image_build_finish, - session->reconcile_timeline.image_build_start); - rec = WT_CLOCKDIFF_MS(rec_finish, rec_start); - - /* - * Sanity check timings (WT_DAY is in seconds, and we have milliseconds). FIXME WT-12192 - * rec_hs_wrapup and rec_img_build should also have an assertion here. - */ - WT_ASSERT(session, rec < WT_DAY * WT_THOUSAND); - - if (rec_hs_wrapup > conn->rec_maximum_hs_wrapup_milliseconds) - conn->rec_maximum_hs_wrapup_milliseconds = rec_hs_wrapup; - if (rec_img_build > conn->rec_maximum_image_build_milliseconds) - conn->rec_maximum_image_build_milliseconds = rec_img_build; - if (rec > conn->rec_maximum_milliseconds) - conn->rec_maximum_milliseconds = rec; - if (session->reconcile_timeline.total_reentry_hs_eviction_time > - conn->cache->reentry_hs_eviction_ms) - conn->cache->reentry_hs_eviction_ms = - session->reconcile_timeline.total_reentry_hs_eviction_time; - err: if (ret != 0) WT_RET_PANIC(session, ret, "reconciliation failed after building the disk image"); @@ -665,9 +619,6 @@ __rec_init(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags, WT_SALVAGE_COO r->supd_next = 0; r->supd_memsize = 0; - /* The list of updates to be deleted from the history store. */ - r->delete_hs_upd_next = 0; - /* The list of pages we've written. */ r->multi = NULL; r->multi_next = 0; @@ -676,6 +627,8 @@ __rec_init(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags, WT_SALVAGE_COO r->wrapup_checkpoint = NULL; r->wrapup_checkpoint_compressed = false; + r->evict_matching_checksum_failed = false; + /* * Dictionary compression only writes repeated values once. We grow the dictionary as necessary, * always using the largest size we've seen. @@ -818,7 +771,6 @@ __rec_destroy(WT_SESSION_IMPL *session, void *reconcilep) __wt_buf_free(session, &r->chunk_B.image); __wt_free(session, r->supd); - __wt_free(session, r->delete_hs_upd); __wt_rec_dictionary_free(session, r); @@ -1910,7 +1862,7 @@ __rec_split_write_header(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_REC_CHUNK dsk->recno = btree->type == BTREE_ROW ? WT_RECNO_OOB : multi->key.recno; __rec_set_page_write_gen(btree, dsk); - dsk->mem_size = WT_STORE_SIZE(chunk->image.size); + dsk->mem_size = multi->size; dsk->u.entries = chunk->entries; dsk->type = page->type; @@ -1934,6 +1886,82 @@ __rec_split_write_header(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_REC_CHUNK } /* + * __rec_split_write_reuse -- + * Check if a previously written block can be reused. + */ +static bool +__rec_split_write_reuse( + WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_MULTI *multi, WT_ITEM *image, bool last_block) +{ + WT_MULTI *multi_match; + WT_PAGE_MODIFY *mod; + + mod = r->page->modify; + + /* + * Don't bother calculating checksums for bulk loads, there's no reason to believe they'll be + * useful. Check because LSM does bulk-loads as part of normal operations and the check is + * cheap. + */ + if (r->is_bulk_load) + return (false); + + /* + * Calculating the checksum is the expensive part, try to avoid it. + * + * Ignore the last block of any reconciliation. Pages are written in the same block order every + * time, so the last block written for a page is unlikely to match any previously written block + * or block written in the future, (absent a point-update earlier in the page which didn't + * change the size of the on-page object in any way). + */ + if (last_block) + return (false); + + /* + * Quit if evicting with no previously written block to compare against. (In other words, if + * there's eviction pressure and the page was never written by a checkpoint, calculating a + * checksum is worthless.) + * + * Quit if evicting and a previous check failed, once there's a miss no future block will match. + */ + if (F_ISSET(r, WT_REC_EVICT)) { + if (mod->rec_result != WT_PM_REC_MULTIBLOCK || mod->mod_multi_entries < r->multi_next) + return (false); + if (r->evict_matching_checksum_failed) + return (false); + } + + /* Calculate the checksum for this block. */ + multi->checksum = __wt_checksum(image->data, image->size); + + /* + * Don't check for a block match when writing a page for compaction, the whole idea is to move + * those blocks. Check after calculating the checksum, there's a possibility the calculated + * checksum will be useful in the future. + */ + if (F_ISSET_ATOMIC_16(r->page, WT_PAGE_COMPACTION_WRITE)) + return (false); + + /* + * Pages are written in the same block order every time, only check the appropriate slot. + */ + if (mod->rec_result != WT_PM_REC_MULTIBLOCK || mod->mod_multi_entries < r->multi_next) + return (false); + + multi_match = &mod->mod_multi[r->multi_next - 1]; + if (multi_match->size != multi->size || multi_match->checksum != multi->checksum) { + r->evict_matching_checksum_failed = true; + return (false); + } + + multi_match->addr.reuse = 1; + multi->addr = multi_match->addr; + + WT_STAT_DATA_INCR(session, rec_page_match); + return (true); +} + +/* * __rec_compression_adjust -- * Adjust the pre-compression page size based on compression results. */ @@ -2059,6 +2087,8 @@ __rec_split_write(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_REC_CHUNK *chunk default: return (__wt_illegal_value(session, page->type)); } + multi->size = WT_STORE_SIZE(chunk->image.size); + multi->checksum = 0; multi->supd_restore = false; /* Set the key. */ @@ -2123,6 +2153,14 @@ __rec_split_write(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_REC_CHUNK *chunk WT_ASSERT(session, chunk->entries > 0); } + /* + * If we wrote this block before, re-use it. Prefer a checksum of the compressed image. It's an + * identical test and should be faster. + */ + if (__rec_split_write_reuse(session, r, multi, + compressed_image == NULL ? &chunk->image : compressed_image, last_block)) + goto copy_image; + /* Write the disk image and get an address. */ WT_RET(__rec_write(session, compressed_image == NULL ? &chunk->image : compressed_image, addr, &addr_size, &compressed_size, false, F_ISSET(r, WT_REC_CHECKPOINT), @@ -2282,13 +2320,14 @@ __rec_split_discard(WT_SESSION_IMPL *session, WT_PAGE *page) __wt_free(session, multi->supd); /* - * If the page was re-written free the backing disk blocks used in the previous write. The - * page may instead have been a disk image with associated saved updates: ownership of the - * disk image is transferred when rewriting the page in-memory and there may not have been - * saved updates. We've gotten this wrong a few times, so use the existence of an address to - * confirm backing blocks we care about, and free any disk image/saved updates. + * If the page was re-written free the backing disk blocks used in the previous write + * (unless the blocks were reused in this write). The page may instead have been a disk + * image with associated saved updates: ownership of the disk image is transferred when + * rewriting the page in-memory and there may not have been saved updates. We've gotten this + * wrong a few times, so use the existence of an address to confirm backing blocks we care + * about, and free any disk image/saved updates. */ - if (multi->addr.addr != NULL) { + if (multi->addr.addr != NULL && !multi->addr.reuse) { WT_RET(__wt_btree_block_free(session, multi->addr.addr, multi->addr.size)); __wt_free(session, multi->addr.addr); } @@ -2341,37 +2380,6 @@ __rec_split_dump_keys(WT_SESSION_IMPL *session, WT_RECONCILE *r) } /* - * __rec_page_modify_ta_safe_free -- - * Any thread that is reviewing the page modify time aggregate in a WT_REF, must also be holding - * a split generation to ensure that the page index they are using remains valid. Use that same - * split generation to ensure that the page modify time aggregate inside the WT_REF remains - * valid while it is being reviewed. - */ -static void -__rec_page_modify_ta_safe_free(WT_SESSION_IMPL *session, WT_TIME_AGGREGATE **ta) -{ - WT_DECL_RET; - uint64_t split_gen; - void *p; - - p = *(void **)ta; - if (p == NULL) - return; - - do { - WT_ORDERED_READ(p, *ta); - if (p == NULL) - break; - } while (!__wt_atomic_cas_ptr(ta, p, NULL)); - - split_gen = __wt_gen(session, WT_GEN_SPLIT); - - if (__wt_stash_add(session, WT_GEN_SPLIT, split_gen, p, sizeof(WT_TIME_AGGREGATE)) != 0) - WT_IGNORE_RET(__wt_panic(session, ret, "fatal error during page modify ta free")); - __wt_gen_next(session, WT_GEN_SPLIT, NULL); -} - -/* * __rec_write_wrapup -- * Finish the reconciliation. */ @@ -2380,11 +2388,10 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) { WT_BM *bm; WT_BTREE *btree; - WT_DECL_RET; WT_MULTI *multi; WT_PAGE_MODIFY *mod; WT_REF *ref; - WT_TIME_AGGREGATE stop_ta, *stop_tap, ta; + WT_TIME_AGGREGATE ta; uint32_t i; btree = S2BT(session); @@ -2398,12 +2405,8 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) * visible when reconciling this page, copy them into the database's history store. This can * fail, so try before clearing the page's previous reconciliation state. */ - if (F_ISSET(r, WT_REC_HS)) { - session->reconcile_timeline.hs_wrapup_start = __wt_clock(session); - ret = __rec_hs_wrapup(session, r); - session->reconcile_timeline.hs_wrapup_finish = __wt_clock(session); - WT_RET(ret); - } + if (F_ISSET(r, WT_REC_HS)) + WT_RET(__rec_hs_wrapup(session, r)); /* * Wrap up overflow tracking. If we are about to create a checkpoint, the system must be @@ -2463,14 +2466,6 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) /* Reset the reconciliation state. */ mod->rec_result = 0; - /* - * When the page is being reconciled as part of the checkpoint operation, the REF is not locked. - * Concurrent access to the page can be enabled by safe-releasing the time aggregate - * information. - */ - __rec_page_modify_ta_safe_free(session, &mod->stop_ta); - WT_TIME_AGGREGATE_INIT_MERGE(&stop_ta); - __wt_verbose(session, WT_VERB_RECONCILE, "%p reconciled into %" PRIu32 " pages", (void *)ref, r->multi_next); @@ -2523,12 +2518,10 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) r->multi->addr.addr = NULL; mod->mod_disk_image = r->multi->disk_image; r->multi->disk_image = NULL; - WT_TIME_AGGREGATE_MERGE_OBSOLETE_VISIBLE(session, &stop_ta, &mod->mod_replace.ta); } else { __wt_checkpoint_tree_reconcile_update(session, &r->multi->addr.ta); WT_RET(__rec_write(session, r->wrapup_checkpoint, NULL, NULL, NULL, true, F_ISSET(r, WT_REC_CHECKPOINT), r->wrapup_checkpoint_compressed)); - WT_TIME_AGGREGATE_MERGE_OBSOLETE_VISIBLE(session, &stop_ta, &r->multi->addr.ta); } mod->rec_result = WT_PM_REC_REPLACE; @@ -2543,26 +2536,23 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) if (WT_VERBOSE_ISSET(session, WT_VERB_SPLIT)) WT_RET(__rec_split_dump_keys(session, r)); + /* + * The reuse flag was set in some cases, but we have to clear it, otherwise on subsequent + * reconciliation we would fail to remove blocks that are being discarded. + */ split: + for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i) + multi->addr.reuse = 0; + mod->mod_multi = r->multi; mod->mod_multi_entries = r->multi_next; mod->rec_result = WT_PM_REC_MULTIBLOCK; r->multi = NULL; r->multi_next = 0; - - /* Calculate the max stop time point by traversing all multi addresses. */ - for (multi = mod->mod_multi, i = 0; i < mod->mod_multi_entries; ++multi, ++i) - WT_TIME_AGGREGATE_MERGE_OBSOLETE_VISIBLE(session, &stop_ta, &multi->addr.ta); break; } - if (WT_TIME_AGGREGATE_HAS_STOP(&stop_ta)) { - WT_RET(__wt_calloc_one(session, &stop_tap)); - WT_TIME_AGGREGATE_COPY(stop_tap, &stop_ta); - WT_PUBLISH(mod->stop_ta, stop_tap); - } - return (0); } @@ -2575,15 +2565,33 @@ __rec_write_err(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page) { WT_DECL_RET; WT_MULTI *multi; + WT_PAGE_MODIFY *mod; uint32_t i; + mod = page->modify; + + /* + * Clear the address-reused flag from the multiblock reconciliation information (otherwise we + * might think the backing block is being reused on a subsequent reconciliation where we want to + * free it). + */ + if (mod->rec_result == WT_PM_REC_MULTIBLOCK) + for (multi = mod->mod_multi, i = 0; i < mod->mod_multi_entries; ++multi, ++i) + multi->addr.reuse = 0; + /* * On error, discard blocks we've written, they're unreferenced by the tree. This is not a * question of correctness, we're avoiding block leaks. + * + * Don't discard backing blocks marked for reuse, they remain part of a previous reconciliation. */ for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i) - if (multi->addr.addr != NULL) - WT_TRET(__wt_btree_block_free(session, multi->addr.addr, multi->addr.size)); + if (multi->addr.addr != NULL) { + if (multi->addr.reuse) + multi->addr.addr = NULL; + else + WT_TRET(__wt_btree_block_free(session, multi->addr.addr, multi->addr.size)); + } WT_TRET(__wt_ovfl_track_wrapup_err(session, page)); @@ -2612,12 +2620,6 @@ __rec_hs_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r) /* Flag as unused for non diagnostic builds. */ WT_UNUSED(btree); - /* - * Delete the updates left in the history store by prepared rollback first before moving updates - * to the history store. - */ - WT_ERR(__wt_hs_delete_updates(session, r)); - /* Check if there's work to do. */ for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i) if (multi->supd != NULL) @@ -2748,8 +2750,8 @@ __wt_rec_hs_clear_on_tombstone(WT_SESSION_IMPL *session, WT_RECONCILE *r, wt_tim * WT_REC_CHECKPOINT_RUNNING is set only during evictions, and never in the checkpoint thread * itself.) */ - WT_RET(__wt_hs_delete_key_from_ts( - session, r->hs_cursor, btree->id, key, ts, reinsert, F_ISSET(r, WT_REC_CHECKPOINT_RUNNING))); + WT_RET(__wt_hs_delete_key_from_ts(session, r->hs_cursor, btree->id, key, ts, reinsert, true, + F_ISSET(r, WT_REC_CHECKPOINT_RUNNING))); /* Fail 0.01% of the time. */ if (F_ISSET(r, WT_REC_EVICT) && diff --git a/src/third_party/wiredtiger/src/schema/schema_open.c b/src/third_party/wiredtiger/src/schema/schema_open.c index 32a26c5e55f..d75d1b2f121 100644 --- a/src/third_party/wiredtiger/src/schema/schema_open.c +++ b/src/third_party/wiredtiger/src/schema/schema_open.c @@ -245,6 +245,10 @@ __schema_open_index( const char *idxconf, *name, *tablename, *uri; bool match; + /* Check if we've already done the work. */ + if (idxname == NULL && table->idx_complete) + return (0); + cursor = NULL; idx = NULL; match = false; @@ -368,10 +372,6 @@ __wt_schema_open_index( { WT_DECL_RET; - /* Check if we've already done the work. */ - if (idxname == NULL && table->idx_complete) - return (0); - WT_WITH_TABLE_WRITE_LOCK(session, WT_WITH_TXN_ISOLATION(session, WT_ISO_READ_UNCOMMITTED, ret = __schema_open_index(session, table, idxname, len, indexp))); diff --git a/src/third_party/wiredtiger/src/schema/schema_project.c b/src/third_party/wiredtiger/src/schema/schema_project.c index 5fa901d3640..742b808f22e 100644 --- a/src/third_party/wiredtiger/src/schema/schema_project.c +++ b/src/third_party/wiredtiger/src/schema/schema_project.c @@ -27,7 +27,6 @@ __wt_schema_project_in(WT_SESSION_IMPL *session, WT_CURSOR **cp, const char *pro const uint8_t *next; char *proj; - len = 0; p = end = NULL; /* -Wuninitialized */ /* Reset any of the buffers we will be setting. */ @@ -219,7 +218,6 @@ __wt_schema_project_slice(WT_SESSION_IMPL *session, WT_CURSOR **cp, const char * char *proj; bool skip; - len = 0; p = end = NULL; /* -Wuninitialized */ WT_RET(__pack_init(session, &vpack, vformat)); @@ -386,7 +384,6 @@ __wt_schema_project_merge(WT_SESSION_IMPL *session, WT_CURSOR **cp, const char * const uint8_t *p, *end; char *proj; - len = 0; p = end = NULL; /* -Wuninitialized */ WT_RET(__wt_buf_init(session, value, 0)); diff --git a/src/third_party/wiredtiger/src/schema/schema_stat.c b/src/third_party/wiredtiger/src/schema/schema_stat.c index e56b16f0c84..6e5aa971d1e 100644 --- a/src/third_party/wiredtiger/src/schema/schema_stat.c +++ b/src/third_party/wiredtiger/src/schema/schema_stat.c @@ -147,27 +147,13 @@ __wt_curstat_table_init( WT_ERR(__wt_scr_alloc(session, 0, &buf)); - stats = &cst->u.dsrc_stats; - - /* - * If gathering statistics for a simple table, retrieve the underlying file's statistics rather - * than going through the usual schema parsing flow. This avoids unnecessary overhead in the - * statistics gathering process. - * - * There will always be at least one column group for a table. - */ - if (table->is_simple) { - WT_ERR(__wt_buf_fmt(session, buf, "statistics:%s", table->cgroups[0]->name)); - WT_ERR(__wt_curstat_init(session, buf->data, NULL, cfg, cst)); - goto done; - } - /* * Process the column groups. * * Set the cursor to reference the data source statistics; we don't initialize it, instead we * copy (rather than aggregate), the first column's statistics, which has the same effect. */ + stats = &cst->u.dsrc_stats; for (i = 0; i < WT_COLGROUPS(table); i++) { WT_ERR(__wt_buf_fmt(session, buf, "statistics:%s", table->cgroups[i]->name)); WT_ERR(__wt_curstat_open(session, buf->data, NULL, cfg, &stat_cursor)); @@ -191,7 +177,6 @@ __wt_curstat_table_init( __wt_curstat_dsrc_final(cst); -done: err: WT_TRET(__wt_schema_release_table(session, &table)); diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c index 94709c991c3..8adaee16387 100644 --- a/src/third_party/wiredtiger/src/session/session_api.c +++ b/src/third_party/wiredtiger/src/session/session_api.c @@ -52,70 +52,43 @@ __wt_session_reset_cursors(WT_SESSION_IMPL *session, bool free_buffers) * Sweep the cursor cache. */ int -__wt_session_cursor_cache_sweep(WT_SESSION_IMPL *session, bool big_sweep) +__wt_session_cursor_cache_sweep(WT_SESSION_IMPL *session) { - WT_CONNECTION_IMPL *conn; WT_CURSOR *cursor, *cursor_tmp; WT_CURSOR_LIST *cached_list; WT_DECL_RET; #ifdef HAVE_DIAGNOSTIC WT_DATA_HANDLE *saved_dhandle; #endif - uint64_t now, sweep_max, sweep_min; - uint32_t i, nbuckets, nclosed, nexamined, position; - int t_ret; + uint64_t now; + uint32_t position; + int i, t_ret, nbuckets, nexamined, nclosed; bool productive; if (!F_ISSET(session, WT_SESSION_CACHE_CURSORS)) return (0); - conn = S2C(session); - /* * Periodically sweep for dead cursors; if we've swept recently, don't do it again. - * - * Each call of this sweep function visits all the cursors in some number of buckets used by the - * cursor cache. If any of the visited cursors reference dead or dying data handles those - * cursors are fully closed and removed from the cache. Removing a cursor from the cursor cache - * has the important effect of freeing a reference to the associated data handle. Data handles - * can be closed and marked dead, but cannot be freed until all referencing sessions give up - * their references. So sweeping the cursor cache (for all sessions!) is a prerequisite for the - * connection data handle sweep to find handles that can be freed. - * - * We determine the number of buckets to visit based on how this function is called. When - * big_sweep is true and enough time has passed, walk through at least a quarter of the buckets, - * and as long as there is progress finding enough cursors to close, continue on, up to the - * entire set of buckets. - * - * When big_sweep is false, we start with a small set of buckets to look at and quit when we - * stop making progress or when we reach the maximum configured. This way, we amortize the work - * of the sweep over many calls in a performance path. */ __wt_seconds(session, &now); - if (big_sweep && now - session->last_cursor_big_sweep >= 30) { - session->last_cursor_big_sweep = session->last_cursor_sweep = now; - sweep_min = conn->hash_size / 4; - sweep_max = conn->hash_size; - } else if (now - session->last_cursor_sweep >= 1) { - session->last_cursor_sweep = now; - sweep_min = WT_SESSION_CURSOR_SWEEP_MIN; - sweep_max = WT_SESSION_CURSOR_SWEEP_MAX; - } else + if (now - session->last_cursor_sweep < 1) return (0); + session->last_cursor_sweep = now; position = session->cursor_sweep_position; productive = true; - nbuckets = nclosed = nexamined = 0; + nbuckets = nexamined = nclosed = 0; #ifdef HAVE_DIAGNOSTIC saved_dhandle = session->dhandle; #endif /* Turn off caching so that cursor close doesn't try to cache. */ F_CLR(session, WT_SESSION_CACHE_CURSORS); - for (i = 0; i < sweep_max && productive; i++) { + for (i = 0; i < WT_SESSION_CURSOR_SWEEP_MAX && productive; i++) { ++nbuckets; cached_list = &session->cursor_cache[position]; - position = (position + 1) & (conn->hash_size - 1); + position = (position + 1) & (S2C(session)->hash_size - 1); TAILQ_FOREACH_SAFE(cursor, cached_list, q, cursor_tmp) { /* @@ -135,7 +108,7 @@ __wt_session_cursor_cache_sweep(WT_SESSION_IMPL *session, bool big_sweep) * We continue sweeping as long as we have some good average productivity, or we are under * the minimum. */ - productive = (nclosed + sweep_min > i); + productive = (nclosed + WT_SESSION_CURSOR_SWEEP_MIN > i); } session->cursor_sweep_position = position; @@ -1074,13 +1047,10 @@ __session_reset(WT_SESSION *wt_session) WT_TRET(__wt_session_reset_cursors(session, true)); - /* - * Run the session sweeps. Run the cursor cache sweep with "big" option to sweep more, as we're - * not in a performance path. - */ - session->cursor_sweep_countdown = WT_SESSION_CURSOR_SWEEP_COUNTDOWN; - WT_TRET(__wt_session_cursor_cache_sweep(session, true)); - __wt_session_dhandle_sweep(session); + if (--session->cursor_sweep_countdown == 0) { + session->cursor_sweep_countdown = WT_SESSION_CURSOR_SWEEP_COUNTDOWN; + WT_TRET(__wt_session_cursor_cache_sweep(session)); + } /* Release common session resources. */ WT_TRET(__wt_session_release_resources(session)); @@ -1669,7 +1639,6 @@ __session_begin_transaction(WT_SESSION *wt_session, const char *config) session = (WT_SESSION_IMPL *)wt_session; SESSION_API_CALL_PREPARE_NOT_ALLOWED(session, begin_transaction, config, cfg); WT_STAT_CONN_INCR(session, txn_begin); - WT_STAT_SESSION_SET(session, txn_bytes_dirty, 0); WT_ERR(__wt_txn_context_check(session, false)); diff --git a/src/third_party/wiredtiger/src/session/session_dhandle.c b/src/third_party/wiredtiger/src/session/session_dhandle.c index efb1dcdb820..685bc6e0c46 100644 --- a/src/third_party/wiredtiger/src/session/session_dhandle.c +++ b/src/third_party/wiredtiger/src/session/session_dhandle.c @@ -210,9 +210,7 @@ __wt_session_lock_dhandle(WT_SESSION_IMPL *session, uint32_t flags, bool *is_dea /* Give other threads a chance to make progress. */ WT_STAT_CONN_INCR(session, dhandle_lock_blocked); - - /* FIXME-WT-12037 Use a sleep to work around a Windows-specific scheduling issue. */ - __wt_sleep(0, 1); + __wt_yield(); } } @@ -354,11 +352,11 @@ __wt_session_close_cache(WT_SESSION_IMPL *session) } /* - * __wt_session_dhandle_sweep -- + * __session_dhandle_sweep -- * Discard any session dhandles that are not open. */ -void -__wt_session_dhandle_sweep(WT_SESSION_IMPL *session) +static void +__session_dhandle_sweep(WT_SESSION_IMPL *session) { WT_CONNECTION_IMPL *conn; WT_DATA_HANDLE *dhandle; @@ -438,7 +436,7 @@ __session_get_dhandle(WT_SESSION_IMPL *session, const char *uri, const char *che } /* Sweep the handle list to remove any dead handles. */ - __wt_session_dhandle_sweep(session); + __session_dhandle_sweep(session); /* * We didn't find a match in the session cache, search the shared handle list and cache the diff --git a/src/third_party/wiredtiger/src/support/generation.c b/src/third_party/wiredtiger/src/support/generation.c index f5272c3d45d..02dfce6fe30 100644 --- a/src/third_party/wiredtiger/src/support/generation.c +++ b/src/third_party/wiredtiger/src/support/generation.c @@ -214,14 +214,7 @@ __gen_oldest(WT_SESSION_IMPL *session, int which) * the sessions that could have been active when we started our check. */ WT_ORDERED_READ(session_cnt, conn->session_cnt); - /* - * We need to order the read of the connection generation before the read of the session - * generation. If the session generation read is ordered before the connection generation read - * it could read an earlier session generation value. This would then violate the acquisition - * semantics and could result in us reading 0 for the session generation when it is non-zero. - */ - WT_ORDERED_READ(oldest, conn->generations[which]); - for (s = conn->sessions, i = 0; i < session_cnt; ++s, ++i) { + for (oldest = conn->generations[which], s = conn->sessions, i = 0; i < session_cnt; ++s, ++i) { if (!s->active) continue; @@ -305,16 +298,11 @@ __wt_session_gen_enter(WT_SESSION_IMPL *session, int which) * Assign the thread's resource generation and publish it, ensuring threads waiting on a * resource to drain see the new value. Check we haven't raced with a generation update after * publishing, we rely on the published value not being missed when scanning for the oldest - * generation and for draining. - * - * This requires a full barrier as the second read of the connection generation needs to be - * ordered after the write of our session's generation. If it is reordered it could be read, for - * example before we do the first read. This would make re-checking redundant and in this case - * can result in the generation drain and generation oldest code not working correctly. + * generation. */ do { session->generations[which] = __wt_gen(session, which); - WT_FULL_BARRIER(); + WT_WRITE_BARRIER(); } while (session->generations[which] != __wt_gen(session, which)); } diff --git a/src/third_party/wiredtiger/src/support/rand.c b/src/third_party/wiredtiger/src/support/rand.c index 440719cc715..805c227dd24 100644 --- a/src/third_party/wiredtiger/src/support/rand.c +++ b/src/third_party/wiredtiger/src/support/rand.c @@ -39,17 +39,11 @@ * result in a stored value of zero, in which case they will be stuck on zero forever. Take a local * copy of the values to avoid that, and read/write in atomic, 8B chunks. */ -#undef M_V -#define M_V(r) r.v #undef M_W #define M_W(r) r.x.w #undef M_Z #define M_Z(r) r.x.z -#define DEFAULT_SEED_W 521288629 -#define DEFAULT_SEED_Z 362436069 -#define WT_LEFT_CIRCULAR_SHIFT32(x, nbits) (((x) << (nbits)) | ((x) >> (32 - (nbits)))) - /* * __wt_random_init -- * Initialize return of a 32-bit pseudo-random number. @@ -59,8 +53,8 @@ __wt_random_init(WT_RAND_STATE volatile *rnd_state) WT_GCC_FUNC_ATTRIBUTE((visib { WT_RAND_STATE rnd; - M_W(rnd) = DEFAULT_SEED_W; - M_Z(rnd) = DEFAULT_SEED_Z; + M_W(rnd) = 521288629; + M_Z(rnd) = 362436069; *rnd_state = rnd; } @@ -78,44 +72,9 @@ __wt_random_init_seed(WT_SESSION_IMPL *session, WT_RAND_STATE volatile *rnd_stat WT_RAND_STATE rnd; __wt_epoch(session, &ts); + M_W(rnd) = (uint32_t)(ts.tv_nsec + 521288629); + M_Z(rnd) = (uint32_t)(ts.tv_nsec + 362436069); - /* - * Use this, instead of __wt_random_init, to vary the initial state of the RNG. This is - * (currently) only used by test programs, where, for example, an initial set of test data is - * created by a single thread, and we want more variability in the initial state of the RNG. - * - * Take the seconds and nanoseconds from the clock together with the thread ID to generate a - * 64-bit seed, then smear that value using algorithm "xor" from Marsaglia, "Xorshift RNGs". - */ - M_W(rnd) = - (uint32_t)ts.tv_sec ^ (uint32_t)WT_LEFT_CIRCULAR_SHIFT32(ts.tv_nsec, 29) ^ DEFAULT_SEED_W; - M_Z(rnd) = - (uint32_t)ts.tv_nsec ^ (uint32_t)WT_LEFT_CIRCULAR_SHIFT32(ts.tv_sec, 27) ^ DEFAULT_SEED_Z; -/* - * Some system clocks do not have a high enough resolution between each tick cycle. Perform an extra - * xor against the machine's timestamp counter. - */ -#ifdef _WIN32 - rnd.v ^= __wt_rdtsc(); -#endif - rnd.v ^= rnd.v << 13; - rnd.v ^= rnd.v >> 7; - rnd.v ^= rnd.v << 17; - - *rnd_state = rnd; -} - -/* - * __wt_random_init_custom_seed -- - * Initialize the state of a 32-bit pseudo-random number with custom seed. - */ -void -__wt_random_init_custom_seed(WT_RAND_STATE volatile *rnd_state, uint64_t v) - WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) -{ - WT_RAND_STATE rnd; - - M_V(rnd) = v; *rnd_state = rnd; } diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index 35ceabbab66..5187beac9cc 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -15,8 +15,6 @@ static const char *const __stats_dsrc_desc[] = { "LSM: sleep for LSM checkpoint throttle", "LSM: sleep for LSM merge throttle", "LSM: total size of bloom filters", - "autocommit: retries for readonly operations", - "autocommit: retries for update operations", "block-manager: allocations requiring file extension", "block-manager: blocks allocated", "block-manager: blocks freed", @@ -32,7 +30,6 @@ static const char *const __stats_dsrc_desc[] = { "btree: btree compact pages reviewed", "btree: btree compact pages rewritten", "btree: btree compact pages skipped", - "btree: btree number of pages reconciled during checkpoint", "btree: btree skipped by compaction as process would not reduce size", "btree: column-store fixed-size leaf pages", "btree: column-store fixed-size time windows", @@ -66,8 +63,6 @@ static const char *const __stats_dsrc_desc[] = { "disk update after validating the update chain", "cache: eviction gave up due to detecting out of order timestamps on the update chain after the " "selected on disk update", - "cache: eviction gave up due to needing to remove a record from the history store but checkpoint " - "is running", "cache: eviction walk passes of a file", "cache: eviction walk target pages histogram - 0-9", "cache: eviction walk target pages histogram - 10-31", @@ -79,7 +74,6 @@ static const char *const __stats_dsrc_desc[] = { "cache: eviction walks gave up because they restarted their walk twice", "cache: eviction walks gave up because they saw too many pages and found no candidates", "cache: eviction walks gave up because they saw too many pages and found too few candidates", - "cache: eviction walks random search fails to locate a page, results in a null position", "cache: eviction walks reached end of tree", "cache: eviction walks restarted", "cache: eviction walks started from root of tree", @@ -106,7 +100,6 @@ static const char *const __stats_dsrc_desc[] = { "cache: internal pages evicted", "cache: internal pages split during eviction", "cache: leaf pages split during eviction", - "cache: locate a random in-mem ref by examining all entries on the root page", "cache: modified pages evicted", "cache: overflow pages read into cache", "cache: page split during eviction deepened the tree", @@ -162,11 +155,9 @@ static const char *const __stats_dsrc_desc[] = { "compression: number of blocks with compress ratio smaller than 8", "compression: page written failed to compress", "compression: page written was too small to compress", - "cursor: Total number of deleted pages skipped during tree walk", "cursor: Total number of entries skipped by cursor next calls", "cursor: Total number of entries skipped by cursor prev calls", "cursor: Total number of entries skipped to position the history store cursor", - "cursor: Total number of in-memory deleted pages skipped during tree walk", "cursor: Total number of times a search near has exited due to prefix config", "cursor: bulk loaded cursor insert calls", "cursor: cache cursors reuse count", @@ -209,6 +200,7 @@ static const char *const __stats_dsrc_desc[] = { "reconciliation: leaf-page overflow keys", "reconciliation: maximum blocks required for a page", "reconciliation: overflow values written", + "reconciliation: page checksum matches", "reconciliation: page reconciliation calls", "reconciliation: page reconciliation calls for eviction", "reconciliation: pages deleted", @@ -237,8 +229,6 @@ static const char *const __stats_dsrc_desc[] = { "session: tiered operations dequeued and processed", "session: tiered operations scheduled", "session: tiered storage local retention time (secs)", - "transaction: a reader raced with a prepared transaction commit and skipped an update or updates", - "transaction: checkpoint has acquired a snapshot for its transaction", "transaction: race to read prepared update retry", "transaction: rollback to stable history store records with stop timestamps older than newer " "records", @@ -305,8 +295,6 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->lsm_checkpoint_throttle = 0; stats->lsm_merge_throttle = 0; stats->bloom_size = 0; - stats->autocommit_readonly_retry = 0; - stats->autocommit_update_retry = 0; stats->block_extension = 0; stats->block_alloc = 0; stats->block_free = 0; @@ -322,7 +310,6 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) /* not clearing btree_compact_pages_reviewed */ /* not clearing btree_compact_pages_rewritten */ /* not clearing btree_compact_pages_skipped */ - /* not clearing btree_checkpoint_pages_reconciled */ /* not clearing btree_compact_skipped */ stats->btree_column_fix = 0; stats->btree_column_tws = 0; @@ -352,7 +339,6 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->cache_eviction_blocked_ooo_checkpoint_race_2 = 0; stats->cache_eviction_blocked_ooo_checkpoint_race_3 = 0; stats->cache_eviction_blocked_ooo_checkpoint_race_4 = 0; - stats->cache_eviction_blocked_remove_hs_race_with_checkpoint = 0; stats->cache_eviction_walk_passes = 0; stats->cache_eviction_target_page_lt10 = 0; stats->cache_eviction_target_page_lt32 = 0; @@ -364,7 +350,6 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->cache_eviction_walks_stopped = 0; stats->cache_eviction_walks_gave_up_no_targets = 0; stats->cache_eviction_walks_gave_up_ratio = 0; - stats->cache_eviction_walk_random_returns_null_position = 0; stats->cache_eviction_walks_ended = 0; stats->cache_eviction_walk_restart = 0; stats->cache_eviction_walk_from_root = 0; @@ -388,7 +373,6 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->cache_eviction_internal = 0; stats->cache_eviction_split_internal = 0; stats->cache_eviction_split_leaf = 0; - stats->cache_eviction_random_sample_inmem_root = 0; stats->cache_eviction_dirty = 0; stats->cache_read_overflow = 0; stats->cache_eviction_deepen = 0; @@ -442,11 +426,9 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->compress_hist_ratio_8 = 0; stats->compress_write_fail = 0; stats->compress_write_too_small = 0; - stats->cursor_tree_walk_del_page_skip = 0; stats->cursor_next_skip_total = 0; stats->cursor_prev_skip_total = 0; stats->cursor_skip_hs_cur_position = 0; - stats->cursor_tree_walk_inmem_del_page_skip = 0; stats->cursor_search_near_prefix_fast_paths = 0; stats->cursor_insert_bulk = 0; stats->cursor_reopen = 0; @@ -489,6 +471,7 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->rec_overflow_key_leaf = 0; stats->rec_multiblock_max = 0; stats->rec_overflow_value = 0; + stats->rec_page_match = 0; stats->rec_pages = 0; stats->rec_pages_eviction = 0; stats->rec_page_delete = 0; @@ -517,8 +500,6 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->tiered_work_units_dequeued = 0; stats->tiered_work_units_created = 0; /* not clearing tiered_retention */ - stats->txn_read_race_prepare_commit = 0; - stats->txn_checkpoint_snapshot_acquired = 0; stats->txn_read_race_prepare_update = 0; stats->txn_rts_hs_stop_older_than_newer_start = 0; stats->txn_rts_inconsistent_ckpt = 0; @@ -559,8 +540,6 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->lsm_checkpoint_throttle += from->lsm_checkpoint_throttle; to->lsm_merge_throttle += from->lsm_merge_throttle; to->bloom_size += from->bloom_size; - to->autocommit_readonly_retry += from->autocommit_readonly_retry; - to->autocommit_update_retry += from->autocommit_update_retry; to->block_extension += from->block_extension; to->block_alloc += from->block_alloc; to->block_free += from->block_free; @@ -580,7 +559,6 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->btree_compact_pages_reviewed += from->btree_compact_pages_reviewed; to->btree_compact_pages_rewritten += from->btree_compact_pages_rewritten; to->btree_compact_pages_skipped += from->btree_compact_pages_skipped; - to->btree_checkpoint_pages_reconciled += from->btree_checkpoint_pages_reconciled; to->btree_compact_skipped += from->btree_compact_skipped; to->btree_column_fix += from->btree_column_fix; to->btree_column_tws += from->btree_column_tws; @@ -620,8 +598,6 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) from->cache_eviction_blocked_ooo_checkpoint_race_3; to->cache_eviction_blocked_ooo_checkpoint_race_4 += from->cache_eviction_blocked_ooo_checkpoint_race_4; - to->cache_eviction_blocked_remove_hs_race_with_checkpoint += - from->cache_eviction_blocked_remove_hs_race_with_checkpoint; to->cache_eviction_walk_passes += from->cache_eviction_walk_passes; to->cache_eviction_target_page_lt10 += from->cache_eviction_target_page_lt10; to->cache_eviction_target_page_lt32 += from->cache_eviction_target_page_lt32; @@ -633,8 +609,6 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->cache_eviction_walks_stopped += from->cache_eviction_walks_stopped; to->cache_eviction_walks_gave_up_no_targets += from->cache_eviction_walks_gave_up_no_targets; to->cache_eviction_walks_gave_up_ratio += from->cache_eviction_walks_gave_up_ratio; - to->cache_eviction_walk_random_returns_null_position += - from->cache_eviction_walk_random_returns_null_position; to->cache_eviction_walks_ended += from->cache_eviction_walks_ended; to->cache_eviction_walk_restart += from->cache_eviction_walk_restart; to->cache_eviction_walk_from_root += from->cache_eviction_walk_from_root; @@ -658,7 +632,6 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->cache_eviction_internal += from->cache_eviction_internal; to->cache_eviction_split_internal += from->cache_eviction_split_internal; to->cache_eviction_split_leaf += from->cache_eviction_split_leaf; - to->cache_eviction_random_sample_inmem_root += from->cache_eviction_random_sample_inmem_root; to->cache_eviction_dirty += from->cache_eviction_dirty; to->cache_read_overflow += from->cache_read_overflow; to->cache_eviction_deepen += from->cache_eviction_deepen; @@ -712,11 +685,9 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->compress_hist_ratio_8 += from->compress_hist_ratio_8; to->compress_write_fail += from->compress_write_fail; to->compress_write_too_small += from->compress_write_too_small; - to->cursor_tree_walk_del_page_skip += from->cursor_tree_walk_del_page_skip; to->cursor_next_skip_total += from->cursor_next_skip_total; to->cursor_prev_skip_total += from->cursor_prev_skip_total; to->cursor_skip_hs_cur_position += from->cursor_skip_hs_cur_position; - to->cursor_tree_walk_inmem_del_page_skip += from->cursor_tree_walk_inmem_del_page_skip; to->cursor_search_near_prefix_fast_paths += from->cursor_search_near_prefix_fast_paths; to->cursor_insert_bulk += from->cursor_insert_bulk; to->cursor_reopen += from->cursor_reopen; @@ -760,6 +731,7 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) if (from->rec_multiblock_max > to->rec_multiblock_max) to->rec_multiblock_max = from->rec_multiblock_max; to->rec_overflow_value += from->rec_overflow_value; + to->rec_page_match += from->rec_page_match; to->rec_pages += from->rec_pages; to->rec_pages_eviction += from->rec_pages_eviction; to->rec_page_delete += from->rec_page_delete; @@ -788,8 +760,6 @@ __wt_stat_dsrc_aggregate_single(WT_DSRC_STATS *from, WT_DSRC_STATS *to) to->tiered_work_units_dequeued += from->tiered_work_units_dequeued; to->tiered_work_units_created += from->tiered_work_units_created; to->tiered_retention += from->tiered_retention; - to->txn_read_race_prepare_commit += from->txn_read_race_prepare_commit; - to->txn_checkpoint_snapshot_acquired += from->txn_checkpoint_snapshot_acquired; to->txn_read_race_prepare_update += from->txn_read_race_prepare_update; to->txn_rts_hs_stop_older_than_newer_start += from->txn_rts_hs_stop_older_than_newer_start; to->txn_rts_inconsistent_ckpt += from->txn_rts_inconsistent_ckpt; @@ -823,8 +793,6 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) to->lsm_checkpoint_throttle += WT_STAT_READ(from, lsm_checkpoint_throttle); to->lsm_merge_throttle += WT_STAT_READ(from, lsm_merge_throttle); to->bloom_size += WT_STAT_READ(from, bloom_size); - to->autocommit_readonly_retry += WT_STAT_READ(from, autocommit_readonly_retry); - to->autocommit_update_retry += WT_STAT_READ(from, autocommit_update_retry); to->block_extension += WT_STAT_READ(from, block_extension); to->block_alloc += WT_STAT_READ(from, block_alloc); to->block_free += WT_STAT_READ(from, block_free); @@ -844,7 +812,6 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) to->btree_compact_pages_reviewed += WT_STAT_READ(from, btree_compact_pages_reviewed); to->btree_compact_pages_rewritten += WT_STAT_READ(from, btree_compact_pages_rewritten); to->btree_compact_pages_skipped += WT_STAT_READ(from, btree_compact_pages_skipped); - to->btree_checkpoint_pages_reconciled += WT_STAT_READ(from, btree_checkpoint_pages_reconciled); to->btree_compact_skipped += WT_STAT_READ(from, btree_compact_skipped); to->btree_column_fix += WT_STAT_READ(from, btree_column_fix); to->btree_column_tws += WT_STAT_READ(from, btree_column_tws); @@ -885,8 +852,6 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) WT_STAT_READ(from, cache_eviction_blocked_ooo_checkpoint_race_3); to->cache_eviction_blocked_ooo_checkpoint_race_4 += WT_STAT_READ(from, cache_eviction_blocked_ooo_checkpoint_race_4); - to->cache_eviction_blocked_remove_hs_race_with_checkpoint += - WT_STAT_READ(from, cache_eviction_blocked_remove_hs_race_with_checkpoint); to->cache_eviction_walk_passes += WT_STAT_READ(from, cache_eviction_walk_passes); to->cache_eviction_target_page_lt10 += WT_STAT_READ(from, cache_eviction_target_page_lt10); to->cache_eviction_target_page_lt32 += WT_STAT_READ(from, cache_eviction_target_page_lt32); @@ -901,8 +866,6 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) WT_STAT_READ(from, cache_eviction_walks_gave_up_no_targets); to->cache_eviction_walks_gave_up_ratio += WT_STAT_READ(from, cache_eviction_walks_gave_up_ratio); - to->cache_eviction_walk_random_returns_null_position += - WT_STAT_READ(from, cache_eviction_walk_random_returns_null_position); to->cache_eviction_walks_ended += WT_STAT_READ(from, cache_eviction_walks_ended); to->cache_eviction_walk_restart += WT_STAT_READ(from, cache_eviction_walk_restart); to->cache_eviction_walk_from_root += WT_STAT_READ(from, cache_eviction_walk_from_root); @@ -929,8 +892,6 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) to->cache_eviction_internal += WT_STAT_READ(from, cache_eviction_internal); to->cache_eviction_split_internal += WT_STAT_READ(from, cache_eviction_split_internal); to->cache_eviction_split_leaf += WT_STAT_READ(from, cache_eviction_split_leaf); - to->cache_eviction_random_sample_inmem_root += - WT_STAT_READ(from, cache_eviction_random_sample_inmem_root); to->cache_eviction_dirty += WT_STAT_READ(from, cache_eviction_dirty); to->cache_read_overflow += WT_STAT_READ(from, cache_read_overflow); to->cache_eviction_deepen += WT_STAT_READ(from, cache_eviction_deepen); @@ -986,12 +947,9 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) to->compress_hist_ratio_8 += WT_STAT_READ(from, compress_hist_ratio_8); to->compress_write_fail += WT_STAT_READ(from, compress_write_fail); to->compress_write_too_small += WT_STAT_READ(from, compress_write_too_small); - to->cursor_tree_walk_del_page_skip += WT_STAT_READ(from, cursor_tree_walk_del_page_skip); to->cursor_next_skip_total += WT_STAT_READ(from, cursor_next_skip_total); to->cursor_prev_skip_total += WT_STAT_READ(from, cursor_prev_skip_total); to->cursor_skip_hs_cur_position += WT_STAT_READ(from, cursor_skip_hs_cur_position); - to->cursor_tree_walk_inmem_del_page_skip += - WT_STAT_READ(from, cursor_tree_walk_inmem_del_page_skip); to->cursor_search_near_prefix_fast_paths += WT_STAT_READ(from, cursor_search_near_prefix_fast_paths); to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk); @@ -1036,6 +994,7 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) if ((v = WT_STAT_READ(from, rec_multiblock_max)) > to->rec_multiblock_max) to->rec_multiblock_max = v; to->rec_overflow_value += WT_STAT_READ(from, rec_overflow_value); + to->rec_page_match += WT_STAT_READ(from, rec_page_match); to->rec_pages += WT_STAT_READ(from, rec_pages); to->rec_pages_eviction += WT_STAT_READ(from, rec_pages_eviction); to->rec_page_delete += WT_STAT_READ(from, rec_page_delete); @@ -1068,8 +1027,6 @@ __wt_stat_dsrc_aggregate(WT_DSRC_STATS **from, WT_DSRC_STATS *to) to->tiered_work_units_dequeued += WT_STAT_READ(from, tiered_work_units_dequeued); to->tiered_work_units_created += WT_STAT_READ(from, tiered_work_units_created); to->tiered_retention += WT_STAT_READ(from, tiered_retention); - to->txn_read_race_prepare_commit += WT_STAT_READ(from, txn_read_race_prepare_commit); - to->txn_checkpoint_snapshot_acquired += WT_STAT_READ(from, txn_checkpoint_snapshot_acquired); to->txn_read_race_prepare_update += WT_STAT_READ(from, txn_read_race_prepare_update); to->txn_rts_hs_stop_older_than_newer_start += WT_STAT_READ(from, txn_rts_hs_stop_older_than_newer_start); @@ -1097,8 +1054,6 @@ static const char *const __stats_connection_desc[] = { "LSM: tree maintenance operations executed", "LSM: tree maintenance operations scheduled", "LSM: tree queue hit maximum", - "autocommit: retries for readonly operations", - "autocommit: retries for update operations", "block-cache: cached blocks updated", "block-cache: cached bytes updated", "block-cache: evicted blocks", @@ -1162,24 +1117,10 @@ static const char *const __stats_connection_desc[] = { "disk update after validating the update chain", "cache: eviction gave up due to detecting out of order timestamps on the update chain after the " "selected on disk update", - "cache: eviction gave up due to needing to remove a record from the history store but checkpoint " - "is running", "cache: eviction passes of a file", "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 skips dirty pages during a running checkpoint", - "cache: eviction server skips metadata pages with history", - "cache: eviction server skips pages that are written with transactions greater than the last " - "running", - "cache: eviction server skips pages that previously failed eviction and likely will again", - "cache: eviction server skips pages that we do not want to evict", - "cache: eviction server skips tree that we do not want to evict", - "cache: eviction server skips trees because there are too many active walks", - "cache: eviction server skips trees that are being checkpointed", - "cache: eviction server skips trees that are configured to stick in cache", - "cache: eviction server skips trees that disable eviction", - "cache: eviction server skips trees that were not useful before", "cache: eviction server slept, because we did not make progress with eviction", "cache: eviction server unable to reach eviction goal", "cache: eviction server waiting for a leaf page", @@ -1198,7 +1139,6 @@ static const char *const __stats_connection_desc[] = { "cache: eviction walks gave up because they restarted their walk twice", "cache: eviction walks gave up because they saw too many pages and found no candidates", "cache: eviction walks gave up because they saw too many pages and found too few candidates", - "cache: eviction walks random search fails to locate a page, results in a null position", "cache: eviction walks reached end of tree", "cache: eviction walks restarted", "cache: eviction walks started from root of tree", @@ -1211,8 +1151,6 @@ static const char *const __stats_connection_desc[] = { "cache: files with active eviction walks", "cache: files with new eviction walks started", "cache: force re-tuning of eviction workers once in a while", - "cache: forced eviction - do not retry count to evict pages selected to evict during " - "reconciliation", "cache: forced eviction - history store pages failed to evict while session has history store " "cursor open", "cache: forced eviction - history store pages selected while session has history store cursor " @@ -1258,10 +1196,8 @@ static const char *const __stats_connection_desc[] = { "cache: internal pages seen by eviction walk that are already queued", "cache: internal pages split during eviction", "cache: leaf pages split during eviction", - "cache: locate a random in-mem ref by examining all entries on the root page", "cache: maximum bytes configured", - "cache: maximum milliseconds spent at a single eviction", - "cache: maximum page size seen at eviction", + "cache: maximum page size at eviction", "cache: modified pages evicted", "cache: modified pages evicted by application threads", "cache: operations timed out waiting for space in cache", @@ -1279,7 +1215,6 @@ static const char *const __stats_connection_desc[] = { "cache: pages read into cache", "cache: pages read into cache after truncate", "cache: pages read into cache after truncate in prepare state", - "cache: pages removed from the ordinary queue to be queued for urgent eviction", "cache: pages requested from the cache", "cache: pages seen by eviction walk", "cache: pages seen by eviction walk that are already queued", @@ -1295,7 +1230,6 @@ static const char *const __stats_connection_desc[] = { "cache: percentage overhead", "cache: the number of times full update inserted to history store", "cache: the number of times reverse modify inserted to history store", - "cache: total milliseconds spent inside reentrant history store evictions in a reconciliation", "cache: tracked bytes belonging to internal pages in the cache", "cache: tracked bytes belonging to leaf pages in the cache", "cache: tracked dirty bytes in the cache", @@ -1335,13 +1269,10 @@ static const char *const __stats_connection_desc[] = { "connection: total fsync I/Os", "connection: total read I/Os", "connection: total write I/Os", - "cursor: Total number of deleted pages skipped during tree walk", "cursor: Total number of entries skipped by cursor next calls", "cursor: Total number of entries skipped by cursor prev calls", "cursor: Total number of entries skipped to position the history store cursor", - "cursor: Total number of in-memory deleted pages skipped during tree walk", "cursor: Total number of times a search near has exited due to prefix config", - "cursor: bulk cursor count", "cursor: cached cursor count", "cursor: cursor bulk loaded cursor insert calls", "cursor: cursor close calls that result in cache", @@ -1488,10 +1419,7 @@ static const char *const __stats_connection_desc[] = { "reconciliation: approximate byte size of transaction IDs in pages written", "reconciliation: fast-path pages deleted", "reconciliation: leaf-page overflow keys", - "reconciliation: maximum milliseconds spent in a reconciliation call", - "reconciliation: maximum milliseconds spent in building a disk image in a reconciliation", - "reconciliation: maximum milliseconds spent in moving updates to the history store in a " - "reconciliation", + "reconciliation: maximum seconds spent in a reconciliation call", "reconciliation: page reconciliation calls", "reconciliation: page reconciliation calls for eviction", "reconciliation: page reconciliation calls that resulted in values with prepared transaction " @@ -1557,7 +1485,6 @@ static const char *const __stats_connection_desc[] = { "thread-state: active filesystem fsync calls", "thread-state: active filesystem read calls", "thread-state: active filesystem write calls", - "thread-yield: application thread snapshot refreshed for eviction", "thread-yield: application thread time evicting (usecs)", "thread-yield: application thread time waiting for cache (usecs)", "thread-yield: connection close blocked waiting for transaction state stabilization", @@ -1576,13 +1503,13 @@ static const char *const __stats_connection_desc[] = { "transaction: Number of prepared updates committed", "transaction: Number of prepared updates repeated on the same key", "transaction: Number of prepared updates rolled back", - "transaction: a reader raced with a prepared transaction commit and skipped an update or updates", - "transaction: checkpoint has acquired a snapshot for its transaction", - "transaction: oldest pinned transaction ID rolled back for eviction", "transaction: prepared transactions", "transaction: prepared transactions committed", "transaction: prepared transactions currently active", "transaction: prepared transactions rolled back", + "transaction: prepared transactions rolled back and do not remove the history store entry", + "transaction: prepared transactions rolled back and fix the history store entry with checkpoint " + "reserved transaction id", "transaction: query timestamp calls", "transaction: race to read prepared update retry", "transaction: rollback to stable calls", @@ -1634,6 +1561,7 @@ static const char *const __stats_connection_desc[] = { "transaction: transaction checkpoints", "transaction: transaction checkpoints due to obsolete pages", "transaction: transaction checkpoints skipped because database was clean", + "transaction: transaction failures due to history store", "transaction: transaction fsync calls for checkpoint after allocating the transaction ID", "transaction: transaction fsync duration for checkpoint after allocating the transaction ID " "(usecs)", @@ -1699,8 +1627,6 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->lsm_work_units_done = 0; stats->lsm_work_units_created = 0; stats->lsm_work_queue_max = 0; - stats->autocommit_readonly_retry = 0; - stats->autocommit_update_retry = 0; stats->block_cache_blocks_update = 0; stats->block_cache_bytes_update = 0; stats->block_cache_blocks_evicted = 0; @@ -1759,22 +1685,10 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cache_eviction_blocked_ooo_checkpoint_race_2 = 0; stats->cache_eviction_blocked_ooo_checkpoint_race_3 = 0; stats->cache_eviction_blocked_ooo_checkpoint_race_4 = 0; - stats->cache_eviction_blocked_remove_hs_race_with_checkpoint = 0; stats->cache_eviction_walk_passes = 0; stats->cache_eviction_queue_empty = 0; stats->cache_eviction_queue_not_empty = 0; stats->cache_eviction_server_evicting = 0; - stats->cache_eviction_server_skip_dirty_pages_during_checkpoint = 0; - stats->cache_eviction_server_skip_metatdata_with_history = 0; - stats->cache_eviction_server_skip_pages_last_running = 0; - stats->cache_eviction_server_skip_pages_retry = 0; - stats->cache_eviction_server_skip_unwanted_pages = 0; - stats->cache_eviction_server_skip_unwanted_tree = 0; - stats->cache_eviction_server_skip_trees_too_many_active_walks = 0; - stats->cache_eviction_server_skip_checkpointing_trees = 0; - stats->cache_eviction_server_skip_trees_stick_in_cache = 0; - stats->cache_eviction_server_skip_trees_eviction_disabled = 0; - stats->cache_eviction_server_skip_trees_not_useful_before = 0; stats->cache_eviction_server_slept = 0; stats->cache_eviction_slow = 0; stats->cache_eviction_walk_leaf_notfound = 0; @@ -1793,7 +1707,6 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cache_eviction_walks_stopped = 0; stats->cache_eviction_walks_gave_up_no_targets = 0; stats->cache_eviction_walks_gave_up_ratio = 0; - stats->cache_eviction_walk_random_returns_null_position = 0; stats->cache_eviction_walks_ended = 0; stats->cache_eviction_walk_restart = 0; stats->cache_eviction_walk_from_root = 0; @@ -1806,7 +1719,6 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) /* not clearing cache_eviction_walks_active */ stats->cache_eviction_walks_started = 0; stats->cache_eviction_force_retune = 0; - stats->cache_eviction_force_no_retry = 0; stats->cache_eviction_force_hs_fail = 0; stats->cache_eviction_force_hs = 0; stats->cache_eviction_force_hs_success = 0; @@ -1846,9 +1758,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cache_eviction_internal_pages_already_queued = 0; stats->cache_eviction_split_internal = 0; stats->cache_eviction_split_leaf = 0; - stats->cache_eviction_random_sample_inmem_root = 0; /* not clearing cache_bytes_max */ - /* not clearing cache_eviction_maximum_milliseconds */ /* not clearing cache_eviction_maximum_page_size */ stats->cache_eviction_dirty = 0; stats->cache_eviction_app_dirty = 0; @@ -1867,7 +1777,6 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cache_read = 0; stats->cache_read_deleted = 0; stats->cache_read_deleted_prepared = 0; - stats->cache_eviction_clear_ordinary = 0; stats->cache_pages_requested = 0; stats->cache_eviction_pages_seen = 0; stats->cache_eviction_pages_already_queued = 0; @@ -1881,7 +1790,6 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) /* not clearing cache_overhead */ stats->cache_hs_insert_full_update = 0; stats->cache_hs_insert_reverse_modify = 0; - /* not clearing cache_reentry_hs_eviction_milliseconds */ /* not clearing cache_bytes_internal */ /* not clearing cache_bytes_leaf */ /* not clearing cache_bytes_dirty */ @@ -1921,13 +1829,10 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->fsync_io = 0; stats->read_io = 0; stats->write_io = 0; - stats->cursor_tree_walk_del_page_skip = 0; stats->cursor_next_skip_total = 0; stats->cursor_prev_skip_total = 0; stats->cursor_skip_hs_cur_position = 0; - stats->cursor_tree_walk_inmem_del_page_skip = 0; stats->cursor_search_near_prefix_fast_paths = 0; - /* not clearing cursor_bulk_count */ /* not clearing cursor_cached_count */ stats->cursor_insert_bulk = 0; stats->cursor_cache = 0; @@ -2074,9 +1979,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->rec_time_window_bytes_txn = 0; stats->rec_page_delete_fast = 0; stats->rec_overflow_key_leaf = 0; - /* not clearing rec_maximum_milliseconds */ - /* not clearing rec_maximum_image_build_milliseconds */ - /* not clearing rec_maximum_hs_wrapup_milliseconds */ + /* not clearing rec_maximum_seconds */ stats->rec_pages = 0; stats->rec_pages_eviction = 0; stats->rec_pages_with_prepare = 0; @@ -2141,7 +2044,6 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) /* not clearing thread_fsync_active */ /* not clearing thread_read_active */ /* not clearing thread_write_active */ - stats->application_evict_snapshot_refreshed = 0; stats->application_evict_time = 0; stats->application_cache_time = 0; stats->txn_release_blocked = 0; @@ -2160,13 +2062,12 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->txn_prepared_updates_committed = 0; stats->txn_prepared_updates_key_repeated = 0; stats->txn_prepared_updates_rolledback = 0; - stats->txn_read_race_prepare_commit = 0; - stats->txn_checkpoint_snapshot_acquired = 0; - stats->txn_rollback_oldest_pinned = 0; stats->txn_prepare = 0; stats->txn_prepare_commit = 0; stats->txn_prepare_active = 0; stats->txn_prepare_rollback = 0; + stats->txn_prepare_rollback_do_not_remove_hs_update = 0; + stats->txn_prepare_rollback_fix_hs_update_with_ckpt_reserved_txnid = 0; stats->txn_query_ts = 0; stats->txn_read_race_prepare_update = 0; stats->txn_rts = 0; @@ -2217,6 +2118,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->txn_checkpoint = 0; stats->txn_checkpoint_obsolete_applied = 0; stats->txn_checkpoint_skipped = 0; + stats->txn_fail_cache = 0; stats->txn_checkpoint_fsync_post = 0; /* not clearing txn_checkpoint_fsync_post_duration */ /* not clearing txn_pinned_range */ @@ -2257,8 +2159,6 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->lsm_work_units_done += WT_STAT_READ(from, lsm_work_units_done); to->lsm_work_units_created += WT_STAT_READ(from, lsm_work_units_created); to->lsm_work_queue_max += WT_STAT_READ(from, lsm_work_queue_max); - to->autocommit_readonly_retry += WT_STAT_READ(from, autocommit_readonly_retry); - to->autocommit_update_retry += WT_STAT_READ(from, autocommit_update_retry); to->block_cache_blocks_update += WT_STAT_READ(from, block_cache_blocks_update); to->block_cache_bytes_update += WT_STAT_READ(from, block_cache_bytes_update); to->block_cache_blocks_evicted += WT_STAT_READ(from, block_cache_blocks_evicted); @@ -2322,34 +2222,10 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * WT_STAT_READ(from, cache_eviction_blocked_ooo_checkpoint_race_3); to->cache_eviction_blocked_ooo_checkpoint_race_4 += WT_STAT_READ(from, cache_eviction_blocked_ooo_checkpoint_race_4); - to->cache_eviction_blocked_remove_hs_race_with_checkpoint += - WT_STAT_READ(from, cache_eviction_blocked_remove_hs_race_with_checkpoint); to->cache_eviction_walk_passes += WT_STAT_READ(from, cache_eviction_walk_passes); to->cache_eviction_queue_empty += WT_STAT_READ(from, cache_eviction_queue_empty); to->cache_eviction_queue_not_empty += WT_STAT_READ(from, cache_eviction_queue_not_empty); to->cache_eviction_server_evicting += WT_STAT_READ(from, cache_eviction_server_evicting); - to->cache_eviction_server_skip_dirty_pages_during_checkpoint += - WT_STAT_READ(from, cache_eviction_server_skip_dirty_pages_during_checkpoint); - to->cache_eviction_server_skip_metatdata_with_history += - WT_STAT_READ(from, cache_eviction_server_skip_metatdata_with_history); - to->cache_eviction_server_skip_pages_last_running += - WT_STAT_READ(from, cache_eviction_server_skip_pages_last_running); - to->cache_eviction_server_skip_pages_retry += - WT_STAT_READ(from, cache_eviction_server_skip_pages_retry); - to->cache_eviction_server_skip_unwanted_pages += - WT_STAT_READ(from, cache_eviction_server_skip_unwanted_pages); - to->cache_eviction_server_skip_unwanted_tree += - WT_STAT_READ(from, cache_eviction_server_skip_unwanted_tree); - to->cache_eviction_server_skip_trees_too_many_active_walks += - WT_STAT_READ(from, cache_eviction_server_skip_trees_too_many_active_walks); - to->cache_eviction_server_skip_checkpointing_trees += - WT_STAT_READ(from, cache_eviction_server_skip_checkpointing_trees); - to->cache_eviction_server_skip_trees_stick_in_cache += - WT_STAT_READ(from, cache_eviction_server_skip_trees_stick_in_cache); - to->cache_eviction_server_skip_trees_eviction_disabled += - WT_STAT_READ(from, cache_eviction_server_skip_trees_eviction_disabled); - to->cache_eviction_server_skip_trees_not_useful_before += - WT_STAT_READ(from, cache_eviction_server_skip_trees_not_useful_before); to->cache_eviction_server_slept += WT_STAT_READ(from, cache_eviction_server_slept); to->cache_eviction_slow += WT_STAT_READ(from, cache_eviction_slow); to->cache_eviction_walk_leaf_notfound += WT_STAT_READ(from, cache_eviction_walk_leaf_notfound); @@ -2374,8 +2250,6 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * WT_STAT_READ(from, cache_eviction_walks_gave_up_no_targets); to->cache_eviction_walks_gave_up_ratio += WT_STAT_READ(from, cache_eviction_walks_gave_up_ratio); - to->cache_eviction_walk_random_returns_null_position += - WT_STAT_READ(from, cache_eviction_walk_random_returns_null_position); to->cache_eviction_walks_ended += WT_STAT_READ(from, cache_eviction_walks_ended); to->cache_eviction_walk_restart += WT_STAT_READ(from, cache_eviction_walk_restart); to->cache_eviction_walk_from_root += WT_STAT_READ(from, cache_eviction_walk_from_root); @@ -2389,7 +2263,6 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->cache_eviction_walks_active += WT_STAT_READ(from, cache_eviction_walks_active); to->cache_eviction_walks_started += WT_STAT_READ(from, cache_eviction_walks_started); to->cache_eviction_force_retune += WT_STAT_READ(from, cache_eviction_force_retune); - to->cache_eviction_force_no_retry += WT_STAT_READ(from, cache_eviction_force_no_retry); to->cache_eviction_force_hs_fail += WT_STAT_READ(from, cache_eviction_force_hs_fail); to->cache_eviction_force_hs += WT_STAT_READ(from, cache_eviction_force_hs); to->cache_eviction_force_hs_success += WT_STAT_READ(from, cache_eviction_force_hs_success); @@ -2437,11 +2310,7 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * WT_STAT_READ(from, cache_eviction_internal_pages_already_queued); to->cache_eviction_split_internal += WT_STAT_READ(from, cache_eviction_split_internal); to->cache_eviction_split_leaf += WT_STAT_READ(from, cache_eviction_split_leaf); - to->cache_eviction_random_sample_inmem_root += - WT_STAT_READ(from, cache_eviction_random_sample_inmem_root); to->cache_bytes_max += WT_STAT_READ(from, cache_bytes_max); - to->cache_eviction_maximum_milliseconds += - WT_STAT_READ(from, cache_eviction_maximum_milliseconds); to->cache_eviction_maximum_page_size += WT_STAT_READ(from, cache_eviction_maximum_page_size); to->cache_eviction_dirty += WT_STAT_READ(from, cache_eviction_dirty); to->cache_eviction_app_dirty += WT_STAT_READ(from, cache_eviction_app_dirty); @@ -2465,7 +2334,6 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->cache_read += WT_STAT_READ(from, cache_read); to->cache_read_deleted += WT_STAT_READ(from, cache_read_deleted); to->cache_read_deleted_prepared += WT_STAT_READ(from, cache_read_deleted_prepared); - to->cache_eviction_clear_ordinary += WT_STAT_READ(from, cache_eviction_clear_ordinary); to->cache_pages_requested += WT_STAT_READ(from, cache_pages_requested); to->cache_eviction_pages_seen += WT_STAT_READ(from, cache_eviction_pages_seen); to->cache_eviction_pages_already_queued += @@ -2483,8 +2351,6 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->cache_overhead += WT_STAT_READ(from, cache_overhead); to->cache_hs_insert_full_update += WT_STAT_READ(from, cache_hs_insert_full_update); to->cache_hs_insert_reverse_modify += WT_STAT_READ(from, cache_hs_insert_reverse_modify); - to->cache_reentry_hs_eviction_milliseconds += - WT_STAT_READ(from, cache_reentry_hs_eviction_milliseconds); to->cache_bytes_internal += WT_STAT_READ(from, cache_bytes_internal); to->cache_bytes_leaf += WT_STAT_READ(from, cache_bytes_leaf); to->cache_bytes_dirty += WT_STAT_READ(from, cache_bytes_dirty); @@ -2524,15 +2390,11 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->fsync_io += WT_STAT_READ(from, fsync_io); to->read_io += WT_STAT_READ(from, read_io); to->write_io += WT_STAT_READ(from, write_io); - to->cursor_tree_walk_del_page_skip += WT_STAT_READ(from, cursor_tree_walk_del_page_skip); to->cursor_next_skip_total += WT_STAT_READ(from, cursor_next_skip_total); to->cursor_prev_skip_total += WT_STAT_READ(from, cursor_prev_skip_total); to->cursor_skip_hs_cur_position += WT_STAT_READ(from, cursor_skip_hs_cur_position); - to->cursor_tree_walk_inmem_del_page_skip += - WT_STAT_READ(from, cursor_tree_walk_inmem_del_page_skip); to->cursor_search_near_prefix_fast_paths += WT_STAT_READ(from, cursor_search_near_prefix_fast_paths); - to->cursor_bulk_count += WT_STAT_READ(from, cursor_bulk_count); to->cursor_cached_count += WT_STAT_READ(from, cursor_cached_count); to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk); to->cursor_cache += WT_STAT_READ(from, cursor_cache); @@ -2683,11 +2545,7 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->rec_time_window_bytes_txn += WT_STAT_READ(from, rec_time_window_bytes_txn); to->rec_page_delete_fast += WT_STAT_READ(from, rec_page_delete_fast); to->rec_overflow_key_leaf += WT_STAT_READ(from, rec_overflow_key_leaf); - to->rec_maximum_milliseconds += WT_STAT_READ(from, rec_maximum_milliseconds); - to->rec_maximum_image_build_milliseconds += - WT_STAT_READ(from, rec_maximum_image_build_milliseconds); - to->rec_maximum_hs_wrapup_milliseconds += - WT_STAT_READ(from, rec_maximum_hs_wrapup_milliseconds); + to->rec_maximum_seconds += WT_STAT_READ(from, rec_maximum_seconds); to->rec_pages += WT_STAT_READ(from, rec_pages); to->rec_pages_eviction += WT_STAT_READ(from, rec_pages_eviction); to->rec_pages_with_prepare += WT_STAT_READ(from, rec_pages_with_prepare); @@ -2758,8 +2616,6 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->thread_fsync_active += WT_STAT_READ(from, thread_fsync_active); to->thread_read_active += WT_STAT_READ(from, thread_read_active); to->thread_write_active += WT_STAT_READ(from, thread_write_active); - to->application_evict_snapshot_refreshed += - WT_STAT_READ(from, application_evict_snapshot_refreshed); to->application_evict_time += WT_STAT_READ(from, application_evict_time); to->application_cache_time += WT_STAT_READ(from, application_cache_time); to->txn_release_blocked += WT_STAT_READ(from, txn_release_blocked); @@ -2778,13 +2634,14 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->txn_prepared_updates_committed += WT_STAT_READ(from, txn_prepared_updates_committed); to->txn_prepared_updates_key_repeated += WT_STAT_READ(from, txn_prepared_updates_key_repeated); to->txn_prepared_updates_rolledback += WT_STAT_READ(from, txn_prepared_updates_rolledback); - to->txn_read_race_prepare_commit += WT_STAT_READ(from, txn_read_race_prepare_commit); - to->txn_checkpoint_snapshot_acquired += WT_STAT_READ(from, txn_checkpoint_snapshot_acquired); - to->txn_rollback_oldest_pinned += WT_STAT_READ(from, txn_rollback_oldest_pinned); to->txn_prepare += WT_STAT_READ(from, txn_prepare); to->txn_prepare_commit += WT_STAT_READ(from, txn_prepare_commit); to->txn_prepare_active += WT_STAT_READ(from, txn_prepare_active); to->txn_prepare_rollback += WT_STAT_READ(from, txn_prepare_rollback); + to->txn_prepare_rollback_do_not_remove_hs_update += + WT_STAT_READ(from, txn_prepare_rollback_do_not_remove_hs_update); + to->txn_prepare_rollback_fix_hs_update_with_ckpt_reserved_txnid += + WT_STAT_READ(from, txn_prepare_rollback_fix_hs_update_with_ckpt_reserved_txnid); to->txn_query_ts += WT_STAT_READ(from, txn_query_ts); to->txn_read_race_prepare_update += WT_STAT_READ(from, txn_read_race_prepare_update); to->txn_rts += WT_STAT_READ(from, txn_rts); @@ -2838,6 +2695,7 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS * to->txn_checkpoint += WT_STAT_READ(from, txn_checkpoint); to->txn_checkpoint_obsolete_applied += WT_STAT_READ(from, txn_checkpoint_obsolete_applied); to->txn_checkpoint_skipped += WT_STAT_READ(from, txn_checkpoint_skipped); + to->txn_fail_cache += WT_STAT_READ(from, txn_fail_cache); to->txn_checkpoint_fsync_post += WT_STAT_READ(from, txn_checkpoint_fsync_post); to->txn_checkpoint_fsync_post_duration += WT_STAT_READ(from, txn_checkpoint_fsync_post_duration); @@ -2910,7 +2768,6 @@ static const char *const __stats_session_desc[] = { "session: bytes read into cache", "session: bytes written from cache", "session: dhandle lock wait time (usecs)", - "session: dirty bytes in this txn", "session: page read from disk to cache time (usecs)", "session: page write from cache to disk time (usecs)", "session: schema lock wait time (usecs)", @@ -2937,7 +2794,6 @@ __wt_stat_session_clear_single(WT_SESSION_STATS *stats) stats->bytes_read = 0; stats->bytes_write = 0; stats->lock_dhandle_wait = 0; - stats->txn_bytes_dirty = 0; stats->read_time = 0; stats->write_time = 0; stats->lock_schema_wait = 0; diff --git a/src/third_party/wiredtiger/src/support/timestamp.c b/src/third_party/wiredtiger/src/support/timestamp.c index e4e694bb14e..0b6a008de9c 100644 --- a/src/third_party/wiredtiger/src/support/timestamp.c +++ b/src/third_party/wiredtiger/src/support/timestamp.c @@ -245,57 +245,6 @@ __wt_time_aggregate_validate( { char time_string[2][WT_TIME_STRING_SIZE]; - /* - * The aggregated time window values that are tracked at the page level. - * newest_start_durable_ts - The default value is WT_TS_NONE. It tracks the maximum durable - timestamp of all the inserts, updates, or modify operations performed on a page. - * newest_stop_durable_ts - The default value is WT_TS_NONE. It tracks the maximum durable - timestamp of all the delete operations performed on a page. - * oldest_start_ts - The default value is WT_TS_NONE. It tracks the minimum commit timestamp - of any inserts performed on a page. - * newest_txn - The default value is WT_TXN_NONE. It tracks the maximum transaction id of any - modification (insert/delete) performed on a page. - * newest_stop_ts - The default value is WT_TS_MAX. It tracks the maximum commit timestamp of - a delete operation on a page. If there is no removal for a key, this value will be WT_TS_MAX. - * newest_stop_txn - The default value is WT_TXN_MAX. It tracks the maximum commit - transaction id of a delete operation on a page. If there is no removal for a key, this value - will be WT_TXN_MAX. - * - * - * Three scenarios might happen at any point of time. - * Scenario 1 - No deletes on the page, only inserts and updates. - * newest_start_durable_ts will be some valid value (not WT_TS_MAX or WT_TS_NONE) - * oldest_start_ts will be the minimum commit timestamp of any inserts performed on a page. - * newest_stop_durable_ts will be WT_TS_NONE - * newest_stop_ts will be WT_TS_MAX since there is no removal of any key. - * newest_txn will be the maximum transaction id of any modification (insert/delete) - performed on a page. - * newest_stop_txn will be WT_TXN_MAX. - - * Scenario 2 - All the entries on the page are deleted. - * newest_start_durable_ts will be some valid value (not WT_TS_MAX or WT_TS_NONE) - * oldest_start_ts will be the minimum commit timestamp of any inserts performed on a page. - * newest_stop_durable_ts will be some valid value (not WT_TS_MAX or WT_TS_NONE) - * newest_stop_ts will be maximum commit timestamp of any delete operation on a page but not - WT_TS_MAX. - * newest_txn will be the maximum transaction id of any modification (insert/delete) - performed on a page. - * newest_stop_txn will be the maximum commit transaction id of any delete operation on a - page but cannot be WT_TXN_MAX - - * Scenario 3 - Some entries are deleted, but not all. - * newest_start_durable_ts will be some valid value (not WT_TS_MAX or WT_TS_NONE) - * oldest_start_ts will be the minimum commit timestamp of any inserts performed on a page. - * newest_stop_durable_ts will be the maximum durable timestamp of all the deletes performed - on a page. - * newest_stop_ts can be WT_TS_MAX or any valid value - * newest_txn will be the maximum transaction id of any modification (insert/delete) - performed on a page. - * newest_stop_txn will be the maximum commit transaction id of any delete operation on a - page but cannot be WT_TXN_MAX - * - */ - if (ta->oldest_start_ts > ta->newest_stop_ts) WT_TIME_VALIDATE_RET(session, "aggregate time window has an oldest start time after its newest stop time; time " @@ -321,16 +270,14 @@ __wt_time_aggregate_validate( __wt_time_aggregate_to_string(ta, time_string[0])); /* - * In the case of missing timestamps, we assign the start point to the stop point and newest - * start durable timestamp may be larger than newest stop timestamp. Check whether start and - * stop are equal first and then check the newest start durable timestamp against newest stop - * durable timestamp if all the data on the page are deleted. + * In the case of out of order timestamps, we assign the start point to the stop point and + * newest start durable timestamp may be larger than newest stop timestamp. Check whether start + * and stop are equal first. */ if (ta->newest_start_durable_ts != ta->newest_stop_durable_ts && - ta->newest_stop_ts != WT_TS_MAX && ta->newest_start_durable_ts > ta->newest_stop_durable_ts) + ta->newest_start_durable_ts > ta->newest_stop_ts) WT_TIME_VALIDATE_RET(session, - "aggregate time window has a newest start durable time after its newest stop durable " - "time; time " + "aggregate time window has a newest stop durable time after its newest stop time; time " "aggregate %s", __wt_time_aggregate_to_string(ta, time_string[0])); diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c index 397548b8e92..5beb059c12b 100644 --- a/src/third_party/wiredtiger/src/txn/txn.c +++ b/src/third_party/wiredtiger/src/txn/txn.c @@ -99,15 +99,14 @@ __txn_sort_snapshot(WT_SESSION_IMPL *session, uint32_t n, uint64_t snap_max) txn = session->txn; if (n > 1) - __snapsort(txn->snapshot_data.snapshot, n); + __snapsort(txn->snapshot, n); - txn->snapshot_data.snapshot_count = n; - txn->snapshot_data.snap_max = snap_max; - txn->snapshot_data.snap_min = (n > 0 && WT_TXNID_LE(txn->snapshot_data.snapshot[0], snap_max)) ? - txn->snapshot_data.snapshot[0] : - snap_max; + txn->snapshot_count = n; + txn->snap_max = snap_max; + txn->snap_min = + (n > 0 && WT_TXNID_LE(txn->snapshot[0], snap_max)) ? txn->snapshot[0] : snap_max; F_SET(txn, WT_TXN_HAS_SNAPSHOT); - WT_ASSERT(session, n == 0 || txn->snapshot_data.snap_min != WT_TXN_NONE); + WT_ASSERT(session, n == 0 || txn->snap_min != WT_TXN_NONE); } /* @@ -130,7 +129,6 @@ __wt_txn_release_snapshot(WT_SESSION_IMPL *session) !__wt_txn_visible_all(session, txn_shared->pinned_id, WT_TS_NONE)); txn_shared->metadata_pinned = txn_shared->pinned_id = WT_TXN_NONE; - F_CLR(txn, WT_TXN_REFRESH_SNAPSHOT); F_CLR(txn, WT_TXN_HAS_SNAPSHOT); /* Clear a checkpoint's pinned ID and timestamp. */ @@ -229,7 +227,7 @@ __txn_get_snapshot_int(WT_SESSION_IMPL *session, bool publish) */ if ((id = txn_global->checkpoint_txn_shared.id) != WT_TXN_NONE) { if (txn->id != id) - txn->snapshot_data.snapshot[n++] = id; + txn->snapshot[n++] = id; if (publish) txn_shared->metadata_pinned = id; } @@ -277,7 +275,7 @@ __txn_get_snapshot_int(WT_SESSION_IMPL *session, bool publish) */ WT_READ_BARRIER(); if (id == s->id) { - txn->snapshot_data.snapshot[n++] = id; + txn->snapshot[n++] = id; if (WT_TXNID_LT(id, pinned_id)) pinned_id = id; break; @@ -320,71 +318,6 @@ __wt_txn_bump_snapshot(WT_SESSION_IMPL *session) } /* - * __wt_txn_snapshot_save_and_refresh -- - * Save the existing snapshot and allocate a new snapshot. - */ -int -__wt_txn_snapshot_save_and_refresh(WT_SESSION_IMPL *session) -{ - WT_DECL_RET; - WT_TXN *txn; - - txn = session->txn; - - WT_RET(__wt_calloc_def(session, sizeof(WT_TXN_SNAPSHOT), &txn->backup_snapshot_data)); - - txn->backup_snapshot_data->snap_max = txn->snapshot_data.snap_max; - txn->backup_snapshot_data->snap_min = txn->snapshot_data.snap_min; - txn->backup_snapshot_data->snapshot_count = txn->snapshot_data.snapshot_count; - - WT_ERR(__wt_calloc_def(session, sizeof(uint64_t) * S2C(session)->session_size, - &txn->backup_snapshot_data->snapshot)); - - /* Swap the snapshot pointers. */ - __txn_swap_snapshot(&txn->snapshot_data.snapshot, &txn->backup_snapshot_data->snapshot); - - /* - * __txn_get_snapshot_int will return without getting the new snapshot if the transaction - * already has a snapshot so clear the flag WT_TXN_HAS_SNAPSHOT. - */ - F_CLR(txn, WT_TXN_HAS_SNAPSHOT); - - /* Get the snapshot without publishing the shared ids. */ - __wt_txn_bump_snapshot(session); - -err: - /* Free the backup_snapshot_data if the memory allocation of the underlying snapshot has failed. - */ - if (ret != 0) - __wt_free(session, txn->backup_snapshot_data); - - return (ret); -} - -/* - * __wt_txn_snapshot_release_and_restore -- - * Switch back to the original snapshot. - */ -void -__wt_txn_snapshot_release_and_restore(WT_SESSION_IMPL *session) -{ - WT_TXN *txn; - WT_TXN_SNAPSHOT *snapshot_backup; - - txn = session->txn; - snapshot_backup = txn->backup_snapshot_data; - - txn->snapshot_data.snap_max = snapshot_backup->snap_max; - txn->snapshot_data.snap_min = snapshot_backup->snap_min; - txn->snapshot_data.snapshot_count = snapshot_backup->snapshot_count; - - /* Swap the snapshot pointers. */ - __txn_swap_snapshot(&snapshot_backup->snapshot, &txn->snapshot_data.snapshot); - __wt_free(session, snapshot_backup->snapshot); - __wt_free(session, snapshot_backup); -} - -/* * __txn_oldest_scan -- * Sweep the running transactions to calculate the oldest ID required. */ @@ -559,8 +492,7 @@ __wt_txn_update_oldest(WT_SESSION_IMPL *session, uint32_t flags) oldest_session != NULL) { __wt_verbose(session, WT_VERB_TRANSACTION, "old snapshot %" PRIu64 " pinned in session %" PRIu32 " [%s] with snap_min %" PRIu64, - oldest_id, oldest_session->id, oldest_session->lastop, - oldest_session->txn->snapshot_data.snap_min); + oldest_id, oldest_session->id, oldest_session->lastop, oldest_session->txn->snap_min); } } @@ -622,9 +554,10 @@ __wt_txn_config(WT_SESSION_IMPL *session, const char *cfg[]) WT_ERR(__wt_config_gets_def(session, cfg, "isolation", 0, &cval)); if (cval.len != 0) - txn->isolation = WT_STRING_MATCH("snapshot", cval.str, cval.len) ? WT_ISO_SNAPSHOT : - WT_STRING_MATCH("read-committed", cval.str, cval.len) ? WT_ISO_READ_COMMITTED : - WT_ISO_READ_UNCOMMITTED; + txn->isolation = WT_STRING_MATCH("snapshot", cval.str, cval.len) ? + WT_ISO_SNAPSHOT : + WT_STRING_MATCH("read-committed", cval.str, cval.len) ? WT_ISO_READ_COMMITTED : + WT_ISO_READ_UNCOMMITTED; WT_ERR(__txn_config_operation_timeout(session, cfg, false)); @@ -701,7 +634,7 @@ __wt_txn_reconfigure(WT_SESSION_IMPL *session, const char *config) ret = __wt_config_getones(session, config, "isolation", &cval); if (ret == 0 && cval.len != 0) { session->isolation = txn->isolation = WT_STRING_MATCH("snapshot", cval.str, cval.len) ? - WT_ISO_SNAPSHOT : + WT_ISO_SNAPSHOT : WT_STRING_MATCH("read-uncommitted", cval.str, cval.len) ? WT_ISO_READ_UNCOMMITTED : WT_ISO_READ_COMMITTED; } @@ -779,13 +712,14 @@ __wt_txn_release(WT_SESSION_IMPL *session) } /* - * __txn_prepare_rollback_restore_hs_update -- - * Restore the history store update to the update chain before roll back prepared update evicted - * to disk + * __txn_locate_hs_record -- + * Locate the update older than the prepared update in the history store and append it to the + * update chain if necessary. */ static int -__txn_prepare_rollback_restore_hs_update( - WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, WT_PAGE *page, WT_UPDATE *upd_chain) +__txn_locate_hs_record(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, WT_PAGE *page, + WT_UPDATE *chain, bool commit, WT_UPDATE **fix_updp, bool *upd_appended, + bool first_committed_upd_in_hs) { WT_DECL_ITEM(hs_value); WT_DECL_RET; @@ -796,9 +730,10 @@ __txn_prepare_rollback_restore_hs_update( uint64_t type_full; char ts_string[2][WT_TS_INT_STRING_SIZE]; - WT_ASSERT(session, upd_chain != NULL); + WT_ASSERT(session, chain != NULL); - hs_tw = NULL; + *fix_updp = NULL; + *upd_appended = false; size = total_size = 0; tombstone = upd = NULL; @@ -810,18 +745,32 @@ __txn_prepare_rollback_restore_hs_update( /* The value older than the prepared update in the history store must be a full value. */ WT_ASSERT(session, (uint8_t)type_full == WT_UPDATE_STANDARD); - /* Use time window in cell to initialize the update. */ + /* + * If the history update already has a stop time point and we are committing the prepared update + * there is no work to do. This happens if a deleted key is reinserted by a prepared update. + */ + if (hs_stop_durable_ts != WT_TS_MAX && commit) + goto done; + __wt_hs_upd_time_window(hs_cursor, &hs_tw); WT_ERR(__wt_upd_alloc(session, hs_value, WT_UPDATE_STANDARD, &upd, &size)); upd->txnid = hs_tw->start_txn; upd->durable_ts = hs_tw->durable_start_ts; upd->start_ts = hs_tw->start_ts; + *fix_updp = upd; + + /* + * When the prepared update is getting committed or the history store update is still on the + * update chain, no need to append it onto the update chain. + */ + if (commit || first_committed_upd_in_hs) + goto done; /* * Set the flag to indicate that this update has been restored from history store for the * rollback of a prepared transaction. */ - F_SET(upd, WT_UPDATE_RESTORED_FROM_HS | WT_UPDATE_TO_DELETE_FROM_HS); + F_SET(upd, WT_UPDATE_RESTORED_FROM_HS); total_size += size; __wt_verbose(session, WT_VERB_TRANSACTION, @@ -841,7 +790,7 @@ __txn_prepare_rollback_restore_hs_update( * Set the flag to indicate that this update has been restored from history store for the * rollback of a prepared transaction. */ - F_SET(tombstone, WT_UPDATE_RESTORED_FROM_HS | WT_UPDATE_TO_DELETE_FROM_HS); + F_SET(tombstone, WT_UPDATE_RESTORED_FROM_HS); total_size += size; __wt_verbose(session, WT_VERB_TRANSACTION, @@ -853,17 +802,19 @@ __txn_prepare_rollback_restore_hs_update( } /* Walk to the end of the chain and we can only have prepared updates on the update chain. */ - for (;; upd_chain = upd_chain->next) { - WT_ASSERT(session, - upd_chain->txnid != WT_TXN_ABORTED && upd_chain->prepare_state == WT_PREPARE_INPROGRESS); + for (;; chain = chain->next) { + WT_ASSERT( + session, chain->txnid != WT_TXN_ABORTED && chain->prepare_state == WT_PREPARE_INPROGRESS); - if (upd_chain->next == NULL) + if (chain->next == NULL) break; } /* Append the update to the end of the chain. */ - WT_PUBLISH(upd_chain->next, upd); + WT_PUBLISH(chain->next, upd); + *upd_appended = true; + *fix_updp = upd; __wt_cache_page_inmem_incr(session, page, total_size); if (0) { @@ -871,6 +822,7 @@ err: WT_ASSERT(session, tombstone == NULL || upd == tombstone); __wt_free_update_list(session, &upd); } +done: __wt_scr_free(session, &hs_value); return (ret); } @@ -956,40 +908,35 @@ __txn_timestamp_usage_check(WT_SESSION_IMPL *session, WT_TXN_OP *op, WT_UPDATE * } /* - * __txn_fixup_hs_update -- - * Fix the history store update with the max stop time point if we commit the prepared update. + * __txn_fixup_prepared_update -- + * Fix/restore the history store update of a prepared datastore update based on transaction + * status. */ static int -__txn_fixup_hs_update(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor) +__txn_fixup_prepared_update( + WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, WT_UPDATE *fix_upd, bool commit) { - WT_DECL_ITEM(hs_value); WT_DECL_RET; - WT_TIME_WINDOW *hs_tw, tw; + WT_ITEM hs_value; + WT_TIME_WINDOW tw; WT_TXN *txn; + WT_TXN_GLOBAL *txn_global; + uint32_t txn_flags; +#ifdef HAVE_DIAGNOSTIC + uint64_t hs_upd_type; wt_timestamp_t hs_durable_ts, hs_stop_durable_ts; - uint64_t type_full; - bool txn_error, txn_prepare_ignore_api_check; +#endif - hs_tw = NULL; txn = session->txn; - - __wt_hs_upd_time_window(hs_cursor, &hs_tw); - - /* - * If the history update already has a stop time point there is no work to do. This happens if a - * deleted key is reinserted by a prepared update. - */ - if (WT_TIME_WINDOW_HAS_STOP(hs_tw)) - return (0); - - WT_RET(__wt_scr_alloc(session, 0, &hs_value)); + txn_global = &S2C(session)->txn_global; + WT_TIME_WINDOW_INIT(&tw); /* - * Transaction error is cleared temporarily as cursor functions are not allowed after an error - * or a prepared transaction. + * Transaction error and prepare are cleared temporarily as cursor functions are not allowed + * after an error or a prepared transaction. */ - txn_error = F_ISSET(txn, WT_TXN_ERROR); - F_CLR(txn, WT_TXN_ERROR); + txn_flags = FLD_MASK(txn->flags, WT_TXN_ERROR); + F_CLR(txn, txn_flags); /* * The API layer will immediately return an error if the WT_TXN_PREPARE flag is set before @@ -998,42 +945,81 @@ __txn_fixup_hs_update(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor) * marked as a prepared transaction. The flag WT_TXN_PREPARE_IGNORE_API_CHECK is set so that * cursor operations can proceed without having to clear the WT_TXN_PREPARE flag. */ - txn_prepare_ignore_api_check = F_ISSET(txn, WT_TXN_PREPARE_IGNORE_API_CHECK); F_SET(txn, WT_TXN_PREPARE_IGNORE_API_CHECK); - /* Get current value. */ - WT_ERR( - hs_cursor->get_value(hs_cursor, &hs_stop_durable_ts, &hs_durable_ts, &type_full, hs_value)); - - /* The old stop timestamp must be max. */ - WT_ASSERT(session, hs_stop_durable_ts == WT_TS_MAX); - /* The value older than the prepared update in the history store must be a full value. */ - WT_ASSERT(session, (uint8_t)type_full == WT_UPDATE_STANDARD); - /* - * Set the stop time point to be the committing transaction's time point and copy the start time - * point from the current history store update. + * If the history update already has a stop time point and we are committing the prepared update + * there is no work to do. */ - tw.stop_ts = txn->commit_timestamp; - tw.durable_stop_ts = txn->durable_timestamp; - tw.stop_txn = txn->id; - WT_TIME_WINDOW_COPY_START(&tw, hs_tw); + if (commit) { + tw.stop_ts = txn->commit_timestamp; + tw.durable_stop_ts = txn->durable_timestamp; + tw.stop_txn = txn->id; + WT_TIME_WINDOW_SET_START(&tw, fix_upd); - /* - * We need to update the stop durable timestamp stored in the history store value. - * - * Pack the value using cursor api. - */ - hs_cursor->set_value(hs_cursor, &tw, tw.durable_stop_ts, tw.durable_start_ts, - (uint64_t)WT_UPDATE_STANDARD, hs_value); - WT_ERR(hs_cursor->update(hs_cursor)); +#ifdef HAVE_DIAGNOSTIC + /* Retrieve the existing update value and stop timestamp. */ + WT_ERR(hs_cursor->get_value( + hs_cursor, &hs_stop_durable_ts, &hs_durable_ts, &hs_upd_type, &hs_value)); + WT_ASSERT(session, hs_stop_durable_ts == WT_TS_MAX); + WT_ASSERT(session, (uint8_t)hs_upd_type == WT_UPDATE_STANDARD); +#endif + /* + * We need to update the stop durable timestamp stored in the history store value. + * + * Pack the value using cursor api. + */ + hs_value.data = fix_upd->data; + hs_value.size = fix_upd->size; + hs_cursor->set_value(hs_cursor, &tw, tw.durable_stop_ts, tw.durable_start_ts, + (uint64_t)WT_UPDATE_STANDARD, &hs_value); + WT_ERR(hs_cursor->update(hs_cursor)); + } else { + /* + * Remove the history store entry if a checkpoint is not running, otherwise place a + * tombstone in front of the history store entry if it doesn't have a stop timestamp. + */ + if (txn_global->checkpoint_running) { + /* Don't update the history store entry if the entry already has a stop timestamp. */ + if (fix_upd->type != WT_UPDATE_TOMBSTONE) { + /* + * When the history store's update start transaction id is greater than the + * checkpoint's reserved transaction id, the durable timestamp of this update is + * guaranteed to be greater than the checkpoint timestamp, as such there is no need + * to save this unstable update in the history store. + */ + if (fix_upd->txnid > txn_global->checkpoint_reserved_txn_id) + WT_ERR(hs_cursor->remove(hs_cursor)); + else { + tw.durable_stop_ts = fix_upd->durable_ts; + tw.stop_ts = fix_upd->start_ts; + + /* + * Set the stop transaction id of the time window to the checkpoint reserved + * transaction id. As such the tombstone won't be visible to rollback to stable, + * additionally checkpoint garbage collection cannot clean it up as it greater + * than the globally visible transaction id. + */ + tw.stop_txn = txn_global->checkpoint_reserved_txn_id; + WT_TIME_WINDOW_SET_START(&tw, fix_upd); + + hs_value.data = fix_upd->data; + hs_value.size = fix_upd->size; + hs_cursor->set_value(hs_cursor, &tw, tw.durable_stop_ts, tw.durable_start_ts, + (uint64_t)WT_UPDATE_STANDARD, &hs_value); + WT_ERR(hs_cursor->update(hs_cursor)); + WT_STAT_CONN_INCR( + session, txn_prepare_rollback_fix_hs_update_with_ckpt_reserved_txnid); + } + } else + WT_STAT_CONN_INCR(session, txn_prepare_rollback_do_not_remove_hs_update); + } else + WT_ERR(hs_cursor->remove(hs_cursor)); + } err: - if (!txn_prepare_ignore_api_check) - F_CLR(txn, WT_TXN_PREPARE_IGNORE_API_CHECK); - if (txn_error) - F_SET(txn, WT_TXN_ERROR); - __wt_scr_free(session, &hs_value); + F_SET(txn, txn_flags); + F_CLR(txn, WT_TXN_PREPARE_IGNORE_API_CHECK); return (ret); } @@ -1103,12 +1089,9 @@ __txn_search_prepared_op( F_SET(txn, txn_flags); F_CLR(txn, WT_TXN_PREPARE_IGNORE_API_CHECK); WT_RET(ret); - /* - * We cannot guarantee that we find an update when collators are being used as we cannot sort - * modifications on collated b-trees. - */ - WT_RET_ASSERT(session, *updp != NULL || op->btree->collator != NULL, WT_NOTFOUND, + WT_RET_ASSERT(session, *updp != NULL, WT_NOTFOUND, "unable to locate update associated with a prepared operation"); + return (0); } @@ -1196,10 +1179,6 @@ __txn_resolve_prepared_update_chain(WT_SESSION_IMPL *session, WT_UPDATE *upd, bo /* Resolve the prepared update to be a committed update. */ __txn_resolve_prepared_update(session, upd); - - /* Sleep for 100ms in the prepared resolution path if configured. */ - if (FLD_ISSET(S2C(session)->timing_stress_flags, WT_TIMING_STRESS_PREPARE_RESOLUTION_2)) - __wt_sleep(0, 100000); WT_STAT_CONN_INCR(session, txn_prepared_updates_committed); } @@ -1218,22 +1197,18 @@ __txn_resolve_prepared_op(WT_SESSION_IMPL *session, WT_TXN_OP *op, bool commit, WT_PAGE *page; WT_TIME_WINDOW tw; WT_TXN *txn; - WT_UPDATE *first_committed_upd, *upd, *upd_followed_tombstone; + WT_UPDATE *first_committed_upd, *fix_upd, *upd; #ifdef HAVE_DIAGNOSTIC WT_UPDATE *head_upd; #endif - uint8_t *p, resolve_case, hs_recno_key_buf[WT_INTPACK64_MAXSIZE]; + uint8_t *p, hs_recno_key_buf[WT_INTPACK64_MAXSIZE]; char ts_string[3][WT_TS_INT_STRING_SIZE]; - bool tw_found, has_hs_record; + bool first_committed_upd_in_hs, prepare_on_disk, tw_found, upd_appended; hs_cursor = NULL; txn = session->txn; - has_hs_record = false; -#define RESOLVE_UPDATE_CHAIN 0 -#define RESOLVE_PREPARE_ON_DISK 1 -#define RESOLVE_PREPARE_EVICTION_FAILURE 2 -#define RESOLVE_IN_MEMORY 3 - resolve_case = RESOLVE_UPDATE_CHAIN; + fix_upd = NULL; + upd_appended = false; WT_RET(__txn_search_prepared_op(session, op, cursorp, &upd)); @@ -1286,113 +1261,28 @@ __txn_resolve_prepared_op(WT_SESSION_IMPL *session, WT_TXN_OP *op, bool commit, page = cbt->ref->page; /* - * If the prepared update is a single tombstone, we don't need to do anything special and we can - * directly resolve it in memory. - * - * If the prepared update is not a tombstone or we have multiple prepared updates in the same - * transaction. There are four base cases: - * - * 1) Prepared updates are on the update chain and hasn't been reconciled to write to data - * store. - * Simply resolve the prepared updates in memory. - * - * 2) Prepared updates are written to the data store. - * If there is no older updates written to the history store: - * commit: simply resolve the prepared updates in memory. - * rollback: delete the whole key. + * Locate the previous update from the history store and append it to the update chain if + * required. We know there may be content in the history store if the prepared update is written + * to the disk image or first committed update older than the prepared update is marked as + * WT_UPDATE_HS. The second case is rare but can happen if the eviction that writes the prepared + * update to the disk image fails after it has inserted the other updates of the key into the + * history store. * - * If there are older updates written to the history store: - * commit: fix the stop timestamp of the newest update in the history store if it has a - * max timestamp. - * rollback: restore the newest update in the history store to the data store and mark - * it to be deleted from the history store in the future reconciliation. + * We need to do this before we resolve the prepared updates because if we abort the prepared + * updates first, the history search logic may race with other sessions modifying the same key + * and checkpoint moving the new updates to the history store. * - * 3) Prepared updates are successfully reconciled to a new disk image in eviction but the - * eviction fails and the updates are restored back to the old disk image. - * If there is no older updates written to the history store: - * commit: simply resolve the prepared updates in memory. - * rollback: delete the whole key. - * - * If there are older updates written to the history store: - * commit: fix the stop timestamp of the newest update in the history store if it has a - * max timestamp. - * rollback: mark the data update (or tombstone and data update) that is older - * than the prepared updates to be deleted from the history store in the - * future reconciliation. - * - * 4) We are running an in-memory database: - * commit: resolve the prepared updates in memory. - * rollback: if the prepared update is written to the disk image, delete the whole key. - */ - - /* - * We also need to handle the on disk prepared updates if we have a prepared delete and a - * prepared update on the disk image. + * Fix the history store entry for the updates other than tombstone type or the tombstone + * followed by the update is also from the same prepared transaction by either restoring the + * previous update from history store or removing the key. */ - if (F_ISSET(upd, WT_UPDATE_PREPARE_RESTORED_FROM_DS) && + prepare_on_disk = F_ISSET(upd, WT_UPDATE_PREPARE_RESTORED_FROM_DS) && (upd->type != WT_UPDATE_TOMBSTONE || (upd->next != NULL && upd->durable_ts == upd->next->durable_ts && - upd->txnid == upd->next->txnid && upd->start_ts == upd->next->start_ts))) - resolve_case = RESOLVE_PREPARE_ON_DISK; - /* - * If the first committed update older than the prepared update has already been marked to be - * deleted from the history store, we are in the case that there was an older prepared update - * that was rolled back. - * - * 1) We have a prepared update Up and an update U on the update chain initially. - * 2) An eviction writes Up to the disk and U to the history store. - * 3) The eviction fails and everything is restored. - * 4) We rollback Up and mark U to be deleted from the history store. - * 5) We add another prepared update to the update chain. - * - * Check the WT_UPDATE_TO_DELETE_FROM_HS to see if we have already handled the older prepared - * update or not. Ignore if it is already handled. - */ - else if (first_committed_upd != NULL && F_ISSET(first_committed_upd, WT_UPDATE_HS) && - !F_ISSET(first_committed_upd, WT_UPDATE_TO_DELETE_FROM_HS)) - resolve_case = RESOLVE_PREPARE_EVICTION_FAILURE; - else if (F_ISSET(S2C(session), WT_CONN_IN_MEMORY)) - resolve_case = RESOLVE_IN_MEMORY; - else - resolve_case = RESOLVE_UPDATE_CHAIN; - - switch (resolve_case) { - case RESOLVE_PREPARE_EVICTION_FAILURE: - /* - * If we see the first committed update has been moved to the history store, we must have - * done a successful reconciliation on the page but failed to evict it. Also reconciliation - * could not possibly empty the page because the prepared update is not globally visible. - * Therefore, reconciliation must have either split the page or done a page rewrite. - * - * In this case, we still need to resolve the prepared update as if we have successfully - * evicted the page because the value older than the prepared update has been written to the - * history store with the max timestamp. - */ - WT_ASSERT(session, - page->modify->rec_result == WT_PM_REC_MULTIBLOCK || - page->modify->rec_result == WT_PM_REC_REPLACE); - /* - * Marked the update older than the prepared update that is already in the history store to - * be deleted from the history store. - */ - if (!commit) { - if (first_committed_upd->type == WT_UPDATE_TOMBSTONE) { - for (upd_followed_tombstone = first_committed_upd->next; - upd_followed_tombstone != NULL; - upd_followed_tombstone = upd_followed_tombstone->next) - if (upd_followed_tombstone->txnid != WT_TXN_ABORTED) - break; - /* We may not find a full update following the tombstone if it is obsolete. */ - if (upd_followed_tombstone != NULL) { - WT_ASSERT(session, F_ISSET(upd_followed_tombstone, WT_UPDATE_HS)); - F_SET(first_committed_upd, WT_UPDATE_TO_DELETE_FROM_HS); - F_SET(upd_followed_tombstone, WT_UPDATE_TO_DELETE_FROM_HS); - } - } else - F_SET(first_committed_upd, WT_UPDATE_TO_DELETE_FROM_HS); - } - /* Fall through. */ - case RESOLVE_PREPARE_ON_DISK: + upd->txnid == upd->next->txnid && upd->start_ts == upd->next->start_ts)); + first_committed_upd_in_hs = + first_committed_upd != NULL && F_ISSET(first_committed_upd, WT_UPDATE_HS); + if (prepare_on_disk || first_committed_upd_in_hs) { btree = S2BT(session); /* @@ -1410,42 +1300,23 @@ __txn_resolve_prepared_op(WT_SESSION_IMPL *session, WT_TXN_OP *op, bool commit, hs_recno_key.size = WT_PTRDIFF(p, hs_recno_key_buf); hs_cursor->set_key(hs_cursor, 4, btree->id, &hs_recno_key, WT_TS_MAX, UINT64_MAX); } - /* - * Locate the previous update from the history store. We know there may be content in the - * history store if the prepared update is written to the disk image or first committed - * update older than the prepared update is marked as WT_UPDATE_HS. The second case is rare - * but can happen if the previous eviction that writes the prepared update to the disk image - * fails after reconciliation. - * - * We need to locate the history store update before we resolve the prepared updates because - * if we abort the prepared updates first, the history store search may race with other - * sessions modifying the same key and checkpoint moving the new updates to the history - * store. - */ WT_ERR_NOTFOUND_OK(__wt_curhs_search_near_before(session, hs_cursor), true); /* We should only get not found if the prepared update is on disk. */ - WT_ASSERT(session, ret != WT_NOTFOUND || resolve_case == RESOLVE_PREPARE_ON_DISK); - if (ret == 0) { - has_hs_record = true; - /* - * Restore the history store update to the update chain if we are rolling back the - * prepared update written to the disk image. - */ - if (!commit && resolve_case == RESOLVE_PREPARE_ON_DISK) - WT_ERR(__txn_prepare_rollback_restore_hs_update(session, hs_cursor, page, upd)); - } else { - ret = 0; + WT_ASSERT(session, ret != WT_NOTFOUND || prepare_on_disk); + if (ret == WT_NOTFOUND && !commit) { /* * Allocate a tombstone and prepend it to the row so when we reconcile the update chain * we don't copy the prepared cell, which is now associated with a rolled back prepare, * and instead write nothing. */ - if (!commit) - WT_ERR(__txn_append_tombstone(session, op, cbt)); - } - break; - case RESOLVE_IN_MEMORY: + WT_ERR(__txn_append_tombstone(session, op, cbt)); + } else if (ret == 0) + WT_ERR(__txn_locate_hs_record( + session, hs_cursor, page, upd, commit, &fix_upd, &upd_appended, first_committed_upd)); + else + ret = 0; + } else if (F_ISSET(S2C(session), WT_CONN_IN_MEMORY) && !commit && first_committed_upd == NULL) { /* * For in-memory configurations of WiredTiger if a prepared update is reconciled and then * rolled back the on-page value will not be marked as aborted until the next eviction. In @@ -1456,15 +1327,9 @@ __txn_resolve_prepared_op(WT_SESSION_IMPL *session, WT_TXN_OP *op, bool commit, * rolling back a prepared reconciled update would result in only aborted updates on the * update chain. */ - if (!commit && first_committed_upd == NULL) { - tw_found = __wt_read_cell_time_window(cbt, &tw); - if (tw_found && tw.prepare == WT_PREPARE_INPROGRESS) - WT_ERR(__txn_append_tombstone(session, op, cbt)); - } - break; - default: - WT_ASSERT(session, resolve_case == RESOLVE_UPDATE_CHAIN); - break; + tw_found = __wt_read_cell_time_window(cbt, &tw); + if (tw_found && tw.prepare == WT_PREPARE_INPROGRESS) + WT_ERR(__txn_append_tombstone(session, op, cbt)); } /* @@ -1494,11 +1359,17 @@ __txn_resolve_prepared_op(WT_SESSION_IMPL *session, WT_TXN_OP *op, bool commit, __wt_page_modify_set(session, page); /* - * Fix the history store record's stop time point if we are committing the prepared update and - * the previous update is written to the history store. + * Fix the history store contents if they exist, when there are no more updates in the update + * list. Only in eviction, it is possible to write an unfinished history store update when the + * prepared updates are written to the data store. When the page is read back into memory, there + * will be only one uncommitted prepared update. */ - if (commit && has_hs_record) - WT_ERR(__txn_fixup_hs_update(session, hs_cursor)); + if (fix_upd != NULL) { + WT_ERR(__txn_fixup_prepared_update(session, hs_cursor, fix_upd, commit)); + /* Clear the WT_UPDATE_HS flag as we should have removed it from the history store. */ + if (first_committed_upd_in_hs && !commit) + F_CLR(first_committed_upd, WT_UPDATE_HS); + } prepare_verify: #ifdef HAVE_DIAGNOSTIC @@ -1518,8 +1389,8 @@ prepare_verify: * If we restored an update from the history store, it should be the last update on the * chain. */ - if (!commit && resolve_case == RESOLVE_PREPARE_ON_DISK && - head_upd->type == WT_UPDATE_STANDARD && F_ISSET(head_upd, WT_UPDATE_RESTORED_FROM_HS)) + if (upd_appended && head_upd->type == WT_UPDATE_STANDARD && + F_ISSET(head_upd, WT_UPDATE_RESTORED_FROM_HS)) WT_ASSERT(session, head_upd->next == NULL); } #endif @@ -1527,33 +1398,12 @@ prepare_verify: err: if (hs_cursor != NULL) WT_TRET(hs_cursor->close(hs_cursor)); + if (!upd_appended) + __wt_free(session, fix_upd); return (ret); } /* - * __txn_mod_sortable_key -- - * Given an operation return a boolean indicating if it has a sortable key. - */ -static inline bool -__txn_mod_sortable_key(WT_TXN_OP *opt) -{ - switch (opt->type) { - case (WT_TXN_OP_NONE): - case (WT_TXN_OP_REF_DELETE): - case (WT_TXN_OP_TRUNCATE_COL): - case (WT_TXN_OP_TRUNCATE_ROW): - return (false); - case (WT_TXN_OP_BASIC_COL): - case (WT_TXN_OP_BASIC_ROW): - case (WT_TXN_OP_INMEM_COL): - case (WT_TXN_OP_INMEM_ROW): - return (true); - } - __wt_abort(NULL); - return (false); -} - -/* * __txn_mod_compare -- * Qsort comparison routine for transaction modify list. */ @@ -1561,62 +1411,24 @@ static int WT_CDECL __txn_mod_compare(const void *a, const void *b) { WT_TXN_OP *aopt, *bopt; - bool a_has_sortable_key; - bool b_has_sortable_key; aopt = (WT_TXN_OP *)a; bopt = (WT_TXN_OP *)b; - /* - * We want to sort on two things: - * - B-tree ID - * - Key - * However, there are a number of modification types that don't have a key to be sorted on. This - * requires us to add a stage between sorting on B-tree ID and key. At this intermediate stage, - * we sort on whether the modifications have a key. - * - * We need to uphold the contract that all modifications on the same key are contiguous in the - * final modification array. Technically they could be separated by non key modifications, - * but for simplicity's sake we sort them apart. - * - * Qsort comparators are expected to return -1 if the first argument is smaller than the second, - * 1 if the second argument is smaller than the first, and 0 if both arguments are equal. - */ - - /* Order by b-tree ID. */ - if (aopt->btree->id < bopt->btree->id) - return (-1); - if (aopt->btree->id > bopt->btree->id) - return (1); + /* If the files are different, order by ID. */ + if (aopt->btree->id != bopt->btree->id) + return (aopt->btree->id < bopt->btree->id); /* - * Order by whether the given operation has a key. We don't want to call key compare incorrectly - * especially given that u is a union which would create undefined behavior. - */ - a_has_sortable_key = __txn_mod_sortable_key(aopt); - b_has_sortable_key = __txn_mod_sortable_key(bopt); - if (a_has_sortable_key && !b_has_sortable_key) - return (-1); - if (!a_has_sortable_key && b_has_sortable_key) - return (1); - /* - * In the case where both arguments don't have a key they are considered to be equal, we don't - * care exactly how they get sorted. + * If the files are the same, order by the key. Row-store collators require WT_SESSION pointers, + * and we don't have one. Compare the keys if there's no collator, otherwise return equality. + * Column-store is always easy. */ - if (!a_has_sortable_key && !b_has_sortable_key) - return (0); - - /* Finally, order by key. We cannot sort if there is a collator as we need a session pointer. */ - if (aopt->btree->type == BTREE_ROW) { + if (aopt->type == WT_TXN_OP_BASIC_ROW || aopt->type == WT_TXN_OP_INMEM_ROW) return (aopt->btree->collator == NULL ? __wt_lex_compare(&aopt->u.op_row.key, &bopt->u.op_row.key, false) : 0); - } - if (aopt->u.op_col.recno < bopt->u.op_col.recno) - return (-1); - if (aopt->u.op_col.recno > bopt->u.op_col.recno) - return (1); - return (0); + return (aopt->u.op_col.recno < bopt->u.op_col.recno); } /* @@ -1792,17 +1604,6 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[]) */ if (!F_ISSET(op, WT_TXN_OP_KEY_REPEATED)) WT_ERR(__txn_resolve_prepared_op(session, op, true, &cursor)); - - /* - * Sleep for some number of updates between resolving prepared operations when - * configured, however, avoid causing too much stress when there are a large number - * of updates. Multiplying by 36 provides a reasonable chance of calling the stress - * (as it's a highly composite number) without exceeding a total of 36 calls over - * the total mod_count. - */ - if ((i * 36) % txn->mod_count == 0) - __wt_timing_stress(session, WT_TIMING_STRESS_PREPARE_RESOLUTION); - #ifdef HAVE_DIAGNOSTIC ++prepare_count; #endif @@ -2231,10 +2032,9 @@ __wt_txn_init(WT_SESSION_IMPL *session, WT_SESSION_IMPL *session_ret) /* Allocate the WT_TXN structure, including a variable length array of snapshot information. */ WT_RET(__wt_calloc(session, 1, - sizeof(WT_TXN) + sizeof(txn->snapshot_data.snapshot[0]) * S2C(session)->session_size, - &session_ret->txn)); + sizeof(WT_TXN) + sizeof(txn->snapshot[0]) * S2C(session)->session_size, &session_ret->txn)); txn = session_ret->txn; - txn->snapshot_data.snapshot = txn->__snapshot; + txn->snapshot = txn->__snapshot; txn->id = WT_TXN_NONE; WT_ASSERT(session, @@ -2425,7 +2225,6 @@ __wt_txn_global_shutdown(WT_SESSION_IMPL *session, const char **cfg) WT_CONNECTION_IMPL *conn; WT_DECL_RET; WT_SESSION_IMPL *s; - WT_TIMER timer; char ts_string[WT_TS_INT_STRING_SIZE]; const char *ckpt_cfg; bool use_timestamp; @@ -2453,23 +2252,10 @@ __wt_txn_global_shutdown(WT_SESSION_IMPL *session, const char **cfg) * clean shutdown. */ if (use_timestamp) { - __wt_timer_start(session, &timer); __wt_verbose(session, WT_VERB_RTS, "performing shutdown rollback to stable with stable timestamp: %s", __wt_timestamp_to_string(conn->txn_global.stable_timestamp, ts_string)); WT_TRET(__wt_rollback_to_stable(session, cfg, true)); - - /* Time since the shutdown RTS has started. */ - __wt_timer_evaluate_ms(session, &timer, &conn->shutdown_timeline.rts_ms); - if (ret != 0) - __wt_verbose_notice(session, WT_VERB_RTS, - "performing shutdown rollback to stable failed with code %s", - __wt_strerror(session, ret, NULL, 0)); - else - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "shutdown rollback to stable has successfully finished and ran for %" PRIu64 - " milliseconds", - conn->shutdown_timeline.rts_ms); } s = NULL; @@ -2477,9 +2263,6 @@ __wt_txn_global_shutdown(WT_SESSION_IMPL *session, const char **cfg) if (s != NULL) { const char *checkpoint_cfg[] = { WT_CONFIG_BASE(session, WT_SESSION_checkpoint), ckpt_cfg, NULL}; - - __wt_timer_start(session, &timer); - WT_TRET(__wt_txn_checkpoint(s, checkpoint_cfg, true)); /* @@ -2488,12 +2271,6 @@ __wt_txn_global_shutdown(WT_SESSION_IMPL *session, const char **cfg) WT_WITH_DHANDLE(s, WT_SESSION_META_DHANDLE(s), __wt_tree_modify_set(s)); WT_TRET(__wt_session_close_internal(s)); - - /* Time since the shutdown checkpoint has started. */ - __wt_timer_evaluate_ms(session, &timer, &conn->shutdown_timeline.checkpoint_ms); - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "shutdown checkpoint has successfully finished and ran for %" PRIu64 " milliseconds", - conn->shutdown_timeline.checkpoint_ms); } } @@ -2531,15 +2308,6 @@ __wt_txn_is_blocking(WT_SESSION_IMPL *session) */ if (txn->mod_count == 0 && !__wt_op_timer_fired(session)) return (0); -#else - /* - * Most applications that are not using transactions to read/walk with a cursor cannot handle - * having rollback returned nor should the API reset and retry the operation, losing the - * cursor's position. Skip the check if there are no updates, the thread operation did not time - * out and the operation is not running in a transaction. - */ - if (txn->mod_count == 0 && !__wt_op_timer_fired(session) && !F_ISSET(txn, WT_TXN_RUNNING)) - return (0); #endif /* @@ -2598,8 +2366,7 @@ __wt_verbose_dump_txn_one( ", full checkpoint: %s" ", rollback reason: %s" ", flags: 0x%08" PRIx32 ", isolation: %s", - txn->id, txn->mod_count, txn->snapshot_data.snap_min, txn->snapshot_data.snap_max, - txn->snapshot_data.snapshot_count, + txn->id, txn->mod_count, txn->snap_min, txn->snap_max, txn->snapshot_count, __wt_timestamp_to_string(txn->commit_timestamp, ts_string[0]), __wt_timestamp_to_string(txn->durable_timestamp, ts_string[1]), __wt_timestamp_to_string(txn->first_commit_timestamp, ts_string[2]), diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c index 59042dd7086..cb4cebae43c 100644 --- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c +++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c @@ -550,7 +550,7 @@ __checkpoint_prepare(WT_SESSION_IMPL *session, bool *trackingp, const char *cfg[ tsp.tv_sec = 0; tsp.tv_nsec = WT_MILLION; __checkpoint_timing_stress(session, WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY, &tsp); - original_snap_min = session->txn->snapshot_data.snap_min; + original_snap_min = session->txn->snap_min; WT_DIAGNOSTIC_YIELD; @@ -584,7 +584,7 @@ __checkpoint_prepare(WT_SESSION_IMPL *session, bool *trackingp, const char *cfg[ */ __wt_writelock(session, &txn_global->rwlock); txn_global->checkpoint_txn_shared = *txn_shared; - txn_global->checkpoint_txn_shared.pinned_id = txn->snapshot_data.snap_min; + txn_global->checkpoint_txn_shared.pinned_id = txn->snap_min; /* * Sanity check that the oldest ID hasn't moved on before we have cleared our entry. @@ -666,7 +666,7 @@ __checkpoint_prepare(WT_SESSION_IMPL *session, bool *trackingp, const char *cfg[ __wt_txn_bump_snapshot(session); /* Assert that our snapshot min didn't somehow move backwards. */ - WT_ASSERT(session, session->txn->snapshot_data.snap_min >= original_snap_min); + WT_ASSERT(session, session->txn->snap_min >= original_snap_min); /* Flag as unused for non diagnostic builds. */ WT_UNUSED(original_snap_min); @@ -674,15 +674,13 @@ __checkpoint_prepare(WT_SESSION_IMPL *session, bool *trackingp, const char *cfg[ WT_ASSERT(session, conn->ckpt_reserved_session == NULL || !__wt_txn_visible_id_snapshot(txn_global->checkpoint_reserved_txn_id, - session->txn->snapshot_data.snap_min, session->txn->snapshot_data.snap_max, - session->txn->snapshot_data.snapshot, session->txn->snapshot_data.snapshot_count)); + session->txn->snap_min, session->txn->snap_max, session->txn->snapshot, + session->txn->snapshot_count)); if (use_timestamp) __wt_verbose_timestamp( session, txn_global->checkpoint_timestamp, "Checkpoint requested at stable timestamp"); - WT_STAT_CONN_SET(session, txn_checkpoint_snapshot_acquired, 1); - /* * Get a list of handles we want to flush; for named checkpoints this may pull closed objects * into the session cache. @@ -833,11 +831,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) /* Reset the statistics tracked per checkpoint. */ cache->evict_max_page_size = 0; - cache->evict_max_ms = 0; - cache->reentry_hs_eviction_ms = 0; - conn->rec_maximum_hs_wrapup_milliseconds = 0; - conn->rec_maximum_image_build_milliseconds = 0; - conn->rec_maximum_milliseconds = 0; + conn->rec_maximum_seconds = 0; /* Initialize the verbose tracking timer */ __wt_epoch(session, &conn->ckpt_timer_start); @@ -989,8 +983,6 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) /* Release the snapshot so we aren't pinning updates in cache. */ __wt_txn_release_snapshot(session); - WT_STAT_CONN_SET(session, txn_checkpoint_snapshot_acquired, 0); - /* Mark all trees as open for business (particularly eviction). */ WT_ERR(__checkpoint_apply_to_dhandles(session, cfg, __checkpoint_presync)); @@ -1371,15 +1363,6 @@ __checkpoint_lock_dirty_tree_int(WT_SESSION_IMPL *session, bool is_checkpoint, b is_wt_ckpt = WT_PREFIX_MATCH(ckpt->name, WT_CHECKPOINT); /* - * If we are restarting from a backup and we're in recovery do not delete any checkpoints. - * In the event of a crash we may need to restart from the backup and all checkpoints that - * were in the backup file must remain. - */ - if (F_ISSET(conn, WT_CONN_RECOVERING) && F_ISSET(conn, WT_CONN_WAS_BACKUP)) { - F_CLR(ckpt, WT_CKPT_DELETE); - continue; - } - /* * If there is a hot backup, don't delete any WiredTiger checkpoint that could possibly have * been created before the backup started. Fail if trying to delete any other named * checkpoint. diff --git a/src/third_party/wiredtiger/src/txn/txn_log.c b/src/third_party/wiredtiger/src/txn/txn_log.c index 95ec5dc899c..ece95dce5b7 100644 --- a/src/third_party/wiredtiger/src/txn/txn_log.c +++ b/src/third_party/wiredtiger/src/txn/txn_log.c @@ -497,15 +497,15 @@ __wt_txn_checkpoint_log(WT_SESSION_IMPL *session, bool full, uint32_t flags, WT_ break; case WT_TXN_LOG_CKPT_START: /* Take a copy of the transaction snapshot. */ - txn->ckpt_nsnapshot = txn->snapshot_data.snapshot_count; + txn->ckpt_nsnapshot = txn->snapshot_count; recsize = (size_t)txn->ckpt_nsnapshot * WT_INTPACK64_MAXSIZE; WT_ERR(__wt_scr_alloc(session, recsize, &txn->ckpt_snapshot)); end = p = txn->ckpt_snapshot->mem; /* There many not be any snapshot entries. */ if (end != NULL) { end += recsize; - for (i = 0; i < txn->snapshot_data.snapshot_count; i++) - WT_ERR(__wt_vpack_uint(&p, WT_PTRDIFF(end, p), txn->snapshot_data.snapshot[i])); + for (i = 0; i < txn->snapshot_count; i++) + WT_ERR(__wt_vpack_uint(&p, WT_PTRDIFF(end, p), txn->snapshot[i])); } break; case WT_TXN_LOG_CKPT_STOP: diff --git a/src/third_party/wiredtiger/src/txn/txn_recover.c b/src/third_party/wiredtiger/src/txn/txn_recover.c index 7d379e136f8..0c606be12ef 100644 --- a/src/third_party/wiredtiger/src/txn/txn_recover.c +++ b/src/third_party/wiredtiger/src/txn/txn_recover.c @@ -104,16 +104,14 @@ __recovery_cursor( /* * Helper to a cursor if this operation is to be applied during recovery. */ -#define GET_RECOVERY_CURSOR(session, r, lsnp, fileid, cp) \ - ret = __recovery_cursor(session, r, lsnp, fileid, false, cp); \ - __wt_verbose(session, WT_VERB_RECOVERY, \ - "%s op %" PRIu32 " to file %" PRIu32 " at LSN %" PRIu32 "/%" PRIu32, \ - ret != 0 ? "Error" : \ - cursor == NULL ? "Skipping" : \ - "Applying", \ - optype, fileid, (lsnp)->l.file, (lsnp)->l.offset); \ - WT_ERR(ret); \ - if (cursor == NULL) \ +#define GET_RECOVERY_CURSOR(session, r, lsnp, fileid, cp) \ + ret = __recovery_cursor(session, r, lsnp, fileid, false, cp); \ + __wt_verbose(session, WT_VERB_RECOVERY, \ + "%s op %" PRIu32 " to file %" PRIu32 " at LSN %" PRIu32 "/%" PRIu32, \ + ret != 0 ? "Error" : cursor == NULL ? "Skipping" : "Applying", optype, fileid, \ + (lsnp)->l.file, (lsnp)->l.offset); \ + WT_ERR(ret); \ + if (cursor == NULL) \ break /* @@ -446,8 +444,7 @@ __recovery_set_checkpoint_timestamp(WT_RECOVERY *r) /* * __recovery_set_oldest_timestamp -- - * Set the oldest timestamp as retrieved from the metadata file. Setting the oldest timestamp - * doesn't automatically set the pinned timestamp. + * Set the oldest timestamp as retrieved from the metadata file. */ static int __recovery_set_oldest_timestamp(WT_RECOVERY *r) @@ -590,44 +587,6 @@ err: } /* - * __recovery_txn_setup_initial_state -- - * Setup the transaction initial state required by rollback to stable. - */ -static int -__recovery_txn_setup_initial_state(WT_SESSION_IMPL *session, WT_RECOVERY *r) -{ - WT_CONNECTION_IMPL *conn; - - conn = S2C(session); - - WT_RET(__recovery_set_checkpoint_snapshot(session)); - - /* - * Set the checkpoint timestamp and oldest timestamp retrieved from the checkpoint metadata. - * These are the stable timestamp and oldest timestamps of the last successful checkpoint. - */ - WT_RET(__recovery_set_checkpoint_timestamp(r)); - WT_RET(__recovery_set_oldest_timestamp(r)); - - /* - * Now that timestamps extracted from the checkpoint metadata have been configured, configure - * the pinned timestamp. - */ - WT_RET(__wt_txn_update_pinned_timestamp(session, true)); - - WT_ASSERT(session, - conn->txn_global.has_stable_timestamp == false && - conn->txn_global.stable_timestamp == WT_TS_NONE); - - /* Set the stable timestamp from recovery timestamp. */ - conn->txn_global.stable_timestamp = conn->txn_global.recovery_timestamp; - if (conn->txn_global.stable_timestamp != WT_TS_NONE) - conn->txn_global.has_stable_timestamp = true; - - return (0); -} - -/* * __recovery_setup_file -- * Set up the recovery slot for a file, track the largest file ID, and update the base write gen * based on the file's configuration. @@ -680,8 +639,8 @@ __recovery_setup_file(WT_RECOVERY *r, const char *uri, const char *config) (WT_IS_MAX_LSN(&r->max_ckpt_lsn) || __wt_log_cmp(&lsn, &r->max_ckpt_lsn) > 0)) WT_ASSIGN_LSN(&r->max_ckpt_lsn, &lsn); - /* Update the base write gen and most recent checkpoint based on this file's configuration. */ - if ((ret = __wt_metadata_update_connection(r->session, config)) != 0) + /* Update the base write gen based on this file's configuration. */ + if ((ret = __wt_metadata_update_base_write_gen(r->session, config)) != 0) WT_RET_MSG(r->session, ret, "Failed recovery setup for %s: cannot update write gen", uri); return (0); } @@ -846,7 +805,6 @@ __wt_txn_recover(WT_SESSION_IMPL *session, const char *cfg[]) WT_DECL_RET; WT_RECOVERY r; WT_RECOVERY_FILE *metafile; - WT_TIMER timer, rts_timer, checkpoint_timer; wt_off_t hs_size; char *config; char ts_string[2][WT_TS_INT_STRING_SIZE]; @@ -864,8 +822,6 @@ __wt_txn_recover(WT_SESSION_IMPL *session, const char *cfg[]) eviction_started = false; was_backup = F_ISSET(conn, WT_CONN_WAS_BACKUP); - __wt_timer_start(session, &timer); - /* We need a real session for recovery. */ WT_RET(__wt_open_internal_session(conn, "txn-recover", false, 0, 0, &session)); r.session = session; @@ -1052,13 +1008,10 @@ done: "Upgrading from a WiredTiger version 10.0.0 database that was not shutdown cleanly is " "not allowed. Perform a clean shutdown on version 10.0.0 and then upgrade."); #endif - /* Time since the Log replay has started. */ - __wt_timer_evaluate_ms(session, &timer, &conn->recovery_timeline.log_replay_ms); - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "recovery log replay has successfully finished and ran for %" PRIu64 " milliseconds", - conn->recovery_timeline.log_replay_ms); - WT_ERR(__recovery_txn_setup_initial_state(session, &r)); + WT_ERR(__recovery_set_checkpoint_timestamp(&r)); + WT_ERR(__recovery_set_oldest_timestamp(&r)); + WT_ERR(__recovery_set_checkpoint_snapshot(session)); /* * Set the history store file size as it may already exist after a restart. @@ -1075,13 +1028,26 @@ done: * 2. The history store file was found in the metadata. */ if (hs_exists && !F_ISSET(conn, WT_CONN_READONLY)) { - __wt_timer_start(session, &rts_timer); /* Start the eviction threads for rollback to stable if not already started. */ if (!eviction_started) { WT_ERR(__wt_evict_create(session)); eviction_started = true; } + WT_ASSERT(session, + conn->txn_global.has_stable_timestamp == false && + conn->txn_global.stable_timestamp == WT_TS_NONE); + + /* + * Set the stable timestamp from recovery timestamp and process the trees for rollback to + * stable. + */ + conn->txn_global.stable_timestamp = conn->txn_global.recovery_timestamp; + conn->txn_global.has_stable_timestamp = false; + + if (conn->txn_global.recovery_timestamp != WT_TS_NONE) + conn->txn_global.has_stable_timestamp = true; + __wt_verbose_multi(session, WT_DECL_VERBOSE_MULTI_CATEGORY(((WT_VERBOSE_CATEGORY[]){WT_VERB_RECOVERY, WT_VERB_RTS})), "performing recovery rollback_to_stable with stable timestamp: %s and oldest timestamp: " @@ -1090,13 +1056,6 @@ done: __wt_timestamp_to_string(conn->txn_global.oldest_timestamp, ts_string[1])); rts_executed = true; WT_ERR(__wt_rollback_to_stable(session, NULL, true)); - - /* Time since the rollback to stable has started. */ - __wt_timer_evaluate_ms(session, &rts_timer, &conn->recovery_timeline.rts_ms); - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "recovery rollback to stable has successfully finished and ran for %" PRIu64 - " milliseconds", - conn->recovery_timeline.rts_ms); } /* @@ -1107,24 +1066,13 @@ done: if (eviction_started) WT_TRET(__wt_evict_destroy(session)); - if (do_checkpoint || rts_executed) { - __wt_timer_start(session, &checkpoint_timer); + if (do_checkpoint || rts_executed) /* * Forcibly log a checkpoint so the next open is fast and keep the metadata up to date with * the checkpoint LSN and removal. */ WT_ERR(session->iface.checkpoint(&session->iface, "force=1")); - /* Time since the recovery checkpoint has started. */ - __wt_timer_evaluate_ms(session, &checkpoint_timer, &conn->recovery_timeline.checkpoint_ms); - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "recovery checkpoint has successfully finished and ran for %" PRIu64 " milliseconds", - conn->recovery_timeline.checkpoint_ms); - } - - /* Remove any backup file now that metadata has been synced. */ - WT_ERR(__wt_backup_file_remove(session)); - /* * Update the open dhandles write generations and base write generation with the connection's * base write generation because the recovery checkpoint writes the pages to disk with new write @@ -1142,15 +1090,6 @@ done: WT_ERR(__wt_log_truncate_files(session, NULL, true)); FLD_SET(conn->log_flags, WT_CONN_LOG_RECOVER_DONE); - /* Time since the recovery has started. */ - __wt_timer_evaluate_ms(session, &timer, &conn->recovery_timeline.recovery_ms); - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "recovery was completed successfully and took %" PRIu64 "ms, including %" PRIu64 - "ms for the log replay, %" PRIu64 "ms for the rollback to stable, and %" PRIu64 - "ms for the checkpoint.", - conn->recovery_timeline.recovery_ms, conn->recovery_timeline.log_replay_ms, - conn->recovery_timeline.rts_ms, conn->recovery_timeline.checkpoint_ms); - err: WT_TRET(__recovery_close_cursors(&r)); __wt_free(session, config); diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c index 698cccf79e9..c3278de6116 100644 --- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c +++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c @@ -53,22 +53,12 @@ __rollback_delete_hs(WT_SESSION_IMPL *session, WT_ITEM *key, wt_timestamp_t ts) for (; ret == 0; ret = hs_cursor->prev(hs_cursor)) { /* Retrieve the time window from the history cursor. */ __wt_hs_upd_time_window(hs_cursor, &hs_tw); - - /* - * Remove all history store versions with a stop timestamp greater than the start/stop - * timestamp of a stable update in the data store. - */ - if (hs_tw->stop_ts <= ts) + if (hs_tw->start_ts < ts) break; WT_ERR(hs_cursor->remove(hs_cursor)); WT_STAT_CONN_DATA_INCR(session, txn_rts_hs_removed); - - /* - * The globally visible start time window's are cleared during history store reconciliation. - * Treat them also as a stable entry removal from the history store. - */ - if (hs_tw->start_ts == ts || hs_tw->start_ts == WT_TS_NONE) + if (hs_tw->start_ts == ts) WT_STAT_CONN_DATA_INCR(session, cache_hs_key_truncate_rts); else WT_STAT_CONN_DATA_INCR(session, cache_hs_key_truncate_rts_unstable); @@ -119,12 +109,13 @@ __rollback_abort_update(WT_SESSION_IMPL *session, WT_ITEM *key, WT_UPDATE *first } /* - * Clear the history store flags for the stable update to indicate that this update should be - * written to the history store later. The next time when this update is moved into the history - * store, it will have a different stop time point. + * Clear the history store flag for the stable update to indicate that this update should not be + * written into the history store later, when all the aborted updates are removed from the + * history store. The next time when this update is moved into the history store, it will have a + * different stop time point. */ if (stable_upd != NULL) { - if (F_ISSET(stable_upd, WT_UPDATE_HS | WT_UPDATE_TO_DELETE_FROM_HS)) { + if (F_ISSET(stable_upd, WT_UPDATE_HS)) { /* Find the update following a stable tombstone. */ if (stable_upd->type == WT_UPDATE_TOMBSTONE) { tombstone = stable_upd; @@ -133,7 +124,7 @@ __rollback_abort_update(WT_SESSION_IMPL *session, WT_ITEM *key, WT_UPDATE *first if (stable_upd->txnid != WT_TXN_ABORTED) { WT_ASSERT(session, stable_upd->type != WT_UPDATE_TOMBSTONE && - F_ISSET(stable_upd, WT_UPDATE_HS | WT_UPDATE_TO_DELETE_FROM_HS)); + F_ISSET(stable_upd, WT_UPDATE_HS)); break; } } @@ -149,24 +140,13 @@ __rollback_abort_update(WT_SESSION_IMPL *session, WT_ITEM *key, WT_UPDATE *first session, key, stable_upd == NULL ? tombstone->start_ts : stable_upd->start_ts)); /* - * Clear the history store flags for the first stable update. Otherwise, it will not be + * Clear the history store flag for the first stable update. Otherwise, it will not be * moved to history store again. */ if (stable_upd != NULL) - F_CLR(stable_upd, WT_UPDATE_HS | WT_UPDATE_TO_DELETE_FROM_HS); + F_CLR(stable_upd, WT_UPDATE_HS); if (tombstone != NULL) - F_CLR(tombstone, WT_UPDATE_HS | WT_UPDATE_TO_DELETE_FROM_HS); - } else if (WT_IS_HS(session->dhandle) && stable_upd->type != WT_UPDATE_TOMBSTONE) { - /* - * History store will have a combination of both tombstone and update/modify types in - * the update list to represent the time window of an update. When we are aborting the - * tombstone, make sure to remove all of the remaining updates also. In most of the - * scenarios, there will be only one update present except when the data store is a - * prepared commit where it is possible to have more than one update. The existing - * on-disk versions are removed while processing the on-disk entries. - */ - for (; stable_upd != NULL; stable_upd = stable_upd->next) - stable_upd->txnid = WT_TXN_ABORTED; + F_CLR(tombstone, WT_UPDATE_HS); } if (stable_update_found != NULL) *stable_update_found = true; @@ -1307,65 +1287,25 @@ __wt_rts_page_skip( } /* - * __rollback_progress_msg -- - * Log a verbose message about the progress of the current rollback to stable. - */ -static void -__rollback_progress_msg(WT_SESSION_IMPL *session, struct timespec rollback_start, - uint64_t rollback_count, uint64_t max_count, uint64_t *rollback_msg_count, bool walk) -{ - struct timespec cur_time; - uint64_t time_diff; - - __wt_epoch(session, &cur_time); - - /* Time since the rollback started. */ - time_diff = WT_TIMEDIFF_SEC(cur_time, rollback_start); - - if ((time_diff / WT_PROGRESS_MSG_PERIOD) > *rollback_msg_count) { - if (walk) - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "Rollback to stable has been performing on %s for %" PRIu64 - " seconds. For more detailed logging, enable WT_VERB_RTS ", - session->dhandle->name, time_diff); - else - __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, - "Rollback to stable has been running for %" PRIu64 - " milliseconds and has inspected %" PRIu64 " files of %" PRIu64 - ". For more detailed logging, enable WT_VERB_RTS", - time_diff, rollback_count, max_count); - *rollback_msg_count = time_diff / WT_PROGRESS_MSG_PERIOD; - } -} - -/* * __rollback_to_stable_btree_walk -- * Called for each open handle - choose to either skip or wipe the commits */ static int __rollback_to_stable_btree_walk(WT_SESSION_IMPL *session, wt_timestamp_t rollback_timestamp) { - struct timespec rollback_timer; WT_DECL_RET; WT_REF *ref; - uint64_t rollback_msg_count; - - /* Initialize the verbose tracking timer. */ - __wt_epoch(session, &rollback_timer); - rollback_msg_count = 0; /* Walk the tree, marking commits aborted where appropriate. */ ref = NULL; while ((ret = __wt_tree_walk_custom_skip(session, &ref, __wt_rts_page_skip, &rollback_timestamp, WT_READ_NO_EVICT | WT_READ_WONT_NEED | WT_READ_VISIBLE_ALL)) == 0 && - ref != NULL) { - __rollback_progress_msg(session, rollback_timer, 0, 0, &rollback_msg_count, true); + ref != NULL) if (F_ISSET(ref, WT_REF_FLAG_INTERNAL)) WT_WITH_PAGE_INDEX( session, ret = __rollback_abort_fast_truncate(session, ref, rollback_timestamp)); else WT_RET(__rollback_abort_updates(session, ref, rollback_timestamp)); - } return (ret); } @@ -1567,18 +1507,16 @@ __rollback_to_stable_hs_final_pass(WT_SESSION_IMPL *session, wt_timestamp_t roll WT_ERR(__wt_session_get_dhandle(session, WT_HS_URI, NULL, NULL, 0)); /* - * The rollback operation should be skipped if there is no stable timestamp. Otherwise, it - * should be performed if one of the following criteria is satisfied: - * - The history store has dirty content. - * - The checkpoint durable start/stop timestamp is greater than the rollback timestamp. + * The rollback operation should be performed on the history store file when the checkpoint + * durable start/stop timestamp is greater than the rollback timestamp. But skip if there is no + * stable timestamp. * * Note that the corresponding code in __rollback_to_stable_btree_apply also checks whether * there _are_ timestamped updates by checking max_durable_ts; that check is redundant here for * several reasons, the most immediate being that max_durable_ts cannot be none (zero) because * it's greater than rollback_timestamp, which is itself greater than zero. */ - if ((S2BT(session)->modified || max_durable_ts > rollback_timestamp) && - rollback_timestamp != WT_TS_NONE) { + if (max_durable_ts > rollback_timestamp && rollback_timestamp != WT_TS_NONE) { __wt_verbose_multi(session, WT_VERB_RECOVERY_RTS(session), "tree rolled back with durable timestamp: %s", __wt_timestamp_to_string(max_durable_ts, ts_string[0])); @@ -1605,6 +1543,31 @@ err: } /* + * __rollback_progress_msg -- + * Log a verbose message about the progress of the current rollback to stable. + */ +static void +__rollback_progress_msg(WT_SESSION_IMPL *session, struct timespec rollback_start, + uint64_t rollback_count, uint64_t *rollback_msg_count) +{ + struct timespec cur_time; + uint64_t time_diff; + + __wt_epoch(session, &cur_time); + + /* Time since the rollback started. */ + time_diff = WT_TIMEDIFF_SEC(cur_time, rollback_start); + + if ((time_diff / WT_PROGRESS_MSG_PERIOD) > *rollback_msg_count) { + __wt_verbose(session, WT_VERB_RECOVERY_PROGRESS, + "Rollback to stable has been running for %" PRIu64 " seconds and has inspected %" PRIu64 + " files. For more detailed logging, enable WT_VERB_RTS", + time_diff, rollback_count); + ++(*rollback_msg_count); + } +} + +/* * __rollback_to_stable_btree_apply -- * Perform rollback to stable on a single file. */ @@ -1620,7 +1583,7 @@ __rollback_to_stable_btree_apply( uint64_t rollback_txnid, write_gen; uint32_t btree_id; char ts_string[2][WT_TS_INT_STRING_SIZE]; - bool dhandle_allocated, has_txn_updates_gt_than_ckpt_snap, perform_rts; + bool dhandle_allocated, durable_ts_found, has_txn_updates_gt_than_ckpt_snap, perform_rts; bool prepared_updates; /* Ignore non-btree objects as well as the metadata and history store files. */ @@ -1634,18 +1597,22 @@ __rollback_to_stable_btree_apply( /* Find out the max durable timestamp of the object from checkpoint. */ newest_start_durable_ts = newest_stop_durable_ts = WT_TS_NONE; - prepared_updates = has_txn_updates_gt_than_ckpt_snap = false; + durable_ts_found = prepared_updates = has_txn_updates_gt_than_ckpt_snap = false; WT_RET(__wt_config_getones(session, config, "checkpoint", &cval)); __wt_config_subinit(session, &ckptconf, &cval); for (; __wt_config_next(&ckptconf, &key, &cval) == 0;) { ret = __wt_config_subgets(session, &cval, "newest_start_durable_ts", &value); - if (ret == 0) + if (ret == 0) { newest_start_durable_ts = WT_MAX(newest_start_durable_ts, (wt_timestamp_t)value.val); + durable_ts_found = true; + } WT_RET_NOTFOUND_OK(ret); ret = __wt_config_subgets(session, &cval, "newest_stop_durable_ts", &value); - if (ret == 0) + if (ret == 0) { newest_stop_durable_ts = WT_MAX(newest_stop_durable_ts, (wt_timestamp_t)value.val); + durable_ts_found = true; + } WT_RET_NOTFOUND_OK(ret); ret = __wt_config_subgets(session, &cval, "prepare", &value); if (ret == 0) { @@ -1654,7 +1621,7 @@ __rollback_to_stable_btree_apply( } WT_RET_NOTFOUND_OK(ret); ret = __wt_config_subgets(session, &cval, "newest_txn", &value); - if (ret == 0) + if (value.len != 0) rollback_txnid = (uint64_t)value.val; WT_RET_NOTFOUND_OK(ret); ret = __wt_config_subgets(session, &cval, "addr", &value); @@ -1682,11 +1649,13 @@ __rollback_to_stable_btree_apply( } /* - * During recovery, a table is skipped by RTS if one of the conditions is met: - * 1. The table is empty or newly-created. - * 2. The table has timestamped updates without a stable timestamp. + * The rollback to stable will skip the tables during recovery and shutdown in the following + * conditions. + * 1. Empty table. + * 2. Table has timestamped updates without a stable timestamp. */ - if (F_ISSET(S2C(session), WT_CONN_RECOVERING) && + if ((F_ISSET(S2C(session), WT_CONN_RECOVERING) || + F_ISSET(S2C(session), WT_CONN_CLOSING_CHECKPOINT)) && (addr_size == 0 || (rollback_timestamp == WT_TS_NONE && max_durable_ts != WT_TS_NONE))) { __wt_verbose_multi(session, WT_VERB_RECOVERY_RTS(session), "skip rollback to stable on file %s because %s", uri, @@ -1700,7 +1669,8 @@ __rollback_to_stable_btree_apply( * 1. The dhandle is present in the cache and tree is modified. * 2. The checkpoint durable start/stop timestamp is greater than the rollback timestamp. * 3. The checkpoint has prepared updates written to disk. - * 4. The checkpoint newest txn is greater than snapshot min txn id. + * 4. There is no durable timestamp in any checkpoint. + * 5. The checkpoint newest txn is greater than snapshot min txn id. */ WT_WITH_HANDLE_LIST_READ_LOCK(session, (ret = __wt_conn_dhandle_find(session, uri, NULL))); @@ -1709,7 +1679,7 @@ __rollback_to_stable_btree_apply( WT_ERR_NOTFOUND_OK(ret, false); if (perform_rts || max_durable_ts > rollback_timestamp || prepared_updates || - has_txn_updates_gt_than_ckpt_snap) { + !durable_ts_found || has_txn_updates_gt_than_ckpt_snap) { /* * Open a handle; we're potentially opening a lot of handles and there's no reason to cache * all of them for future unknown use, discard on close. @@ -1722,11 +1692,12 @@ __rollback_to_stable_btree_apply( __wt_verbose_multi(session, WT_VERB_RECOVERY_RTS(session), "tree rolled back with durable timestamp: %s, or when tree is modified: %s or " - "prepared updates: %s or txnid: %" PRIu64 + "prepared updates: %s or when durable time is not found: %s or txnid: %" PRIu64 " is greater than recovery checkpoint snap min: %s", __wt_timestamp_to_string(max_durable_ts, ts_string[0]), S2BT(session)->modified ? "true" : "false", prepared_updates ? "true" : "false", - rollback_txnid, has_txn_updates_gt_than_ckpt_snap ? "true" : "false"); + !durable_ts_found ? "true" : "false", rollback_txnid, + has_txn_updates_gt_than_ckpt_snap ? "true" : "false"); WT_ERR(__rollback_to_stable_btree(session, rollback_timestamp)); } else __wt_verbose_multi(session, WT_VERB_RECOVERY_RTS(session), @@ -1803,40 +1774,23 @@ __rollback_to_stable_btree_apply_all(WT_SESSION_IMPL *session, wt_timestamp_t ro struct timespec rollback_timer; WT_CURSOR *cursor; WT_DECL_RET; - uint64_t max_count, rollback_count, rollback_msg_count; + uint64_t rollback_count, rollback_msg_count; const char *config, *uri; - bool have_cursor; /* Initialize the verbose tracking timer. */ __wt_epoch(session, &rollback_timer); - max_count = rollback_count = 0; + rollback_count = 0; rollback_msg_count = 0; WT_RET(__wt_metadata_cursor(session, &cursor)); - have_cursor = true; - while ((ret = cursor->next(cursor)) == 0) { - WT_ERR(cursor->get_key(cursor, &uri)); - if (WT_BTREE_PREFIX(uri)) - ++max_count; - } - - WT_ERR_NOTFOUND_OK(ret, false); - WT_ERR(__wt_metadata_cursor_release(session, &cursor)); - have_cursor = false; - - WT_ERR(__wt_metadata_cursor(session, &cursor)); - have_cursor = true; - while ((ret = cursor->next(cursor)) == 0) { /* Log a progress message. */ + __rollback_progress_msg(session, rollback_timer, rollback_count, &rollback_msg_count); + ++rollback_count; + WT_ERR(cursor->get_key(cursor, &uri)); WT_ERR(cursor->get_value(cursor, &config)); - if (WT_BTREE_PREFIX(uri)) - ++rollback_count; - __rollback_progress_msg( - session, rollback_timer, rollback_count, max_count, &rollback_msg_count, false); - F_SET(session, WT_SESSION_QUIET_CORRUPT_FILE); ret = __rollback_to_stable_btree_apply(session, uri, config, rollback_timestamp); F_CLR(session, WT_SESSION_QUIET_CORRUPT_FILE); @@ -1855,21 +1809,11 @@ __rollback_to_stable_btree_apply_all(WT_SESSION_IMPL *session, wt_timestamp_t ro } WT_ERR_NOTFOUND_OK(ret, false); - /* - * Performing eviction in parallel to a checkpoint can lead to a situation where the history - * store has more updates than its corresponding data store. Performing history store cleanup at - * the end can enable the removal of any such unstable updates that are written to the history - * store. - * - * Do not perform the final pass on the history store in an in-memory configuration as it - * doesn't exist. - */ - if (!F_ISSET(S2C(session), WT_CONN_IN_MEMORY)) + if (F_ISSET(S2C(session), WT_CONN_RECOVERING)) WT_ERR(__rollback_to_stable_hs_final_pass(session, rollback_timestamp)); err: - if (have_cursor) - WT_TRET(__wt_metadata_cursor_release(session, &cursor)); + WT_TRET(__wt_metadata_cursor_release(session, &cursor)); return (ret); } @@ -1898,24 +1842,13 @@ __rollback_to_stable(WT_SESSION_IMPL *session, bool no_ckpt) WT_ERR(__rollback_to_stable_check(session)); /* - * Update the global time window state to have consistent view from global visibility rules for - * the rollback to stable to bring back the database into a consistent state. - * - * As part of the below function call, the oldest transaction id and pinned timestamps are - * updated. - */ - WT_ERR(__wt_txn_update_oldest(session, WT_TXN_OLDEST_STRICT | WT_TXN_OLDEST_WAIT)); - - WT_ASSERT(session, txn_global->has_pinned_timestamp || !txn_global->has_oldest_timestamp); - - /* * Copy the stable timestamp, otherwise we'd need to lock it each time it's accessed. Even * though the stable timestamp isn't supposed to be updated while rolling back, accessing it * without a lock would violate protocol. */ WT_ORDERED_READ(rollback_timestamp, txn_global->stable_timestamp); __wt_verbose_multi(session, WT_VERB_RECOVERY_RTS(session), - "start rollback to stable with stable timestamp: %s and oldest timestamp: %s", + "performing rollback to stable with stable timestamp: %s and oldest timestamp: %s", __wt_timestamp_to_string(rollback_timestamp, ts_string[0]), __wt_timestamp_to_string(txn_global->oldest_timestamp, ts_string[1])); @@ -1968,8 +1901,6 @@ __wt_rollback_to_stable(WT_SESSION_IMPL *session, const char *cfg[], bool no_ckp WT_STAT_CONN_SET(session, txn_rollback_to_stable_running, 1); WT_WITH_CHECKPOINT_LOCK( session, WT_WITH_SCHEMA_LOCK(session, ret = __rollback_to_stable(session, no_ckpt))); - - __wt_verbose_multi(session, WT_VERB_RECOVERY_RTS(session), "%s", "finished rollback to stable"); WT_STAT_CONN_SET(session, txn_rollback_to_stable_running, 0); WT_TRET(__wt_session_close_internal(session)); diff --git a/src/third_party/wiredtiger/src/utilities/util_dump.c b/src/third_party/wiredtiger/src/utilities/util_dump.c index 5be4a742239..d1d5de1fcf6 100755 --- a/src/third_party/wiredtiger/src/utilities/util_dump.c +++ b/src/third_party/wiredtiger/src/utilities/util_dump.c @@ -620,10 +620,7 @@ dump_prefix(WT_SESSION *session, bool pretty, bool hex, bool json) if (!json && (fprintf(fp, "WiredTiger Dump (WiredTiger Version %d.%d.%d)\n", vmajor, vminor, vpatch) < 0 || - fprintf(fp, "Format=%s\n", - (pretty && hex) ? "print hex" : - hex ? "hex" : - "print") < 0 || + fprintf(fp, "Format=%s\n", (pretty && hex) ? "print hex" : hex ? "hex" : "print") < 0 || fprintf(fp, "Header\n") < 0)) return (util_err(session, EIO, NULL)); diff --git a/src/third_party/wiredtiger/src/utilities/util_verify.c b/src/third_party/wiredtiger/src/utilities/util_verify.c index 1f619e4f94f..4e0a0675852 100644 --- a/src/third_party/wiredtiger/src/utilities/util_verify.c +++ b/src/third_party/wiredtiger/src/utilities/util_verify.c @@ -16,13 +16,12 @@ static int usage(void) { static const char *options[] = {"-d config", - "display underlying information during verification", "-c", - "continue to the next page after encountering error during verification", "-s", + "display underlying information during verification", "-s", "verify against the specified timestamp", "-t", "do not clear txn ids during verification", NULL, NULL}; util_usage( - "verify [-s] [-t] [-c] [-d dump_address | dump_blocks | dump_layout | dump_offsets=#,# | " + "verify [-s] [-t] [-d dump_address | dump_blocks | dump_layout | dump_offsets=#,# | " "dump_pages] " "[uri]", "options:", options); @@ -41,17 +40,13 @@ util_verify(WT_SESSION *session, int argc, char *argv[]) size_t size; int ch; char *config, *dump_offsets, *uri; - bool do_not_clear_txn_id, dump_address, dump_blocks, dump_layout, dump_pages, read_corrupt, - stable_timestamp; + bool do_not_clear_txn_id, dump_address, dump_blocks, dump_layout, dump_pages, stable_timestamp; - do_not_clear_txn_id = dump_address = dump_blocks = dump_layout = dump_pages = read_corrupt = - stable_timestamp = false; + do_not_clear_txn_id = dump_address = dump_blocks = dump_layout = dump_pages = stable_timestamp = + false; config = dump_offsets = uri = NULL; - while ((ch = __wt_getopt(progname, argc, argv, "cd:st")) != EOF) + while ((ch = __wt_getopt(progname, argc, argv, "d:st")) != EOF) switch (ch) { - case 'c': - read_corrupt = true; - break; case 'd': if (strcmp(__wt_optarg, "dump_address") == 0) dump_address = true; @@ -93,21 +88,20 @@ util_verify(WT_SESSION *session, int argc, char *argv[]) if ((uri = util_uri(session, *argv, "table")) == NULL) return (1); - if (do_not_clear_txn_id || read_corrupt || dump_address || dump_blocks || dump_layout || - dump_offsets != NULL || dump_pages || stable_timestamp) { - size = strlen("do_not_clear_txn_id,") + strlen("read_corrupt,") + strlen("dump_address,") + - strlen("dump_blocks,") + strlen("dump_layout,") + strlen("dump_pages,") + - strlen("dump_offsets[],") + (dump_offsets == NULL ? 0 : strlen(dump_offsets)) + - strlen("history_store") + strlen("stable_timestamp,") + 20; + if (do_not_clear_txn_id || dump_address || dump_blocks || dump_layout || dump_offsets != NULL || + dump_pages || stable_timestamp) { + size = strlen("do_not_clear_txn_id,") + strlen("dump_address,") + strlen("dump_blocks,") + + strlen("dump_layout,") + strlen("dump_pages,") + strlen("dump_offsets[],") + + (dump_offsets == NULL ? 0 : strlen(dump_offsets)) + strlen("history_store") + + strlen("stable_timestamp,") + 20; if ((config = malloc(size)) == NULL) { ret = util_err(session, errno, NULL); goto err; } - if ((ret = __wt_snprintf(config, size, "%s%s%s%s%s%s%s%s%s%s", + if ((ret = __wt_snprintf(config, size, "%s%s%s%s%s%s%s%s%s", do_not_clear_txn_id ? "do_not_clear_txn_id," : "", - read_corrupt ? "read_corrupt," : "", dump_address ? "dump_address," : "", - dump_blocks ? "dump_blocks," : "", dump_layout ? "dump_layout," : "", - dump_offsets != NULL ? "dump_offsets=[" : "", + dump_address ? "dump_address," : "", dump_blocks ? "dump_blocks," : "", + dump_layout ? "dump_layout," : "", dump_offsets != NULL ? "dump_offsets=[" : "", dump_offsets != NULL ? dump_offsets : "", dump_offsets != NULL ? "]," : "", dump_pages ? "dump_pages," : "", stable_timestamp ? "stable_timestamp," : "")) != 0) { diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/README b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/README deleted file mode 100644 index e9d53be96d1..00000000000 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/README +++ /dev/null @@ -1,4 +0,0 @@ -We have modified concurrencytest.py from the original concurrencytest-0.1.2 to wait for the child processes -preventing defunct processes and to prefix output with the running PID for debuggability.o - -Future changes such as updating concurrencytest must take this into account. diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/PKG-INFO b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/PKG-INFO index edb06bf7a42..edb06bf7a42 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/PKG-INFO +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/PKG-INFO diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/PKG-INFO b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/PKG-INFO index edb06bf7a42..edb06bf7a42 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/PKG-INFO +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/PKG-INFO diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/SOURCES.txt b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/SOURCES.txt index bf9f692ad1f..bf9f692ad1f 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/SOURCES.txt +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/SOURCES.txt diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/dependency_links.txt b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/dependency_links.txt index 8b137891791..8b137891791 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/dependency_links.txt +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/dependency_links.txt diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/requires.txt b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/requires.txt index 537ebcbac33..537ebcbac33 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/requires.txt +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/requires.txt diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/top_level.txt b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/top_level.txt index cfc96e6db71..cfc96e6db71 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.egg-info/top_level.txt +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.egg-info/top_level.txt diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.py b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.py index f9049ce8518..b3cb52d48d3 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/concurrencytest.py +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/concurrencytest.py @@ -23,9 +23,7 @@ Unix only. import os import sys -import time import traceback -from threading import Thread import unittest from itertools import cycle from multiprocessing import cpu_count @@ -42,29 +40,9 @@ _all__ = [ 'partition_tests', ] -# This file has been modified from the original concurrencytest-0.1.2 to wait for the child processes -# preventing defunct processes and to prefix output with the running PID for debuggability. CPU_COUNT = cpu_count() -def wait_for_children(pids): - while pids: - try: - # As Windows doesn't support -1 for all children, loop through each child pid explicitly. - for child_pid in pids: - pid, exit_status = os.waitpid(child_pid, os.WNOHANG) - exit_code = os.waitstatus_to_exitcode(exit_status) - if exit_code != 0: - pids.remove(pid) - if exit_code > 0: - print("[pid:{}]: Unexpected exit ({}) for child process ({})".format(os.getpid(), exit_code, pid)) - else: - print("[pid:{}]: Unexpected exit by signal ({}) for child process ({})".format(os.getpid(), abs(exit_code), pid)) - except ChildProcessError: - # No children processes. - break - # Sleep as the waipid is non blocking. - time.sleep(5) def fork_for_tests(concurrency_num=CPU_COUNT): """Implementation of `make_tests` used to construct `ConcurrentTestSuite`. @@ -83,7 +61,6 @@ def fork_for_tests(concurrency_num=CPU_COUNT): test_blocks = partition_tests(suite, concurrency_num) # Clear the tests from the original suite so it doesn't keep them alive suite._tests[:] = [] - pids = [] for process_tests in test_blocks: process_suite = unittest.TestSuite(process_tests) # Also clear each split list so new suite has only reference @@ -102,8 +79,6 @@ def fork_for_tests(concurrency_num=CPU_COUNT): subunit_result = AutoTimingTestResultDecorator( TestProtocolClient(stream) ) - # Set the pid tag for the parent to log with this information. - subunit_result.tags(["pid:" + str(os.getpid())], []) process_suite.run(subunit_result) except: # Try and report traceback on stream, but exit with error @@ -112,7 +87,7 @@ def fork_for_tests(concurrency_num=CPU_COUNT): # written in one go to avoid interleaving lines from # multiple failing children. try: - print("[pid:{}]: {}".format(os.getpid(), traceback.format_exc())) + stream.write(traceback.format_exc()) finally: os._exit(1) os._exit(0) @@ -121,10 +96,6 @@ def fork_for_tests(concurrency_num=CPU_COUNT): stream = os.fdopen(c2pread, 'rb', 1) test = ProtocolTestCase(stream) result.append(test) - pids.append(pid) - # Monitor our children to prevent leaving <defunct> processes around. - wait_thread = Thread(target = wait_for_children, args = (pids, )) - wait_thread.start() return result return do_fork @@ -142,6 +113,7 @@ def partition_tests(suite, count): partition.append(test) return partitions + if __name__ == '__main__': import time diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/setup.cfg b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/setup.cfg index 861a9f55426..861a9f55426 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/setup.cfg +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/setup.cfg diff --git a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/setup.py b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/setup.py index 447dc4110fe..447dc4110fe 100644 --- a/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2-locally-modified/setup.py +++ b/src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/setup.py diff --git a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c index ccfa2764787..cc6964d7db3 100644 --- a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c +++ b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c @@ -68,7 +68,6 @@ main(int argc, char *argv[]) g.ntables = 3; g.nworkers = 1; g.sweep_stress = g.use_timestamps = false; - g.failpoint_eviction_fail_after_reconciliation = false; g.failpoint_hs_delete_key_from_ts = false; g.hs_checkpoint_timing_stress = g.reserved_txnid_timing_stress = false; g.checkpoint_slow_timing_stress = false; @@ -128,9 +127,6 @@ main(int argc, char *argv[]) case '5': g.checkpoint_slow_timing_stress = true; break; - case '7': - g.failpoint_eviction_fail_after_reconciliation = true; - break; default: return (usage()); } @@ -277,10 +273,7 @@ wt_connect(const char *config_open) g.reserved_txnid_timing_stress || g.checkpoint_slow_timing_stress) { timing_stress = true; testutil_check(__wt_snprintf(timing_stress_config, sizeof(timing_stress_config), - ",timing_stress_for_test=[%s%s%s%s%s%s]", g.sweep_stress ? "aggressive_sweep" : "", - g.failpoint_eviction_fail_after_reconciliation ? - "failpoint_eviction_fail_after_reconciliation" : - "", + ",timing_stress_for_test=[%s%s%s%s%s]", g.sweep_stress ? "aggressive_sweep" : "", g.failpoint_hs_delete_key_from_ts ? "failpoint_history_store_delete_key_from_ts" : "", g.hs_checkpoint_timing_stress ? "history_store_checkpoint_delay" : "", g.reserved_txnid_timing_stress ? "checkpoint_reserved_txnid_delay" : "", @@ -299,10 +292,8 @@ wt_connect(const char *config_open) */ if (g.sweep_stress) testutil_check(__wt_snprintf(config, sizeof(config), - "create,cache_cursors=false,statistics=(fast),statistics_log=(json,wait=1),error_" - "prefix=" - "\"%s\",file_manager=(close_handle_minimum=1,close_idle_time=1,close_scan_interval=1)" - "," + "create,cache_cursors=false,statistics=(fast),statistics_log=(json,wait=1),error_prefix=" + "\"%s\",file_manager=(close_handle_minimum=1,close_idle_time=1,close_scan_interval=1)," "log=(enabled),cache_size=1GB, eviction_dirty_trigger=%i, " "eviction_dirty_target=%i,%s%s%s%s", progname, fast_eviction ? 5 : 20, fast_eviction ? 1 : 5, timing_stress_config, @@ -310,8 +301,7 @@ wt_connect(const char *config_open) config_open == NULL ? "" : config_open)); else testutil_check(__wt_snprintf(config, sizeof(config), - "create,cache_cursors=false,statistics=(fast),statistics_log=(json,wait=1),log=(" - "enabled)," + "create,cache_cursors=false,statistics=(fast),statistics_log=(json,wait=1),log=(enabled)," "error_prefix=\"%s\",cache_size=1G, eviction_dirty_trigger=%i, " "eviction_dirty_target=%i,%s%s%s%s", progname, fast_eviction ? 5 : 20, fast_eviction ? 1 : 5, @@ -599,8 +589,6 @@ usage(void) "\t\t3: hs_checkpoint_timing_stress\n" "\t\t4: reserved_txnid_timing_stress\n" "\t\t5: checkpoint_slow_timing_stress\n" - "\t\t6: evict_reposition_timing_stress\n" - "\t\t7: failpoint_eviction_fail_after_reconciliation\n" "\t-T specify a table configuration\n" "\t-t set a file type ( col | mix | row | lsm )\n" "\t-v verify only\n" diff --git a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.h b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.h index ece2be67b1e..1d8bd72ab0c 100644 --- a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.h +++ b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.h @@ -55,35 +55,33 @@ typedef struct { } COOKIE; typedef struct { - char *home; /* Home directory */ - const char *checkpoint_name; /* Checkpoint name */ - WT_CONNECTION *conn; /* WiredTiger connection */ - bool debug_mode; /* History store stress test */ - u_int nkeys; /* Keys to load */ - u_int nops; /* Operations per thread */ - FILE *logfp; /* Message log file. */ - int nworkers; /* Number workers configured */ - int ntables; /* Number tables configured */ - int ntables_created; /* Number tables opened */ - volatile int running; /* Whether to stop */ - int status; /* Exit status */ - bool sweep_stress; /* Sweep stress test */ - bool failpoint_hs_delete_key_from_ts; /* Failpoint for hs key deletion. */ - bool hs_checkpoint_timing_stress; /* History store checkpoint timing stress */ - bool reserved_txnid_timing_stress; /* Reserved transaction id timing stress */ - bool checkpoint_slow_timing_stress; /* Checkpoint slow timing stress */ - uint64_t ts_oldest; /* Current oldest timestamp */ - uint64_t ts_stable; /* Current stable timestamp */ - bool failpoint_eviction_fail_after_reconciliation; /*Fail point for eviction fail after - reconciliation. */ - bool mixed_mode_deletes; /* Run with mixed mode deletes */ - bool use_timestamps; /* Use txn timestamps */ - bool race_timestamps; /* Async update to oldest timestamp */ - bool prepare; /* Use prepare transactions */ - COOKIE *cookies; /* Per-thread info */ - WT_RWLOCK clock_lock; /* Clock synchronization */ - wt_thread_t checkpoint_thread; /* Checkpoint thread */ - wt_thread_t clock_thread; /* Clock thread */ + char *home; /* Home directory */ + const char *checkpoint_name; /* Checkpoint name */ + WT_CONNECTION *conn; /* WiredTiger connection */ + bool debug_mode; /* History store stress test */ + u_int nkeys; /* Keys to load */ + u_int nops; /* Operations per thread */ + FILE *logfp; /* Message log file. */ + int nworkers; /* Number workers configured */ + int ntables; /* Number tables configured */ + int ntables_created; /* Number tables opened */ + volatile int running; /* Whether to stop */ + int status; /* Exit status */ + bool sweep_stress; /* Sweep stress test */ + bool failpoint_hs_delete_key_from_ts; /* Failpoint for hs key deletion. */ + bool hs_checkpoint_timing_stress; /* History store checkpoint timing stress */ + bool reserved_txnid_timing_stress; /* Reserved transaction id timing stress */ + bool checkpoint_slow_timing_stress; /* Checkpoint slow timing stress */ + uint64_t ts_oldest; /* Current oldest timestamp */ + uint64_t ts_stable; /* Current stable timestamp */ + bool mixed_mode_deletes; /* Run with mixed mode deletes */ + bool use_timestamps; /* Use txn timestamps */ + bool race_timestamps; /* Async update to oldest timestamp */ + bool prepare; /* Use prepare transactions */ + COOKIE *cookies; /* Per-thread info */ + WT_RWLOCK clock_lock; /* Clock synchronization */ + wt_thread_t checkpoint_thread; /* Checkpoint thread */ + wt_thread_t clock_thread; /* Clock thread */ } GLOBAL; extern GLOBAL g; diff --git a/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_stress.txt b/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_stress.txt index b859727d4d9..bce5248222a 100644 --- a/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_stress.txt +++ b/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_stress.txt @@ -34,13 +34,14 @@ runtime_monitor= ), stat_cache_size= ( - max=200, - runtime=false, + max=110, + runtime=true, ), # The data files compress to around 25MB per table at the end of a run so 250MB total. # +1.4GB for the history store. With an additional 150MB margin. stat_db_size= ( + max=1900000000, save=true, ), ), diff --git a/src/third_party/wiredtiger/test/cppsuite/configs/operations_test_stress.txt b/src/third_party/wiredtiger/test/cppsuite/configs/operations_test_stress.txt index e5c25561925..5085f9ebe17 100644 --- a/src/third_party/wiredtiger/test/cppsuite/configs/operations_test_stress.txt +++ b/src/third_party/wiredtiger/test/cppsuite/configs/operations_test_stress.txt @@ -11,6 +11,11 @@ runtime_monitor= ( stat_db_size= ( + #At the end of the run the data files are approximately 2.3MB each. Which is a total of: + #1.15GB, the history store isn't significant. Give the workload an extra 200MB of margin. + max=1350000000, + # FIXME-WT-8886 - This check has been disabled to remove noisy failures in evergreen and + # will be properly corrected in WT-8886. runtime=false, save=true, ) diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h index 1c4957e814b..0fce6bfeb45 100644 --- a/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h +++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h @@ -43,7 +43,7 @@ class thread_manager { */ template <typename Callable, typename... Args> void - add_thread(Callable &&fct, Args &&...args) + add_thread(Callable &&fct, Args &&... args) { std::thread *t = new std::thread(fct, std::forward<Args>(args)...); _workers.push_back(t); diff --git a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c index f4d6cc21afb..3f93ec25a02 100644 --- a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c @@ -57,7 +57,7 @@ static char home[1024]; /* Program working dir */ #define INVALID_KEY UINT64_MAX #define MAX_CKPT_INVL 2 /* Maximum interval between checkpoints */ /* Set large, some slow I/O systems take tens of seconds to fsync. */ -#define MAX_STARTUP 60 /* Seconds to start up and set stable */ +#define MAX_STARTUP 30 /* Seconds to start up and set stable */ #define MAX_TH 12 #define MAX_TIME 40 #define MAX_VAL 1024 @@ -635,10 +635,6 @@ thread_run(void *arg) printf("Thread %" PRIu32 " starts at %" PRIu64 "\n", td->info, td->start); stable_ts = 0; for (i = td->start;; ++i) { - /* Give other threads a chance to run and move their timestamps forward. */ - if (use_ts && !stable_set && (i + 1) % 100 == 0) - __wt_sleep(2, 0); - /* * Allow some threads to skip schema operations so that they are generating sufficient dirty * data. diff --git a/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c b/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c index fe48721b789..1095077aab9 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c @@ -56,8 +56,7 @@ main(int argc, char *argv[]) size_t len; uint32_t hw, sw; uint8_t *data; - uint8_t data_ff[32]; - u_int i, j, length, misalignment; + u_int i, j; opts = &_opts; memset(opts, 0, sizeof(*opts)); @@ -70,7 +69,6 @@ main(int argc, char *argv[]) /* Allocate aligned memory for the data. */ data = dcalloc(DATASIZE, sizeof(uint8_t)); - memset(data_ff, 0xff, sizeof(data_ff)); /* * Some simple known checksums. @@ -132,7 +130,7 @@ main(int argc, char *argv[]) check(hw, sw, len, "random power-of-two"); len *= 2; - if (len > DATASIZE || len == 0) + if (len > DATASIZE) len = 512; } @@ -140,9 +138,7 @@ main(int argc, char *argv[]) * Checksums of random data chunks. */ for (i = 0; i < 1000; ++i) { - do { - len = __wt_random(&rnd) % DATASIZE; - } while (len == 0); + len = __wt_random(&rnd) % DATASIZE; for (j = 0; j < len; ++j) data[j] = __wt_random(&rnd) & 0xff; hw = __wt_checksum(data, len); @@ -150,17 +146,6 @@ main(int argc, char *argv[]) check(hw, sw, len, "random"); } - /* - * "Strobed" misalignments - test every combo of size/misalignment up to 16B. - */ - for (length = 0; length < 16; length++) { - for (misalignment = 0; misalignment < 16; misalignment++) { - hw = __wt_checksum(&data_ff[misalignment], length); - sw = __wt_checksum_sw(&data_ff[misalignment], length); - check(hw, sw, length, "0xff: strobed"); - } - } - free(data); testutil_cleanup(opts); return (EXIT_SUCCESS); diff --git a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c index 2fc64a0547c..b055edf8fbb 100644 --- a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c @@ -30,7 +30,6 @@ #include <signal.h> #define TIMEOUT 1 -#define MAX_RETRIES 5 #define NUM_RECORDS 800000 @@ -335,13 +334,11 @@ static void large_updates(WT_SESSION *session, const char *uri, char *value, int commit_ts) { WT_CURSOR *cursor; - WT_DECL_RET; WT_RAND_STATE rnd; uint64_t val; - int i, retry_attempts; + int i; char tscfg[64]; - retry_attempts = 0; __wt_random_init_seed((WT_SESSION_IMPL *)session, &rnd); testutil_check(session->open_cursor(session, uri, NULL, NULL, &cursor)); @@ -351,17 +348,7 @@ large_updates(WT_SESSION *session, const char *uri, char *value, int commit_ts) cursor->set_key(cursor, i + 1); val = (uint64_t)__wt_random(&rnd); cursor->set_value(cursor, val, val, val, value); - while (((ret = cursor->insert(cursor)) == WT_ROLLBACK) && retry_attempts < MAX_RETRIES) { - printf("Rollback transaction for key %d\n", i + 1); - testutil_check(session->rollback_transaction(session, NULL)); - testutil_check(session->begin_transaction(session, NULL)); - ++retry_attempts; - } - - if (retry_attempts == MAX_RETRIES) - testutil_die(ret, "Cursor insert returned WT_ROLLBACK for %d times", MAX_RETRIES); - - testutil_check(ret); + testutil_check(cursor->insert(cursor)); testutil_check(session->commit_transaction(session, tscfg)); } diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml index fcfcfa2430a..1eb0ac2ae5e 100755 --- a/src/third_party/wiredtiger/test/evergreen.yml +++ b/src/third_party/wiredtiger/test/evergreen.yml @@ -11,8 +11,7 @@ stepback: true pre: - func: "cleanup" post: - - func: "dump stacktraces" - - func: "upload stacktraces" + - func: "print python stacktrace" - func: "dump stderr/stdout" - func: "upload artifact" vars: @@ -108,40 +107,11 @@ functions: set -o errexit set -o verbose - MACOS_PYTHON_FLAGS= - if [ "${build_variant|}" = "macos-1014" ]; then - # For mac builds, we want explicitly tell cmake which python to use, as - # well as the matching library directory and header files. The find_libpython - # module gives us the library. - SYSPY=${python_binary} - $SYSPY -mvenv venv - source venv/bin/activate - pip3 install find_libpython - SYSPYLIB=`find_libpython` - SYSPYINCDEF= - - # We have the shared library to link to, it may be named simply 'Python3' or 'Python'. - # If that's the case, use the associated dylib symlink found in an expected relative - # location. Also get the location of the header files. We'll give this all to cmake. - base=$(basename $SYSPYLIB) - if [ "$base" = 'Python3' -o "$base" = 'Python' ]; then - SYSPYDIR=$(dirname $SYSPYLIB) - NSYSPYLIB=$(ls $SYSPYDIR/lib/libpython*.dylib 2>/dev/null | head -1) - if [ -f "$NSYSPYLIB" ]; then - SYSPYLIB=$NSYSPYLIB - fi - if [ -d "$SYSPYDIR/Headers" ]; then - SYSPYINCDEF="-DPYTHON_INCLUDE_DIR=$SYSPYDIR/Headers" - fi - fi - MACOS_PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=$SYSPY -DPYTHON_LIBRARY=$SYSPYLIB $SYSPYINCDEF" - fi - if [ "$OS" = "Windows_NT" ]; then # Use the Windows powershell script to configure the CMake build. # We execute it in a powershell environment as its easier to detect and source the Visual Studio # toolchain in a native Windows environment. We can't easily execute the build in a cygwin environment. - ${configure_env_vars|} powershell.exe -NonInteractive '.\test\evergreen\build_windows.ps1' -configure 1 ${windows_configure_flags|} + powershell.exe -NonInteractive '.\test\evergreen\build_windows.ps1' -configure 1 ${windows_configure_flags|} else # Compiling with CMake. . test/evergreen/find_cmake.sh @@ -151,34 +121,8 @@ functions: if [ -d cmake_build ]; then rm -r cmake_build; fi mkdir -p cmake_build cd cmake_build - ${configure_env_vars|} $CMAKE \ - ${posix_configure_flags|-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v3_gcc.cmake -DCMAKE_C_FLAGS="-ggdb" -DHAVE_DIAGNOSTIC=1 -DENABLE_PYTHON=1 -DENABLE_ZLIB=1 -DENABLE_STATIC=1 -DENABLE_STRICT=1 -DCMAKE_INSTALL_PREFIX=$(pwd)/LOCAL_INSTALL} $MACOS_PYTHON_FLAGS -G "${cmake_generator|Ninja}" ./.. - fi - "python config check": - command: shell.exec - params: - working_dir: "wiredtiger/cmake_build" - shell: bash - script: | - set -o errexit - set -o verbose - # Note: ${var} is used for expansions of evergreen variables, whereas $var are /bin/sh variables. - python_configured=$(grep PYTHON_EXECUTABLE: ./CMakeCache.txt | sed -e 's/.*=//') - if [ "${python_binary}" = '' -o "$python_configured" = '' -o "$(${python_binary} -V -V)" != "$($python_configured -V -V)" ]; then - echo "Python versions do not match." - echo "Python version used by cmake builds ($python_configured):" - if [ "$python_configured" = '' ]; then - echo "No python configured" - else - $python_configured -V -V - fi - echo "Python version used in shell commands (${python_binary}):" - if [ "${python_binary}" = '' ]; then - echo "No python set in Expansions" - else - ${python_binary} -V -V - fi - exit 1 + $CMAKE \ + ${posix_configure_flags|-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v3_gcc.cmake -DCMAKE_C_FLAGS="-ggdb" -DHAVE_DIAGNOSTIC=1 -DENABLE_PYTHON=1 -DENABLE_ZLIB=1 -DENABLE_STATIC=1 -DENABLE_STRICT=1 -DCMAKE_INSTALL_PREFIX=$(pwd)/LOCAL_INSTALL} -G "${cmake_generator|Ninja}" ./.. fi "make wiredtiger": &make_wiredtiger command: shell.exec @@ -194,7 +138,7 @@ functions: else # Compiling with CMake generated Ninja file. cd cmake_build - ${compile_env_vars|} ${make_command|ninja} ${smp_command|} 2>&1 + ${make_command|ninja} ${smp_command|} 2>&1 fi "compile wiredtiger": - *configure_wiredtiger @@ -300,25 +244,6 @@ functions: # Save generated documentation mv docs docs-$branch done - "dump stacktraces": &dump_stacktraces - command: shell.exec - params: - working_dir: "wiredtiger/cmake_build" - script: | - set -o errexit - set -o verbose - ${python_binary|python3} ../test/evergreen/print_stack_trace.py - "upload stacktraces": &upload_stacktraces - command: s3.put - params: - aws_secret: ${aws_secret} - aws_key: ${aws_key} - local_files_include_filter: - - wiredtiger/cmake_build/*stacktrace.txt - bucket: build_external - permissions: public-read - content_type: text/plain - remote_file: wiredtiger/${build_variant}/${revision}/artifacts/${task_name}_${build_id}/ "update wiredtiger docs": - command: shell.exec @@ -443,15 +368,8 @@ functions: script: | set -o errexit set -o verbose - # Fail, show the configuration file. - fail() { - echo "======= FAILURE ==========" - [ -f RUNDIR/CONFIG ] && cat RUNDIR/CONFIG - exit 1 - } - for i in $(seq ${times|1}); do - ./t -c ${config|../../../test/format/CONFIG.stress} ${extra_args|} || fail + ./t -c ${config|../../../test/format/CONFIG.stress} ${extra_args|} || ( [ -f RUNDIR/CONFIG ] && cat RUNDIR/CONFIG ) 2>&1 done "format test script": command: shell.exec @@ -564,7 +482,7 @@ functions: wt_hang_analyzer_option="-c -o file -o stdout" echo "Calling the wt hang analyzer ..." - PATH="/opt/mongodbtoolchain/v4/bin:$PATH" ${python_binary|python3} ../test/wt_hang_analyzer/wt_hang_analyzer.py $wt_hang_analyzer_option + PATH="/opt/mongodbtoolchain/gdb/bin:$PATH" ${python_binary|python3} ../test/wt_hang_analyzer/wt_hang_analyzer.py $wt_hang_analyzer_option "save wt hang analyzer core/debugger files": - command: archive.targz_pack @@ -586,6 +504,17 @@ functions: display_name: WT Hang Analyzer Output - Execution ${execution} remote_file: wiredtiger/${build_variant}/${revision}/wt_hang_analyzer/wt-hang-analyzer_${task_name}_${build_id}${postfix|}.tgz + "print python stacktrace": + command: shell.exec + params: + working_dir: "wiredtiger/cmake_build" + script: | + set -o errexit + set -o verbose + if [ -d "WT_TEST" ]; then + ${python_binary|python3} ../test/evergreen/print_python_stack_trace.py -e ${python_binary|python3} -c WT_TEST -l . + fi + "dump stderr/stdout": command: shell.exec params: @@ -753,22 +682,6 @@ variables: vars: format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 360 - - &format-stress-sanitizer-ppc-test - exec_timeout_secs: 25200 - commands: - - func: "get project" - - func: "compile wiredtiger" - vars: - posix_configure_flags: -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v4_clang.cmake -DCMAKE_BUILD_TYPE=ASan -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 - - func: "format test script" - vars: - # Always disable mmap for PPC due to issues on variant setup. - # See https://bugzilla.redhat.com/show_bug.cgi?id=1686261#c10 for the potential cause. - format_test_script_args: -t 360 -- -C "mmap=false,mmap_all=false" - test_env_vars: - ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1" - ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer - - &format-stress-sanitizer-test exec_timeout_secs: 25200 commands: @@ -811,7 +724,7 @@ variables: ####################################### tasks: - # Check the python configuration + # Base compile task on posix flavours - name: compile tags: ["pull_request"] @@ -884,12 +797,12 @@ tasks: - func: "get project" - func: "compile wiredtiger" vars: - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH posix_configure_flags: -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DENABLE_STRICT=1 -DHAVE_DIAGNOSTIC=0 - func: "compile wiredtiger" vars: + posix_configure_flags: -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DCLANG_C_VERSION=6.0 -DCLANG_CXX_VERSION=6.0 -DCMAKE_C_FLAGS="-ggdb" -DWITH_PIC=1 + - func: "compile wiredtiger" + vars: posix_configure_flags: -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DCLANG_C_VERSION=7 -DCLANG_CXX_VERSION=7 -DCMAKE_C_FLAGS="-ggdb" -DWITH_PIC=1 - func: "compile wiredtiger" vars: @@ -1658,17 +1571,6 @@ tasks: - func: "fetch artifacts" - func: "unit test" - - name: unit-test-macos - tags: ["python"] - depends_on: - - name: compile - commands: - - func: "fetch artifacts" - - func: "python config check" - - func: "unit test" - vars: - smp_command: -j $(echo $(sysctl -n hw.logicalcpu) / 2 | bc) - - name: unit-test-zstd tags: ["python"] depends_on: @@ -2034,8 +1936,7 @@ tasks: script: | set -o errexit set -o verbose - # FIXME-WT-12144 Turn off noisy test failures until s_clang_scan is fixed. - # sh dist/s_clang_scan 2>&1 + sh dist/s_clang-scan 2>&1 - name: configure-combinations commands: @@ -2280,11 +2181,10 @@ tasks: vars: posix_configure_flags: -DENABLE_PYTHON=1 -DSPINLOCK_TYPE=gcc -DENABLE_STRICT=1 - func: "make check all" - - func: "unit test" - func: "format test" vars: times: 3 - extra_args: runs.rows=1000000:2500000 + - func: "unit test" - name: spinlock-pthread-adaptive-test commands: @@ -2293,11 +2193,10 @@ tasks: vars: posix_configure_flags: -DENABLE_PYTHON=1 -DSPINLOCK_TYPE=pthread_adaptive -DENABLE_STRICT=1 - func: "make check all" - - func: "unit test" - func: "format test" vars: times: 3 - extra_args: runs.rows=1000000:2500000 + - func: "unit test" - name: wtperf-test depends_on: @@ -2639,20 +2538,6 @@ tasks: set -o errexit set -o verbose ${test_env_vars|} ../../../tools/run_parallel.sh 'nice ./recovery-test.sh "${data_validation_stress_test_args} -s 5" WT_TEST.$t test_checkpoint' 120 - - - name: data-validation-stress-test-checkpoint-fp-hs-insert-s7 - depends_on: - - name: compile - commands: - - func: "fetch artifacts" - - command: shell.exec - params: - working_dir: "wiredtiger/cmake_build/test/checkpoint" - shell: bash - script: | - set -o errexit - set -o verbose - ${test_env_vars|} ../../../tools/run_parallel.sh 'nice ./recovery-test.sh "${data_validation_stress_test_args} -s 7" WT_TEST.$t test_checkpoint' 120 - name: format-failure-configs-test depends_on: @@ -2700,7 +2585,7 @@ tasks: - name: format-stress-sanitizer-lsm-test # FIXME-WT-6258: Re-enable the test once the outstanding issues with LSM are resolved. - # tags: ["stress-test"] + # tags: ["stress-test-1"] commands: - func: "get project" - func: "compile wiredtiger address sanitizer" @@ -2745,8 +2630,9 @@ tasks: set -o verbose for i in {1..10}; do ${test_env_vars|} ${python_binary|python3} split_stress.py; done - - name: format-stress-zseries-test - tags: ["stress-test-zseries-1"] + # The task name is ppc-zseries because this task will be used in both buildVariants + - name: format-stress-ppc-zseries-test + tags: ["stress-test-ppc-1", "stress-test-zseries-1"] # Set 2.5 hours timeout (60 * 60 * 2.5) exec_timeout_secs: 9000 commands: @@ -2757,22 +2643,6 @@ tasks: #run for 2 hours ( 2 * 60 = 120 minutes), use default config format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 120 - - name: format-stress-ppc-test - tags: ["stress-test-ppc-1"] - # Set 2.5 hours timeout (60 * 60 * 2.5) - exec_timeout_secs: 9000 - commands: - - func: "get project" - - func: "compile wiredtiger" - vars: - posix_configure_flags: -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v3_gcc.cmake -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 - - func: "format test script" - vars: - #run for 2 hours ( 2 * 60 = 120 minutes), use default config - # Always disable mmap for PPC due to issues on variant setup. - # See https://bugzilla.redhat.com/show_bug.cgi?id=1686261#c10 for the potential cause. - format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 120 -- -C "mmap=false,mmap_all=false" - - <<: *format-stress-test name: format-stress-test-1 tags: ["stress-test-1"] @@ -2785,36 +2655,30 @@ tasks: - <<: *format-stress-test name: format-stress-test-4 tags: ["stress-test-4"] - - <<: *format-stress-sanitizer-ppc-test - name: format-stress-sanitizer-ppc-test-1 - tags: ["stress-test-ppc-1"] - - <<: *format-stress-sanitizer-ppc-test - name: format-stress-sanitizer-ppc-test-2 - tags: ["stress-test-ppc-2"] - <<: *format-stress-sanitizer-test name: format-stress-sanitizer-test-1 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-1", "stress-test-ppc-1"] - <<: *format-stress-sanitizer-test name: format-stress-sanitizer-test-2 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-2", "stress-test-ppc-2"] - <<: *format-stress-sanitizer-test name: format-stress-sanitizer-test-3 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-3"] - <<: *format-stress-sanitizer-test name: format-stress-sanitizer-test-4 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-4"] - <<: *race-condition-stress-sanitizer-test name: race-condition-stress-sanitizer-test-1 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-1"] - <<: *race-condition-stress-sanitizer-test name: race-condition-stress-sanitizer-test-2 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-2"] - <<: *race-condition-stress-sanitizer-test name: race-condition-stress-sanitizer-test-3 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-3"] - <<: *race-condition-stress-sanitizer-test name: race-condition-stress-sanitizer-test-4 - tags: ["stress-test-sanitizer"] + tags: ["stress-test-4"] - <<: *recovery-stress-test name: recovery-stress-test-1 tags: ["stress-test-1", "stress-test-zseries-1"] @@ -2838,7 +2702,7 @@ tasks: format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 360 - name: format-stress-sanitizer-test-no-barrier - tags: ["stress-test-sanitizer"] + tags: ["stress-test-no-barrier"] exec_timeout_secs: 25200 commands: - func: "get project" @@ -2853,7 +2717,7 @@ tasks: ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer - name: race-condition-stress-sanitizer-test-no-barrier - tags: ["stress-test-sanitizer"] + tags: ["stress-test-no-barrier"] exec_timeout_secs: 25200 commands: - func: "get project" @@ -2909,22 +2773,29 @@ tasks: params: working_dir: mongo-tests/largescale shell: bash - include_expansions_in_env: - - atlas_wt_perf_test_user - - atlas_wt_perf_pass script: | set -o errexit set -o verbose export "PATH=/opt/mongodbtoolchain/v3/bin:$PATH" virtualenv -p python3 venv source venv/bin/activate - # Need both pymongo and pymongo[srv] as upload-results-atlas.py uses mongo+srv for the URI. - pip3 install lorem pymongo==3.12.2 "pymongo[srv]==3.12.2" + pip3 install lorem pymongo==3.12.2 mongod_path=$(find ../../mongo/build -executable -type f -path \*/bin/mongod) ./run_many_coll.sh $mongod_path mongodb.log config/many-collection-testing many-collection clean-and-populate - # upload the results + + - command: shell.exec + params: + working_dir: mongo-tests/largescale + shell: bash + silent: true + script: | + set -o errexit + set -o verbose + virtualenv -p python3 venv + source venv/bin/activate + pip3 install "pymongo[srv]==3.12.2" res_dir=`find ./ -type d -name "many-collection-artifacts" -print` - ./upload-results-atlas.py wt-perf-tests many-collection-test ${branch_name} $res_dir/results/results.json + ./upload-results-atlas.py ${atlas_wt_perf_test_user} ${atlas_wt_perf_pass} wt-perf-tests many-collection-test ${branch_name} $res_dir/results/results.json - name: cyclomatic-complexity commands: @@ -3124,21 +2995,6 @@ tasks: - func: "upload-perf-test-stats" vars: perf-test-name: parallel-pop-btree.wtperf - - - name: perf-test-parallel-pop-btree-long - tags: ["btree-perf"] - depends_on: - - name: compile - commands: - - func: "fetch artifacts" - - func: "run-perf-test" - vars: - perf-test-name: parallel-pop-btree-long.wtperf - maxruns: 1 - wtarg: -ops ['"load"'] - - func: "upload-perf-test-stats" - vars: - perf-test-name: parallel-pop-btree-long.wtperf - name: perf-test-update-only-btree tags: ["btree-perf"] @@ -3819,10 +3675,7 @@ buildvariants: run_on: - ubuntu2004-test expansions: - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib @@ -3833,7 +3686,6 @@ buildvariants: -DHAVE_DIAGNOSTIC=1 -DENABLE_PYTHON=1 -DENABLE_ZLIB=1 - -DENABLE_ZSTD=1 -DENABLE_SNAPPY=1 -DENABLE_STRICT=1 -DENABLE_TCMALLOC=1 @@ -3875,7 +3727,6 @@ buildvariants: - name: data-validation-stress-test-checkpoint-fp-hs-insert-s4 - name: data-validation-stress-test-checkpoint-fp-hs-insert-s5 - name: data-validation-stress-test-checkpoint-fp-hs-insert-s5-no-timestamp - - name: data-validation-stress-test-checkpoint-fp-hs-insert-s7 - name: data-validation-stress-test-checkpoint-no-timestamp - name: unittest-test - name: tiered-storage-extensions-test @@ -3898,10 +3749,7 @@ buildvariants: -DCMAKE_CXX_FLAGS="-ggdb" smp_command: -j $(grep -c ^processor /proc/cpuinfo) make_command: ninja - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1" @@ -3909,6 +3757,7 @@ buildvariants: ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer TESTUTIL_BYPASS_ASAN=1 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib tasks: - name: ".pull_request !.pull_request_compilers !.python" @@ -3931,13 +3780,11 @@ buildvariants: -DCMAKE_C_FLAGS="-ggdb" smp_command: -j $(grep -c ^processor /proc/cpuinfo) make_command: ninja - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH MSAN_OPTIONS="abort_on_error=1:disable_coredump=0:print_stacktrace=1" MSAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR @@ -3972,12 +3819,10 @@ buildvariants: -DCMAKE_CXX_FLAGS="-ggdb" smp_command: -j $(grep -c ^processor /proc/cpuinfo) make_command: ninja - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH UBSAN_OPTIONS="detect_leaks=1:disable_coredump=0:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer:abort_on_error=1:print_stacktrace=1" LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib @@ -4020,15 +3865,13 @@ buildvariants: - name: ubuntu2004-stress-tests display_name: Ubuntu 20.04 Stress tests run_on: - - ubuntu2004-small + - ubuntu2004-test expansions: smp_command: -j $(grep -c ^processor /proc/cpuinfo) make_command: ninja - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib @@ -4049,9 +3892,6 @@ buildvariants: - name: ".stress-test-3" - name: ".stress-test-4" - name: ".stress-test-no-barrier" - - name: ".stress-test-sanitizer" - run_on: - - ubuntu2004-medium - name: format-abort-recovery-stress-test - name: ubuntu2004-stress-tests-arm64 @@ -4065,11 +3905,9 @@ buildvariants: expansions: smp_command: -j $(echo "`grep -c ^processor /proc/cpuinfo` / 2" | bc) make_command: ninja - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib @@ -4095,16 +3933,107 @@ buildvariants: - name: ".stress-test-no-barrier" - name: format-abort-recovery-stress-test +- name: ubuntu2004-perf-tests + display_name: Ubuntu 20.04 Performance tests + # Perf tests are NOT expected to be triggered on Evergreen projects + # other than "WiredTiger (develop)". + activate: false + batchtime: 1440 # 1 day + run_on: + - ubuntu2004-medium + expansions: + test_env_vars: + WT_TOPDIR=$(git rev-parse --show-toplevel) + WT_BUILDDIR=$WT_TOPDIR/cmake_build + LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_BUILDDIR/test/utility/ + posix_configure_flags: + -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v3_gcc.cmake + -DCMAKE_C_FLAGS="-ggdb" + -DHAVE_DIAGNOSTIC=1 + -DENABLE_PYTHON=1 + -DENABLE_ZLIB=1 + -DENABLE_SNAPPY=1 + -DENABLE_STRICT=1 + -DCMAKE_INSTALL_PREFIX=$(pwd)/LOCAL_INSTALL + python_binary: '/opt/mongodbtoolchain/v3/bin/python3' + pip3_binary: '/opt/mongodbtoolchain/v3/bin/pip3' + virtualenv_binary: '/opt/mongodbtoolchain/v3/bin/virtualenv' + smp_command: -j $(echo "`grep -c ^processor /proc/cpuinfo` * 2" | bc) + cmake_generator: Ninja + make_command: ninja + tasks: + - name: compile + - name: ".btree-perf" + # Disable LSM perf tests till the support for LSM is restored. + # - name: ".lsm-perf" + - name: ".stress-perf" + - name: ".checkpoint-perf" + - name: ".evict-perf" + - name: ".log-perf" + - name: ".long-perf" + - name: many-dhandle-stress + - name: ".wt2853-perf" + display_tasks: + - name: Wiredtiger-perf-btree-jobs + execution_tasks: + - ".btree-perf" + # Disable LSM perf tests till the support for LSM is restored. + # - name: Wiredtiger-perf-lsm-jobs + # execution_tasks: + # - ".lsm-perf" + - name: Wiredtiger-perf-stress-jobs + execution_tasks: + - ".stress-perf" + - name: Wiredtiger-perf-checkpoint-jobs + execution_tasks: + - ".checkpoint-perf" + - name: Wiredtiger-perf-evict-jobs + execution_tasks: + - ".evict-perf" + - name: Wiredtiger-perf-log-jobs + execution_tasks: + - ".log-perf" + - name: Wiredtiger-perf-long-jobs + execution_tasks: + - ".long-perf" + - name: WiredTiger-wt2853-perf + execution_tasks: + - ".wt2853-perf" + +- name: large-scale-tests + display_name: "Large scale tests" + batchtime: 480 # 3 times a day + run_on: + - ubuntu2004-test + expansions: + make_command: ninja + cmake_generator: Ninja + posix_configure_flags: + -DENABLE_PYTHON=1 + -DENABLE_ZLIB=1 + -DENABLE_SNAPPY=1 + -DENABLE_STRICT=1 + -DENABLE_STATIC=1 + -DENABLE_TCMALLOC=1 + -DCMAKE_PREFIX_PATH="$(pwd)/../TCMALLOC_LIB" + test_env_vars: + PATH=/opt/mongodbtoolchain/v3/bin:$PATH + WT_TOPDIR=$(git rev-parse --show-toplevel) + WT_BUILDDIR=$WT_TOPDIR/cmake_build + LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib + upload_source_dir: mongo-tests/largescale/many-collection-artifacts + upload_filename: many-collection.tgz + tasks: + - name: many-collection-test + distros: ubuntu2004-wt-large + - name: cppsuite-stress-tests display_name: "Cppsuite Stress Tests" batchtime: 480 # 3 times a day run_on: - - ubuntu2004-medium + - ubuntu2004-test expansions: - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib @@ -4136,17 +4065,28 @@ buildvariants: tasks: - name: package +- name: documentation-update + display_name: "~ Documentation update" + # Documentation update is NOT expected to be triggered on Evergreen projects + # other than "WiredTiger (develop)" + activate: false + batchtime: 10080 # 7 days + run_on: + - ubuntu2004-test + expansions: + doc_update_branches: develop,mongodb-5.0,mongodb-4.4,mongodb-4.2,mongodb-4.0 + tasks: + - name: doc-update + - name: linux-no-ftruncate display_name: Linux no ftruncate batchtime: 1440 # 1 day run_on: - ubuntu2004-test expansions: - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib @@ -4165,11 +4105,9 @@ buildvariants: run_on: - rhel80-test expansions: - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_PRELOAD=/usr/local/lib/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib @@ -4198,18 +4136,72 @@ buildvariants: - name: long-test - name: configure-combinations +- name: code-statistics + display_name: "Code statistics" + # Code coverage and complexity metrics are NOT expected to be triggered on Evergreen projects + # other than "WiredTiger (develop)". + activate: false + batchtime: 10080 # 7 days + run_on: + - ubuntu2004-test + expansions: + test_env_vars: + LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so + PATH=/opt/mongodbtoolchain/v3/bin:$PATH + WT_TOPDIR=$(git rev-parse --show-toplevel) + WT_BUILDDIR=$WT_TOPDIR/cmake_build + LD_LIBRARY_PATH=$WT_BUILDDIR:$WT_TOPDIR/TCMALLOC_LIB/lib + make_command: ninja + cmake_generator: Ninja + tasks: + - name: coverage-report + - name: cyclomatic-complexity + +- name: compatibility-tests-less-frequent + display_name: Compatibility tests (less frequent) + # Compatibility tests are NOT expected to be triggered on Evergreen projects + # other than "WiredTiger (develop)". + activate: false + batchtime: 10080 # 7 days + run_on: + - ubuntu1804-test + tasks: + - name: compatibility-test-for-older-releases + - name: compatibility-test-for-wt-standalone-releases + +- name: compatibility-tests-daily + display_name: Compatibility tests (daily) + # Compatibility tests are NOT expected to be triggered on Evergreen projects + # other than "WiredTiger (develop)". + activate: false + batchtime: 1440 # 1 day + run_on: + - ubuntu2004-test + tasks: + - name: compatibility-test-upgrade-to-latest + +- name: compatibility-tests + display_name: Compatibility tests + # Compatibility tests are NOT expected to be triggered on Evergreen projects + # other than "WiredTiger (develop)". + activate: false + run_on: + - ubuntu2004-test + tasks: + - name: compatibility-test-for-newer-releases + - name: compatibility-test-for-patch-releases + - name: import-compatibility-test + - name: windows-64 display_name: "! Windows 64-bit" run_on: - windows-64-vs2017-test expansions: - python_binary: '/cygdrive/c/python/Python311/python' - configure_env_vars: PATH=/cygdrive/c/python/Python311:/cygdrive/c/python/Python311/Scripts:$PATH - compile_env_vars: PATH=/cygdrive/c/python/Python311:/cygdrive/c/python/Python311/Scripts:$PATH + python_binary: '/cygdrive/c/Python39/python' test_env_vars: - PATH=/cygdrive/c/python/Python311:/cygdrive/c/python/Python311/Scripts:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build + PATH=/cygdrive/c/Python39:/cygdrive/c/Python39/Scripts:$PATH PYTHONPATH=($WT_TOPDIR/lang/python/wiredtiger):$(cygpath -w $WT_TOPDIR/lang/python) windows_configure_flags: -vcvars_bat "'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat'" tasks: @@ -4227,25 +4219,21 @@ buildvariants: posix_configure_flags: -DCMAKE_C_FLAGS="-ggdb" -DHAVE_DIAGNOSTIC=1 - -DCC_OPTIMIZE_LEVEL=-O0 -DENABLE_PYTHON=1 -DENABLE_ZLIB=1 -DENABLE_STRICT=1 -DCMAKE_INSTALL_PREFIX=$(pwd)/LOCAL_INSTALL - python_binary: '/opt/mongodbtoolchain/v3/bin/python3' + python_binary: 'python3' smp_command: -j $(sysctl -n hw.logicalcpu) cmake_generator: "Unix Makefiles" make_command: make - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_BUILDDIR=$(git rev-parse --show-toplevel)/cmake_build DYLD_LIBRARY_PATH=$WT_BUILDDIR tasks: - name: compile - name: make-check-test - - name: unit-test-macos + - name: unit-test - name: fops - name: little-endian @@ -4256,8 +4244,6 @@ buildvariants: expansions: python_binary: '/opt/mongodbtoolchain/v3/bin/python3' smp_command: -j $(grep -c ^processor /proc/cpuinfo) - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) @@ -4273,14 +4259,14 @@ buildvariants: - name: big-endian display_name: "~ Big-endian (s390x/zSeries)" + modules: + - enterprise run_on: - ubuntu1804-zseries-build batchtime: 4320 # 3 days expansions: python_binary: '/opt/mongodbtoolchain/v3/bin/python3' smp_command: -j $(grep -c ^processor /proc/cpuinfo) - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) @@ -4296,15 +4282,14 @@ buildvariants: - name: rhel8-ppc display_name: "~ RHEL8 PPC" + # FIXME-WT-8981 + activate: false run_on: - rhel81-power8-small batchtime: 120 # 2 hours expansions: format_test_setting: ulimit -c unlimited - configure_env_vars: PATH=/opt/mongodbtoolchain/v4/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v4/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v4/bin:$PATH WT_BUILDDIR=$(git rev-parse --show-toplevel)/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR posix_configure_flags: @@ -4317,8 +4302,8 @@ buildvariants: -DENABLE_STRICT=1 -DCMAKE_INSTALL_PREFIX=$(pwd)/LOCAL_INSTALL python_binary: '/opt/mongodbtoolchain/v4/bin/python3' - # Use quarter of the vCPUs to avoid OOM kill failure and disk issues on this variant. - smp_command: -j $(echo $(grep -c ^processor /proc/cpuinfo) / 4 | bc) + # Use half number of vCPU to avoid OOM kill failure + smp_command: -j $(echo $(grep -c ^processor /proc/cpuinfo) / 2 | bc) cmake_generator: Ninja make_command: ninja tasks: @@ -4336,10 +4321,7 @@ buildvariants: - rhel80-zseries-test batchtime: 120 # 2 hours expansions: - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_BUILDDIR=$(git rev-parse --show-toplevel)/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR posix_configure_flags: @@ -4370,10 +4352,7 @@ buildvariants: - ubuntu2004-arm64-small batchtime: 1440 # 24 hours expansions: - configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH - compile_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH test_env_vars: - PATH=/opt/mongodbtoolchain/v3/bin:$PATH WT_TOPDIR=$(git rev-parse --show-toplevel) WT_BUILDDIR=$WT_TOPDIR/cmake_build LD_LIBRARY_PATH=$WT_BUILDDIR @@ -4399,7 +4378,6 @@ buildvariants: - name: checkpoint-filetypes-test - name: unit-test-zstd - name: unit-test-long - distros: ubuntu2004-arm64-large - name: spinlock-gcc-test - name: spinlock-pthread-adaptive-test - name: compile-wtperf diff --git a/src/third_party/wiredtiger/test/evergreen/print_python_stack_trace.py b/src/third_party/wiredtiger/test/evergreen/print_python_stack_trace.py new file mode 100644 index 00000000000..4dd81654ac3 --- /dev/null +++ b/src/third_party/wiredtiger/test/evergreen/print_python_stack_trace.py @@ -0,0 +1,134 @@ +#!/usr/bin/env python3 +# +# Public Domain 2014-present MongoDB, Inc. +# Public Domain 2008-2014 WiredTiger, Inc. +# +# This is free and unencumbered software released into the public domain. +# +# Anyone is free to copy, modify, publish, use, compile, sell, or +# distribute this software, either in source code form or as a compiled +# binary, for any purpose, commercial or non-commercial, and by any +# means. +# +# In jurisdictions that recognize copyright laws, the author or authors +# of this software dedicate any and all copyright interest in the +# software to the public domain. We make this dedication for the benefit +# of the public at large and to the detriment of our heirs and +# successors. We intend this dedication to be an overt act of +# relinquishment in perpetuity of all present and future rights to this +# software under copyright law. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +import argparse +import itertools +import os +import re +import subprocess +import sys +from shutil import which + + +def border_msg(msg: str): + count = len(msg) + 2 + dash = "-" * count + return "+{dash}+\n| {msg} |\n+{dash}+".format(dash=dash, msg=msg) + + +class LLDBDumper: + """LLDBDumper class - prints stack traces on macOS""" + def __init__(self): + self.dbg = self._find_debugger("lldb") + + @staticmethod + def _find_debugger(debugger: str): + """Find the installed debugger.""" + return which(debugger) + + def dump(self, exe_path: str, core_path: str): + """Dump stack trace.""" + if self.dbg is None: + sys.exit("Debugger lldb not found," + "skipping dumping of {}".format(core_path)) + + cmds = [ + "thread backtrace all -c 30", + "quit" + ] + + subprocess.run([self.dbg, "--batch"] + [exe_path, "-c", core_path] + + list(itertools.chain.from_iterable([['-o', b] for b in cmds])), + check=True) + + +class GDBDumper: + """GDBDumper class - prints stack traces on Linux""" + def __init__(self): + self.dbg = self._find_debugger("gdb") + + @staticmethod + def _find_debugger(debugger: str): + """Find the installed debugger.""" + return which(debugger) + + def dump(self, exe_path: str, core_path: str, lib_path: str): + """Dump stack trace.""" + if self.dbg is None: + sys.exit("Debugger gdb not found," + "skipping dumping of {}".format(core_path)) + + cmds = [] + if lib_path: + cmds.append("set solib-search-path " + lib_path) + cmds.extend([ + "thread apply all backtrace 30", + "quit" + ]) + + subprocess.run([self.dbg, "--batch", "--quiet"] + + list(itertools.chain.from_iterable([['-ex', b] for b in cmds])) + + [exe_path, core_path], + check=True) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('-e', '--executable_path', + help='path to the executable', + required=True) + parser.add_argument('-c', '--core_path', + help='directory path to the core dumps', + required=True) + parser.add_argument('-l', '--lib_path', help='library path') + args = parser.parse_args() + + # Store the path of the core files as a list. + core_files = [] + regex = re.compile(r'.*dump.*python.*', re.IGNORECASE) + for root, _, files in os.walk(args.core_path): + for file in files: + if regex.match(file): + core_files.extend([os.path.join(root, file)]) + + for core_file_path in core_files: + print(border_msg(core_file_path), flush=True) + if sys.platform.startswith('linux'): + dbg = GDBDumper() + dbg.dump(args.executable_path, core_file_path, args.lib_path) + elif sys.platform.startswith('darwin'): + # FIXME - macOS to be supported in WT-8976 + # dbg = LLDBDumper() + # dbg.dump(args.executable_path, core_file_path) + pass + elif sys.platform.startswith('win32') or sys.platform.startswith('cygwin'): + # FIXME - Windows to be supported in WT-8937 + pass + +if __name__ == "__main__": + main() diff --git a/src/third_party/wiredtiger/test/evergreen/print_stack_trace.py b/src/third_party/wiredtiger/test/evergreen/print_stack_trace.py deleted file mode 100644 index 9de0a0c4aca..00000000000 --- a/src/third_party/wiredtiger/test/evergreen/print_stack_trace.py +++ /dev/null @@ -1,186 +0,0 @@ -#!/usr/bin/env python3 -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import argparse -import itertools -import os -import re -import subprocess -import sys -from shutil import which - - -def border_msg(msg: str): - count = len(msg) + 2 - dash = "-" * count - return "+{dash}+\n| {msg} |\n+{dash}+".format(dash=dash, msg=msg) - - -class LLDBDumper: - """LLDBDumper class - prints stack traces on macOS""" - def __init__(self): - self.dbg = self._find_debugger("lldb") - - @staticmethod - def _find_debugger(debugger: str): - """Find the installed debugger.""" - return which(debugger) - - def dump(self, exe_path: str, core_path: str, dump_all: bool, output_file: str): - """Dump stack trace.""" - if self.dbg is None: - sys.exit("Debugger lldb not found," - "skipping dumping of {}".format(core_path)) - - cmds = [] - if dump_all: - cmds.append("thread apply all backtrace -c 30") - else: - cmds.append("backtrace -c 30") - cmds.append("quit") - - output = None - if (output_file): - try: - output = open(output_file, "w") - except OSError as e : - raise e - subprocess.run([self.dbg, "--batch"] + [exe_path, "-c", core_path] + - list(itertools.chain.from_iterable([['-o', b] for b in cmds])), - check=True, stdout=output) - - -class GDBDumper: - """GDBDumper class - prints stack traces on Linux""" - def __init__(self): - self.dbg = self._find_debugger("gdb") - - @staticmethod - def _find_debugger(debugger: str): - """Find the installed debugger.""" - return which(debugger) - - def dump(self, exe_path: str, core_path: str, lib_path: str, dump_all: bool, output_file: str): - """Dump stack trace.""" - if self.dbg is None: - sys.exit("Debugger gdb not found," - "skipping dumping of {}".format(core_path)) - - cmds = [] - if lib_path: - cmds.append("set solib-search-path " + lib_path) - - if dump_all: - cmds.append("thread apply all backtrace 30") - else: - cmds.append("backtrace 30") - cmds.append("quit") - - output = None - if (output_file): - try: - output = open(output_file, "w") - except OSError as e : - raise e - subprocess.run([self.dbg, "--batch", "--quiet"] + - list(itertools.chain.from_iterable([['-ex', b] for b in cmds])) + - [exe_path, core_path], - check=True, stdout=output) - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('-c', '--core_path', - help='directory path to the core dumps') - parser.add_argument('-l', '--lib_path', help='library path') - args = parser.parse_args() - - # If the lib_path is not provided then search the current dir. - lib_path = "." if args.lib_path is None else args.lib_path - - # If the core_path is not provided then search the current dir. - core_path = "." if args.core_path is None else args.core_path - - # Append the path of the core files present in the core path in a list. - core_files = [] - regex = re.compile(r'dump.*core', re.IGNORECASE) - for root, _, files in os.walk(core_path): - for file in files: - if regex.match(file): - core_files.append(os.path.join(root, file)) - - for core_file_path in core_files: - print(border_msg(core_file_path), flush=True) - - # Get the executable from the core file itself. - proc = subprocess.Popen(["file", core_file_path], stdout=subprocess.PIPE) - # The file command prints something similar to: - # WT_TEST/test_practice.0/dump_python3.16562.core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), - # SVR4-style, from 'python3 /home/ubuntu/wiredtiger/test/suite/run.py -j 1 -p test_practice', - # real uid: 1000, effective uid: 1000, real gid: 1000, effective gid: 1000, execfn: '/usr/bin/python3', platform: 'x86_64' - output = str(proc.communicate()) - - # The field of interest is execfn: '/usr/bin/python3' from the example above. - start = output.find('execfn: ') - if start < 0: - print("The 'execfn' is missing, skipping core...") - continue - # Fetch the value of execfn. This is the executable path! - executable_path = re.search(r'\'.*?\'', output[start:]).group(0) - executable_path = executable_path.replace("'", "") - - # If the core dump comes from a Python test, we don't need to construct the executable path. - if "python" not in executable_path.lower(): - # We may have the executable path already. If not, we need to find it. - if not os.access(executable_path, os.X_OK): - # The executable is where the core dump is. - dirname = core_file_path.rsplit('/', 1)[0] - executable_path = dirname + '/' + executable_path - - if sys.platform.startswith('linux'): - dbg = GDBDumper() - dbg.dump(executable_path, core_file_path, lib_path, False, None) - - # Extract the filename from the core file path, to create a stacktrace output file. - file_name, _ = os.path.splitext(os.path.basename(core_file_path)) - dbg.dump(executable_path, core_file_path, lib_path, True, file_name + ".stacktrace.txt") - elif sys.platform.startswith('darwin'): - # FIXME - macOS to be supported in WT-8976 - # dbg = LLDBDumper() - # dbg.dump(args.executable_path, core_file_path, False, None) - - # Extract the filename from the core file path, to create a stacktrace output file. - # file_name, _ = os.path.splitext(os.path.basename(core_file_path)) - # dbg.dump(executable_path, core_file_path, True, file_name + ".stacktrace.txt") - pass - elif sys.platform.startswith('win32') or sys.platform.startswith('cygwin'): - # FIXME - Windows to be supported in WT-8937 - pass - -if __name__ == "__main__": - main() diff --git a/src/third_party/wiredtiger/test/evergreen/run_format_configs.sh b/src/third_party/wiredtiger/test/evergreen/run_format_configs.sh index 99a2766c57d..a29fb30edab 100755 --- a/src/third_party/wiredtiger/test/evergreen/run_format_configs.sh +++ b/src/third_party/wiredtiger/test/evergreen/run_format_configs.sh @@ -26,7 +26,7 @@ failure=0 for config in $(find ../../../test/format/failure_configs/ -name "CONFIG.*" | sort) do echo -e "\nTesting CONFIG $config ...\n" - if (./t -1 -c $config); then + if (./t -c $config); then let "success++" else let "failure++" diff --git a/src/third_party/wiredtiger/test/format/config.c b/src/third_party/wiredtiger/test/format/config.c index 40f8053afb8..bbff4a1ab17 100644 --- a/src/third_party/wiredtiger/test/format/config.c +++ b/src/third_party/wiredtiger/test/format/config.c @@ -256,18 +256,8 @@ config_table(TABLE *table, void *arg) * direct I/O can be so slow the additional I/O for overflow items causes eviction to stall). */ if (GV(RUNS_IN_MEMORY) || GV(DISK_DIRECT_IO)) { - /* - * Always limit the row count if its greater that 1,000,000 and in memory wasn't explicitly - * set. Direct IO is always explicitly set, never limit the row count because the user has - * taken control. - */ - if (GV(RUNS_IN_MEMORY) && TV(RUNS_ROWS) > WT_MILLION && - config_explicit(NULL, "runs.in_memory")) { - WARN("limiting table%" PRIu32 - ".runs.rows to 1,000,000 as runs.in_memory has been automatically enabled", - table->id) + if (!config_explicit(table, "runs.rows") && TV(RUNS_ROWS) > 1000000) config_single(table, "runs.rows=1000000", false); - } if (!config_explicit(table, "btree.key_max")) config_single(table, "btree.key_max=32", false); if (!config_explicit(table, "btree.key_min")) @@ -856,15 +846,8 @@ config_in_memory(void) if (config_explicit(NULL, "ops.verify")) return; - if (!config_explicit(NULL, "runs.in_memory") && mmrand(NULL, 1, 20) == 1) { + if (!config_explicit(NULL, "runs.in_memory") && mmrand(NULL, 1, 20) == 1) config_single(NULL, "runs.in_memory=1", false); - /* Use table[0] to access the global value (RUNS_ROWS is a table value). */ - if ((tables[0]->v[V_TABLE_RUNS_ROWS].v) > WT_MILLION) { - WARN("%s", - "limiting runs.rows to 1,000,000 as runs.in_memory has been automatically enabled"); - config_single(NULL, "runs.rows=1000000", true); - } - } } /* diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h index bb80b82bc9d..14fb612d31d 100644 --- a/src/third_party/wiredtiger/test/format/config.h +++ b/src/third_party/wiredtiger/test/format/config.h @@ -69,72 +69,67 @@ typedef struct { #define V_TABLE_DISK_FIRSTFIT 37 #define V_GLOBAL_DISK_MMAP 38 #define V_GLOBAL_DISK_MMAP_ALL 39 -#define V_GLOBAL_FILE_MANAGER_CLOSE_HANDLE_MINIMUM 40 -#define V_GLOBAL_FILE_MANAGER_CLOSE_IDLE_TIME 41 -#define V_GLOBAL_FILE_MANAGER_CLOSE_SCAN_INTERVAL 42 -#define V_GLOBAL_FORMAT_ABORT 43 -#define V_GLOBAL_FORMAT_INDEPENDENT_THREAD_RNG 44 -#define V_GLOBAL_FORMAT_MAJOR_TIMEOUT 45 -#define V_GLOBAL_IMPORT 46 -#define V_GLOBAL_LOGGING 47 -#define V_GLOBAL_LOGGING_COMPRESSION 48 -#define V_GLOBAL_LOGGING_FILE_MAX 49 -#define V_GLOBAL_LOGGING_PREALLOC 50 -#define V_GLOBAL_LOGGING_REMOVE 51 -#define V_TABLE_LSM_AUTO_THROTTLE 52 -#define V_TABLE_LSM_BLOOM 53 -#define V_TABLE_LSM_BLOOM_BIT_COUNT 54 -#define V_TABLE_LSM_BLOOM_HASH_COUNT 55 -#define V_TABLE_LSM_BLOOM_OLDEST 56 -#define V_TABLE_LSM_CHUNK_SIZE 57 -#define V_TABLE_LSM_MERGE_MAX 58 -#define V_GLOBAL_LSM_WORKER_THREADS 59 -#define V_GLOBAL_OPS_ALTER 60 -#define V_GLOBAL_OPS_COMPACTION 61 -#define V_GLOBAL_OPS_HS_CURSOR 62 -#define V_TABLE_OPS_PCT_DELETE 63 -#define V_TABLE_OPS_PCT_INSERT 64 -#define V_TABLE_OPS_PCT_MODIFY 65 -#define V_TABLE_OPS_PCT_READ 66 -#define V_TABLE_OPS_PCT_WRITE 67 -#define V_GLOBAL_OPS_PREPARE 68 -#define V_GLOBAL_OPS_RANDOM_CURSOR 69 -#define V_GLOBAL_OPS_SALVAGE 70 -#define V_TABLE_OPS_TRUNCATE 71 -#define V_GLOBAL_OPS_VERIFY 72 -#define V_GLOBAL_QUIET 73 -#define V_GLOBAL_RUNS_IN_MEMORY 74 -#define V_GLOBAL_RUNS_OPS 75 -#define V_TABLE_RUNS_ROWS 76 -#define V_TABLE_RUNS_SOURCE 77 -#define V_GLOBAL_RUNS_TABLES 78 -#define V_GLOBAL_RUNS_THREADS 79 -#define V_GLOBAL_RUNS_TIMER 80 -#define V_TABLE_RUNS_TYPE 81 -#define V_GLOBAL_RUNS_VERIFY_FAILURE_DUMP 82 -#define V_GLOBAL_STATISTICS 83 -#define V_GLOBAL_STATISTICS_SERVER 84 -#define V_GLOBAL_STRESS_AGGRESSIVE_SWEEP 85 -#define V_GLOBAL_STRESS_CHECKPOINT 86 -#define V_GLOBAL_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 87 -#define V_GLOBAL_STRESS_CHECKPOINT_PREPARE 88 -#define V_GLOBAL_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION 89 -#define V_GLOBAL_STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS 90 -#define V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY 91 -#define V_GLOBAL_STRESS_HS_SEARCH 92 -#define V_GLOBAL_STRESS_HS_SWEEP 93 -#define V_GLOBAL_STRESS_PREPARE_RESOLUTION 94 -#define V_GLOBAL_STRESS_SPLIT_1 95 -#define V_GLOBAL_STRESS_SPLIT_2 96 -#define V_GLOBAL_STRESS_SPLIT_3 97 -#define V_GLOBAL_STRESS_SPLIT_4 98 -#define V_GLOBAL_STRESS_SPLIT_5 99 -#define V_GLOBAL_STRESS_SPLIT_6 100 -#define V_GLOBAL_STRESS_SPLIT_7 101 -#define V_GLOBAL_TRANSACTION_IMPLICIT 102 -#define V_GLOBAL_TRANSACTION_TIMESTAMPS 103 -#define V_GLOBAL_WIREDTIGER_CONFIG 104 -#define V_GLOBAL_WIREDTIGER_RWLOCK 105 -#define V_GLOBAL_WIREDTIGER_LEAK_MEMORY 106 +#define V_GLOBAL_FORMAT_ABORT 40 +#define V_GLOBAL_FORMAT_INDEPENDENT_THREAD_RNG 41 +#define V_GLOBAL_FORMAT_MAJOR_TIMEOUT 42 +#define V_GLOBAL_IMPORT 43 +#define V_GLOBAL_LOGGING 44 +#define V_GLOBAL_LOGGING_COMPRESSION 45 +#define V_GLOBAL_LOGGING_FILE_MAX 46 +#define V_GLOBAL_LOGGING_PREALLOC 47 +#define V_GLOBAL_LOGGING_REMOVE 48 +#define V_TABLE_LSM_AUTO_THROTTLE 49 +#define V_TABLE_LSM_BLOOM 50 +#define V_TABLE_LSM_BLOOM_BIT_COUNT 51 +#define V_TABLE_LSM_BLOOM_HASH_COUNT 52 +#define V_TABLE_LSM_BLOOM_OLDEST 53 +#define V_TABLE_LSM_CHUNK_SIZE 54 +#define V_TABLE_LSM_MERGE_MAX 55 +#define V_GLOBAL_LSM_WORKER_THREADS 56 +#define V_GLOBAL_OPS_ALTER 57 +#define V_GLOBAL_OPS_COMPACTION 58 +#define V_GLOBAL_OPS_HS_CURSOR 59 +#define V_TABLE_OPS_PCT_DELETE 60 +#define V_TABLE_OPS_PCT_INSERT 61 +#define V_TABLE_OPS_PCT_MODIFY 62 +#define V_TABLE_OPS_PCT_READ 63 +#define V_TABLE_OPS_PCT_WRITE 64 +#define V_GLOBAL_OPS_PREPARE 65 +#define V_GLOBAL_OPS_RANDOM_CURSOR 66 +#define V_GLOBAL_OPS_SALVAGE 67 +#define V_TABLE_OPS_TRUNCATE 68 +#define V_GLOBAL_OPS_VERIFY 69 +#define V_GLOBAL_QUIET 70 +#define V_GLOBAL_RUNS_IN_MEMORY 71 +#define V_GLOBAL_RUNS_OPS 72 +#define V_TABLE_RUNS_ROWS 73 +#define V_TABLE_RUNS_SOURCE 74 +#define V_GLOBAL_RUNS_TABLES 75 +#define V_GLOBAL_RUNS_THREADS 76 +#define V_GLOBAL_RUNS_TIMER 77 +#define V_TABLE_RUNS_TYPE 78 +#define V_GLOBAL_RUNS_VERIFY_FAILURE_DUMP 79 +#define V_GLOBAL_STATISTICS 80 +#define V_GLOBAL_STATISTICS_SERVER 81 +#define V_GLOBAL_STRESS_AGGRESSIVE_SWEEP 82 +#define V_GLOBAL_STRESS_CHECKPOINT 83 +#define V_GLOBAL_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 84 +#define V_GLOBAL_STRESS_CHECKPOINT_PREPARE 85 +#define V_GLOBAL_STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS 86 +#define V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY 87 +#define V_GLOBAL_STRESS_HS_SEARCH 88 +#define V_GLOBAL_STRESS_HS_SWEEP 89 +#define V_GLOBAL_STRESS_SPLIT_1 90 +#define V_GLOBAL_STRESS_SPLIT_2 91 +#define V_GLOBAL_STRESS_SPLIT_3 92 +#define V_GLOBAL_STRESS_SPLIT_4 93 +#define V_GLOBAL_STRESS_SPLIT_5 94 +#define V_GLOBAL_STRESS_SPLIT_6 95 +#define V_GLOBAL_STRESS_SPLIT_7 96 +#define V_GLOBAL_TRANSACTION_IMPLICIT 97 +#define V_GLOBAL_TRANSACTION_TIMESTAMPS 98 +#define V_GLOBAL_WIREDTIGER_CONFIG 99 +#define V_GLOBAL_WIREDTIGER_RWLOCK 100 +#define V_GLOBAL_WIREDTIGER_LEAK_MEMORY 101 -#define V_ELEMENT_COUNT 107 +#define V_ELEMENT_COUNT 102 diff --git a/src/third_party/wiredtiger/test/format/config.sh b/src/third_party/wiredtiger/test/format/config.sh index 7f51c9879d8..23af56e2724 100644 --- a/src/third_party/wiredtiger/test/format/config.sh +++ b/src/third_party/wiredtiger/test/format/config.sh @@ -151,13 +151,6 @@ CONFIG configuration_list[] = { {"disk.mmap_all", "configure mmap operations (read and write)", C_BOOL, 5, 0, 0} -/* Test format can only handle 32 tables so we use a maximum value of 32 here. */ -{"file_manager.close_handle_minimum", "number of handles open before the file manager will look for handles to close", 0x0, 0, 32, 32} - -{"file_manager.close_idle_time", "amount of time in seconds a file handle needs to be idle before attempting to close it. A setting of 0 means that idle handles are not closed", 0x0, 0, 60, 100000} - -{"file_manager.close_scan_interval", "interval in seconds at which to check for files that are inactive and close them", 0x0, 0, 30, 100000} - {"format.abort", "drop core during timed run", C_BOOL, 0, 0, 0} {"format.independent_thread_rng", "configure independent thread RNG space", C_BOOL, 75, 0, 0} @@ -255,8 +248,6 @@ CONFIG configuration_list[] = { {"stress.checkpoint_prepare", "stress checkpoint prepare", C_BOOL, 2, 0, 0} -{"stress.failpoint_eviction_fail_after_reconciliation", "stress failpoint eviction fail after reconciliation", C_BOOL, 30, 0, 0} - {"stress.failpoint_hs_delete_key_from_ts", "stress failpoint history store delete key from ts", C_BOOL, 30, 0, 0} {"stress.hs_checkpoint_delay", "stress history store checkpoint delay", C_BOOL, 2, 0, 0} @@ -265,8 +256,6 @@ CONFIG configuration_list[] = { {"stress.hs_sweep", "stress history store sweep", C_BOOL, 2, 0, 0} -{"stress.prepare_resolution", "stress prepare resolution", C_BOOL, 2, 0, 0} - {"stress.split_1", "stress splits (#1)", C_BOOL, 2, 0, 0} {"stress.split_2", "stress splits (#2)", C_BOOL, 2, 0, 0} diff --git a/src/third_party/wiredtiger/test/format/config_def.c b/src/third_party/wiredtiger/test/format/config_def.c index c33e7697dea..78613c1c1ab 100644 --- a/src/third_party/wiredtiger/test/format/config_def.c +++ b/src/third_party/wiredtiger/test/format/config_def.c @@ -2,36 +2,32 @@ #include "format.h" -CONFIG configuration_list[] = { - {"assert.read_timestamp", "assert read_timestamp", - C_BOOL, 2, 0, 0, V_GLOBAL_ASSERT_READ_TIMESTAMP}, +CONFIG configuration_list[] = {{"assert.read_timestamp", "assert read_timestamp", C_BOOL, 2, 0, 0, + V_GLOBAL_ASSERT_READ_TIMESTAMP}, - {"assert.write_timestamp", "set write_timestamp_usage and assert write_timestamp", - C_BOOL, 2, 0, 0, V_GLOBAL_ASSERT_WRITE_TIMESTAMP}, + {"assert.write_timestamp", "set write_timestamp_usage and assert write_timestamp", C_BOOL, 2, 0, + 0, V_GLOBAL_ASSERT_WRITE_TIMESTAMP}, - {"backup", "configure backups", - C_BOOL, 20, 0, 0, V_GLOBAL_BACKUP}, + {"backup", "configure backups", C_BOOL, 20, 0, 0, V_GLOBAL_BACKUP}, - {"backup.incremental", "backup type (off | block | log)", - C_IGNORE | C_STRING, 0, 0, 0, V_GLOBAL_BACKUP_INCREMENTAL}, + {"backup.incremental", "backup type (off | block | log)", C_IGNORE | C_STRING, 0, 0, 0, + V_GLOBAL_BACKUP_INCREMENTAL}, - {"backup.incr_granularity", "incremental backup block granularity (KB)", - 0x0, 4, 16384, 16384, V_GLOBAL_BACKUP_INCR_GRANULARITY}, + {"backup.incr_granularity", "incremental backup block granularity (KB)", 0x0, 4, 16384, 16384, + V_GLOBAL_BACKUP_INCR_GRANULARITY}, - {"block_cache", "enable the block cache", - C_BOOL, 10, 0, 0, V_GLOBAL_BLOCK_CACHE}, + {"block_cache", "enable the block cache", C_BOOL, 10, 0, 0, V_GLOBAL_BLOCK_CACHE}, - {"block_cache.cache_on_checkpoint", "block cache: cache checkpoint writes", - C_BOOL, 30, 0, 0, V_GLOBAL_BLOCK_CACHE_CACHE_ON_CHECKPOINT}, + {"block_cache.cache_on_checkpoint", "block cache: cache checkpoint writes", C_BOOL, 30, 0, 0, + V_GLOBAL_BLOCK_CACHE_CACHE_ON_CHECKPOINT}, - {"block_cache.cache_on_writes", "block cache: populate the cache on writes", - C_BOOL, 60, 0, 0, V_GLOBAL_BLOCK_CACHE_CACHE_ON_WRITES}, + {"block_cache.cache_on_writes", "block cache: populate the cache on writes", C_BOOL, 60, 0, 0, + V_GLOBAL_BLOCK_CACHE_CACHE_ON_WRITES}, - {"block_cache.size", "block cache size (MB)", - 0x0, 1, 100, 100 * 1024, V_GLOBAL_BLOCK_CACHE_SIZE}, + {"block_cache.size", "block cache size (MB)", 0x0, 1, 100, 100 * 1024, V_GLOBAL_BLOCK_CACHE_SIZE}, - {"btree.bitcnt", "fixed-length column-store object size (number of bits)", - C_TABLE | C_TYPE_FIX, 1, 8, 8, V_TABLE_BTREE_BITCNT}, + {"btree.bitcnt", "fixed-length column-store object size (number of bits)", C_TABLE | C_TYPE_FIX, + 1, 8, 8, V_TABLE_BTREE_BITCNT}, {"btree.compression", "data compression (off | lz4 | snappy | zlib | zstd)", C_IGNORE | C_STRING | C_TABLE, 0, 0, 0, V_TABLE_BTREE_COMPRESSION}, @@ -42,293 +38,244 @@ CONFIG configuration_list[] = { {"btree.huffman_value", "configure huffman encoded values", C_BOOL | C_TABLE | C_TYPE_ROW | C_TYPE_VAR, 20, 0, 0, V_TABLE_BTREE_HUFFMAN_VALUE}, - {"btree.internal_key_truncation", "truncate internal keys", - C_BOOL | C_TABLE, 95, 0, 0, V_TABLE_BTREE_INTERNAL_KEY_TRUNCATION}, + {"btree.internal_key_truncation", "truncate internal keys", C_BOOL | C_TABLE, 95, 0, 0, + V_TABLE_BTREE_INTERNAL_KEY_TRUNCATION}, - {"btree.internal_page_max", "btree internal node maximum size", - C_TABLE, 9, 17, 27, V_TABLE_BTREE_INTERNAL_PAGE_MAX}, + {"btree.internal_page_max", "btree internal node maximum size", C_TABLE, 9, 17, 27, + V_TABLE_BTREE_INTERNAL_PAGE_MAX}, - {"btree.key_max", "maximum key size", - C_TABLE | C_TYPE_ROW, 20, 128, MEGABYTE(10), V_TABLE_BTREE_KEY_MAX}, + {"btree.key_max", "maximum key size", C_TABLE | C_TYPE_ROW, 20, 128, MEGABYTE(10), + V_TABLE_BTREE_KEY_MAX}, - {"btree.key_min", "minimum key size", - C_TABLE | C_TYPE_ROW, KEY_LEN_CONFIG_MIN, 32, 256, V_TABLE_BTREE_KEY_MIN}, + {"btree.key_min", "minimum key size", C_TABLE | C_TYPE_ROW, KEY_LEN_CONFIG_MIN, 32, 256, + V_TABLE_BTREE_KEY_MIN}, - {"btree.leaf_page_max", "btree leaf node maximum size", - C_TABLE, 9, 17, 27, V_TABLE_BTREE_LEAF_PAGE_MAX}, + {"btree.leaf_page_max", "btree leaf node maximum size", C_TABLE, 9, 17, 27, + V_TABLE_BTREE_LEAF_PAGE_MAX}, - {"btree.memory_page_max", "maximum cache page size", - C_TABLE, 1, 10, 128, V_TABLE_BTREE_MEMORY_PAGE_MAX}, + {"btree.memory_page_max", "maximum cache page size", C_TABLE, 1, 10, 128, + V_TABLE_BTREE_MEMORY_PAGE_MAX}, - {"btree.prefix_len", "common key prefix", - C_TABLE | C_TYPE_ROW | C_ZERO_NOTSET, PREFIX_LEN_CONFIG_MIN, PREFIX_LEN_CONFIG_MAX, PREFIX_LEN_CONFIG_MAX, V_TABLE_BTREE_PREFIX_LEN}, + {"btree.prefix_len", "common key prefix", C_TABLE | C_TYPE_ROW | C_ZERO_NOTSET, + PREFIX_LEN_CONFIG_MIN, PREFIX_LEN_CONFIG_MAX, PREFIX_LEN_CONFIG_MAX, V_TABLE_BTREE_PREFIX_LEN}, - {"btree.prefix_compression", "configure prefix compressed keys", - C_BOOL | C_TABLE | C_TYPE_ROW, 80, 0, 0, V_TABLE_BTREE_PREFIX_COMPRESSION}, + {"btree.prefix_compression", "configure prefix compressed keys", C_BOOL | C_TABLE | C_TYPE_ROW, + 80, 0, 0, V_TABLE_BTREE_PREFIX_COMPRESSION}, {"btree.prefix_compression_min", "minimum gain before prefix compression is used (bytes)", C_TABLE | C_TYPE_ROW, 0, 8, 256, V_TABLE_BTREE_PREFIX_COMPRESSION_MIN}, - {"btree.repeat_data_pct", "duplicate values (percentage)", - C_TABLE | C_TYPE_VAR, 0, 90, 90, V_TABLE_BTREE_REPEAT_DATA_PCT}, + {"btree.repeat_data_pct", "duplicate values (percentage)", C_TABLE | C_TYPE_VAR, 0, 90, 90, + V_TABLE_BTREE_REPEAT_DATA_PCT}, - {"btree.reverse", "reverse order collation", - C_BOOL | C_TABLE | C_TYPE_ROW, 10, 0, 0, V_TABLE_BTREE_REVERSE}, + {"btree.reverse", "reverse order collation", C_BOOL | C_TABLE | C_TYPE_ROW, 10, 0, 0, + V_TABLE_BTREE_REVERSE}, - {"btree.split_pct", "page split size as a percentage of the maximum page size", - C_TABLE, 50, 100, 100, V_TABLE_BTREE_SPLIT_PCT}, + {"btree.split_pct", "page split size as a percentage of the maximum page size", C_TABLE, 50, 100, + 100, V_TABLE_BTREE_SPLIT_PCT}, - {"btree.value_max", "maximum value size", - C_TABLE | C_TYPE_ROW | C_TYPE_VAR, 32, 4096, MEGABYTE(10), V_TABLE_BTREE_VALUE_MAX}, + {"btree.value_max", "maximum value size", C_TABLE | C_TYPE_ROW | C_TYPE_VAR, 32, 4096, + MEGABYTE(10), V_TABLE_BTREE_VALUE_MAX}, - {"btree.value_min", "minimum value size", - C_TABLE | C_TYPE_ROW | C_TYPE_VAR, 0, 20, 4096, V_TABLE_BTREE_VALUE_MIN}, + {"btree.value_min", "minimum value size", C_TABLE | C_TYPE_ROW | C_TYPE_VAR, 0, 20, 4096, + V_TABLE_BTREE_VALUE_MIN}, - {"cache", "cache size (MB)", - 0x0, 1, 100, 100 * 1024, V_GLOBAL_CACHE}, + {"cache", "cache size (MB)", 0x0, 1, 100, 100 * 1024, V_GLOBAL_CACHE}, - {"cache.evict_max", "maximum number of eviction workers", - 0x0, 0, 5, 100, V_GLOBAL_CACHE_EVICT_MAX}, + {"cache.evict_max", "maximum number of eviction workers", 0x0, 0, 5, 100, + V_GLOBAL_CACHE_EVICT_MAX}, - {"cache.minimum", "minimum cache size (MB)", - C_IGNORE, 0, 0, 100 * 1024, V_GLOBAL_CACHE_MINIMUM}, + {"cache.minimum", "minimum cache size (MB)", C_IGNORE, 0, 0, 100 * 1024, V_GLOBAL_CACHE_MINIMUM}, - {"checkpoint", "checkpoint type (on | off | wiredtiger)", - C_IGNORE | C_STRING, 0, 0, 0, V_GLOBAL_CHECKPOINT}, + {"checkpoint", "checkpoint type (on | off | wiredtiger)", C_IGNORE | C_STRING, 0, 0, 0, + V_GLOBAL_CHECKPOINT}, - {"checkpoint.log_size", "MB of log to wait if wiredtiger checkpoints configured", - 0x0, 20, 200, 1024, V_GLOBAL_CHECKPOINT_LOG_SIZE}, + {"checkpoint.log_size", "MB of log to wait if wiredtiger checkpoints configured", 0x0, 20, 200, + 1024, V_GLOBAL_CHECKPOINT_LOG_SIZE}, - {"checkpoint.wait", "seconds to wait if wiredtiger checkpoints configured", - 0x0, 5, 100, 3600, V_GLOBAL_CHECKPOINT_WAIT}, + {"checkpoint.wait", "seconds to wait if wiredtiger checkpoints configured", 0x0, 5, 100, 3600, + V_GLOBAL_CHECKPOINT_WAIT}, {"disk.checksum", "checksum type (on | off | uncompressed | unencrypted)", C_IGNORE | C_STRING | C_TABLE, 0, 0, 0, V_TABLE_DISK_CHECKSUM}, - {"disk.data_extend", "configure data file extension", - C_BOOL, 5, 0, 0, V_GLOBAL_DISK_DATA_EXTEND}, + {"disk.data_extend", "configure data file extension", C_BOOL, 5, 0, 0, V_GLOBAL_DISK_DATA_EXTEND}, - {"disk.direct_io", "configure direct I/O for data objects", - C_BOOL | C_IGNORE, 0, 0, 1, V_GLOBAL_DISK_DIRECT_IO}, + {"disk.direct_io", "configure direct I/O for data objects", C_BOOL | C_IGNORE, 0, 0, 1, + V_GLOBAL_DISK_DIRECT_IO}, - {"disk.encryption", "encryption type (off | rotn-7)", - C_IGNORE | C_STRING, 0, 0, 0, V_GLOBAL_DISK_ENCRYPTION}, + {"disk.encryption", "encryption type (off | rotn-7)", C_IGNORE | C_STRING, 0, 0, 0, + V_GLOBAL_DISK_ENCRYPTION}, - {"disk.firstfit", "configure first-fit allocation", - C_BOOL | C_TABLE, 10, 0, 0, V_TABLE_DISK_FIRSTFIT}, + {"disk.firstfit", "configure first-fit allocation", C_BOOL | C_TABLE, 10, 0, 0, + V_TABLE_DISK_FIRSTFIT}, - {"disk.mmap", "configure mmap operations (reads only)", - C_BOOL, 90, 0, 0, V_GLOBAL_DISK_MMAP}, + {"disk.mmap", "configure mmap operations (reads only)", C_BOOL, 90, 0, 0, V_GLOBAL_DISK_MMAP}, - {"disk.mmap_all", "configure mmap operations (read and write)", - C_BOOL, 5, 0, 0, V_GLOBAL_DISK_MMAP_ALL}, + {"disk.mmap_all", "configure mmap operations (read and write)", C_BOOL, 5, 0, 0, + V_GLOBAL_DISK_MMAP_ALL}, -/* Test format can only handle 32 tables so we use a maximum value of 32 here. */ - {"file_manager.close_handle_minimum", "number of handles open before the file manager will look for handles to close", - 0x0, 0, 32, 32, V_GLOBAL_FILE_MANAGER_CLOSE_HANDLE_MINIMUM}, + {"format.abort", "drop core during timed run", C_BOOL, 0, 0, 0, V_GLOBAL_FORMAT_ABORT}, - {"file_manager.close_idle_time", "amount of time in seconds a file handle needs to be idle before attempting to close it. A setting of 0 means that idle handles are not closed", - 0x0, 0, 60, 100000, V_GLOBAL_FILE_MANAGER_CLOSE_IDLE_TIME}, + {"format.independent_thread_rng", "configure independent thread RNG space", C_BOOL, 75, 0, 0, + V_GLOBAL_FORMAT_INDEPENDENT_THREAD_RNG}, - {"file_manager.close_scan_interval", "interval in seconds at which to check for files that are inactive and close them", - 0x0, 0, 30, 100000, V_GLOBAL_FILE_MANAGER_CLOSE_SCAN_INTERVAL}, + {"format.major_timeout", "long-running operations timeout (minutes)", C_IGNORE, 0, 0, 1000, + V_GLOBAL_FORMAT_MAJOR_TIMEOUT}, - {"format.abort", "drop core during timed run", - C_BOOL, 0, 0, 0, V_GLOBAL_FORMAT_ABORT}, + /* + * 0% + * FIXME-WT-7418: Temporarily disable import until WT_ROLLBACK error and wt_copy_and_sync error is + * fixed. It should be (C_BOOL, 20, 0, 0). + */ + {"import", "import table from newly created database", C_BOOL, 0, 0, 0, V_GLOBAL_IMPORT}, - {"format.independent_thread_rng", "configure independent thread RNG space", - C_BOOL, 75, 0, 0, V_GLOBAL_FORMAT_INDEPENDENT_THREAD_RNG}, - - {"format.major_timeout", "long-running operations timeout (minutes)", - C_IGNORE, 0, 0, 1000, V_GLOBAL_FORMAT_MAJOR_TIMEOUT}, - -/* - * 0% - * FIXME-WT-7418: Temporarily disable import until WT_ROLLBACK error and wt_copy_and_sync error is - * fixed. It should be (C_BOOL, 20, 0, 0). - */ - {"import", "import table from newly created database", - C_BOOL, 0, 0, 0, V_GLOBAL_IMPORT}, - - {"logging", "configure logging", - C_BOOL, 50, 0, 0, V_GLOBAL_LOGGING}, + {"logging", "configure logging", C_BOOL, 50, 0, 0, V_GLOBAL_LOGGING}, {"logging.compression", "logging compression (off | lz4 | snappy | zlib | zstd)", C_IGNORE | C_STRING, 0, 0, 0, V_GLOBAL_LOGGING_COMPRESSION}, - {"logging.file_max", "maximum log file size (KB)", - 0x0, 100, 512000, 2097152, V_GLOBAL_LOGGING_FILE_MAX}, + {"logging.file_max", "maximum log file size (KB)", 0x0, 100, 512000, 2097152, + V_GLOBAL_LOGGING_FILE_MAX}, - {"logging.prealloc", "configure log file pre-allocation", - C_BOOL, 50, 0, 0, V_GLOBAL_LOGGING_PREALLOC}, + {"logging.prealloc", "configure log file pre-allocation", C_BOOL, 50, 0, 0, + V_GLOBAL_LOGGING_PREALLOC}, - {"logging.remove", "configure log file removal", - C_BOOL, 50, 0, 0, V_GLOBAL_LOGGING_REMOVE}, + {"logging.remove", "configure log file removal", C_BOOL, 50, 0, 0, V_GLOBAL_LOGGING_REMOVE}, - {"lsm.auto_throttle", "throttle LSM inserts", - C_BOOL | C_TABLE | C_TYPE_LSM, 90, 0, 0, V_TABLE_LSM_AUTO_THROTTLE}, + {"lsm.auto_throttle", "throttle LSM inserts", C_BOOL | C_TABLE | C_TYPE_LSM, 90, 0, 0, + V_TABLE_LSM_AUTO_THROTTLE}, - {"lsm.bloom", "configure bloom filters", - C_BOOL | C_TABLE | C_TYPE_LSM, 95, 0, 0, V_TABLE_LSM_BLOOM}, + {"lsm.bloom", "configure bloom filters", C_BOOL | C_TABLE | C_TYPE_LSM, 95, 0, 0, + V_TABLE_LSM_BLOOM}, - {"lsm.bloom_bit_count", "number of bits per item for bloom filters", - C_TABLE | C_TYPE_LSM, 4, 64, 1000, V_TABLE_LSM_BLOOM_BIT_COUNT}, + {"lsm.bloom_bit_count", "number of bits per item for bloom filters", C_TABLE | C_TYPE_LSM, 4, 64, + 1000, V_TABLE_LSM_BLOOM_BIT_COUNT}, - {"lsm.bloom_hash_count", "number of hash values per item for bloom filters", - C_TABLE | C_TYPE_LSM, 4, 32, 100, V_TABLE_LSM_BLOOM_HASH_COUNT}, + {"lsm.bloom_hash_count", "number of hash values per item for bloom filters", C_TABLE | C_TYPE_LSM, + 4, 32, 100, V_TABLE_LSM_BLOOM_HASH_COUNT}, - {"lsm.bloom_oldest", "configure bloom_oldest=true", - C_BOOL | C_TABLE | C_TYPE_LSM, 10, 0, 0, V_TABLE_LSM_BLOOM_OLDEST}, + {"lsm.bloom_oldest", "configure bloom_oldest=true", C_BOOL | C_TABLE | C_TYPE_LSM, 10, 0, 0, + V_TABLE_LSM_BLOOM_OLDEST}, - {"lsm.chunk_size", "LSM chunk size (MB)", - C_TABLE | C_TYPE_LSM, 1, 10, 100, V_TABLE_LSM_CHUNK_SIZE}, + {"lsm.chunk_size", "LSM chunk size (MB)", C_TABLE | C_TYPE_LSM, 1, 10, 100, + V_TABLE_LSM_CHUNK_SIZE}, {"lsm.merge_max", "maximum number of chunks to include in an LSM merge operation", C_TABLE | C_TYPE_LSM, 4, 20, 100, V_TABLE_LSM_MERGE_MAX}, - {"lsm.worker_threads", "number of LSM worker threads", - C_TYPE_LSM, 3, 4, 20, V_GLOBAL_LSM_WORKER_THREADS}, + {"lsm.worker_threads", "number of LSM worker threads", C_TYPE_LSM, 3, 4, 20, + V_GLOBAL_LSM_WORKER_THREADS}, - {"ops.alter", "configure table alterations", - C_BOOL, 10, 0, 0, V_GLOBAL_OPS_ALTER}, + {"ops.alter", "configure table alterations", C_BOOL, 10, 0, 0, V_GLOBAL_OPS_ALTER}, - {"ops.compaction", "configure compaction", - C_BOOL, 10, 0, 0, V_GLOBAL_OPS_COMPACTION}, + {"ops.compaction", "configure compaction", C_BOOL, 10, 0, 0, V_GLOBAL_OPS_COMPACTION}, - {"ops.hs_cursor", "configure history store cursor reads", - C_BOOL, 50, 0, 0, V_GLOBAL_OPS_HS_CURSOR}, + {"ops.hs_cursor", "configure history store cursor reads", C_BOOL, 50, 0, 0, + V_GLOBAL_OPS_HS_CURSOR}, - {"ops.pct.delete", "delete operations (percentage)", - C_IGNORE | C_TABLE, 0, 0, 100, V_TABLE_OPS_PCT_DELETE}, + {"ops.pct.delete", "delete operations (percentage)", C_IGNORE | C_TABLE, 0, 0, 100, + V_TABLE_OPS_PCT_DELETE}, - {"ops.pct.insert", "insert operations (percentage)", - C_IGNORE | C_TABLE, 0, 0, 100, V_TABLE_OPS_PCT_INSERT}, + {"ops.pct.insert", "insert operations (percentage)", C_IGNORE | C_TABLE, 0, 0, 100, + V_TABLE_OPS_PCT_INSERT}, - {"ops.pct.modify", "modify operations (percentage)", - C_IGNORE | C_TABLE, 0, 0, 100, V_TABLE_OPS_PCT_MODIFY}, + {"ops.pct.modify", "modify operations (percentage)", C_IGNORE | C_TABLE, 0, 0, 100, + V_TABLE_OPS_PCT_MODIFY}, - {"ops.pct.read", "read operations (percentage)", - C_IGNORE | C_TABLE, 0, 0, 100, V_TABLE_OPS_PCT_READ}, + {"ops.pct.read", "read operations (percentage)", C_IGNORE | C_TABLE, 0, 0, 100, + V_TABLE_OPS_PCT_READ}, - {"ops.pct.write", "update operations (percentage)", - C_IGNORE | C_TABLE, 0, 0, 100, V_TABLE_OPS_PCT_WRITE}, + {"ops.pct.write", "update operations (percentage)", C_IGNORE | C_TABLE, 0, 0, 100, + V_TABLE_OPS_PCT_WRITE}, - {"ops.prepare", "configure transaction prepare", - C_BOOL, 5, 0, 0, V_GLOBAL_OPS_PREPARE}, + {"ops.prepare", "configure transaction prepare", C_BOOL, 5, 0, 0, V_GLOBAL_OPS_PREPARE}, - {"ops.random_cursor", "configure random cursor reads", - C_BOOL, 10, 0, 0, V_GLOBAL_OPS_RANDOM_CURSOR}, + {"ops.random_cursor", "configure random cursor reads", C_BOOL, 10, 0, 0, + V_GLOBAL_OPS_RANDOM_CURSOR}, - {"ops.salvage", "configure salvage", - C_BOOL, 100, 1, 0, V_GLOBAL_OPS_SALVAGE}, + {"ops.salvage", "configure salvage", C_BOOL, 100, 1, 0, V_GLOBAL_OPS_SALVAGE}, - {"ops.truncate", "configure truncation", - C_BOOL | C_TABLE, 100, 0, 0, V_TABLE_OPS_TRUNCATE}, + {"ops.truncate", "configure truncation", C_BOOL | C_TABLE, 100, 0, 0, V_TABLE_OPS_TRUNCATE}, - {"ops.verify", "configure verify", - C_BOOL, 100, 1, 0, V_GLOBAL_OPS_VERIFY}, + {"ops.verify", "configure verify", C_BOOL, 100, 1, 0, V_GLOBAL_OPS_VERIFY}, - {"quiet", "quiet run (same as -q)", - C_BOOL | C_IGNORE, 0, 0, 1, V_GLOBAL_QUIET}, + {"quiet", "quiet run (same as -q)", C_BOOL | C_IGNORE, 0, 0, 1, V_GLOBAL_QUIET}, - {"runs.in_memory", "configure in-memory", - C_BOOL | C_IGNORE, 0, 0, 1, V_GLOBAL_RUNS_IN_MEMORY}, + {"runs.in_memory", "configure in-memory", C_BOOL | C_IGNORE, 0, 0, 1, V_GLOBAL_RUNS_IN_MEMORY}, - {"runs.ops", "operations per run", - 0x0, 0, M(2), M(100), V_GLOBAL_RUNS_OPS}, + {"runs.ops", "operations per run", 0x0, 0, M(2), M(100), V_GLOBAL_RUNS_OPS}, - {"runs.rows", "number of rows", - C_TABLE, 10, M(1), M(100), V_TABLE_RUNS_ROWS}, + {"runs.rows", "number of rows", C_TABLE, 10, M(1), M(100), V_TABLE_RUNS_ROWS}, - {"runs.source", "data source type (file | lsm | table)", - C_IGNORE | C_STRING | C_TABLE, 0, 0, 0, V_TABLE_RUNS_SOURCE}, + {"runs.source", "data source type (file | lsm | table)", C_IGNORE | C_STRING | C_TABLE, 0, 0, 0, + V_TABLE_RUNS_SOURCE}, - {"runs.tables", "number of tables", - 0x0, 1, 32, V_MAX_TABLES_CONFIG, V_GLOBAL_RUNS_TABLES}, + {"runs.tables", "number of tables", 0x0, 1, 32, V_MAX_TABLES_CONFIG, V_GLOBAL_RUNS_TABLES}, - {"runs.threads", "number of worker threads", - 0x0, 1, 32, 128, V_GLOBAL_RUNS_THREADS}, + {"runs.threads", "number of worker threads", 0x0, 1, 32, 128, V_GLOBAL_RUNS_THREADS}, - {"runs.timer", "run time (minutes)", - C_IGNORE, 0, 0, UINT_MAX, V_GLOBAL_RUNS_TIMER}, + {"runs.timer", "run time (minutes)", C_IGNORE, 0, 0, UINT_MAX, V_GLOBAL_RUNS_TIMER}, - {"runs.type", "object type (fix | row | var)", - C_IGNORE | C_STRING | C_TABLE, 0, 0, 0, V_TABLE_RUNS_TYPE}, + {"runs.type", "object type (fix | row | var)", C_IGNORE | C_STRING | C_TABLE, 0, 0, 0, + V_TABLE_RUNS_TYPE}, - {"runs.verify_failure_dump", "configure page dump on repeatable read error", - C_BOOL | C_IGNORE, 0, 0, 1, V_GLOBAL_RUNS_VERIFY_FAILURE_DUMP}, + {"runs.verify_failure_dump", "configure page dump on repeatable read error", C_BOOL | C_IGNORE, 0, + 0, 1, V_GLOBAL_RUNS_VERIFY_FAILURE_DUMP}, - {"statistics", "configure statistics", - C_BOOL, 20, 0, 0, V_GLOBAL_STATISTICS}, + {"statistics", "configure statistics", C_BOOL, 20, 0, 0, V_GLOBAL_STATISTICS}, - {"statistics.server", "configure statistics server thread", - C_BOOL, 5, 0, 0, V_GLOBAL_STATISTICS_SERVER}, + {"statistics.server", "configure statistics server thread", C_BOOL, 5, 0, 0, + V_GLOBAL_STATISTICS_SERVER}, - {"stress.aggressive_sweep", "stress aggressive sweep", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_AGGRESSIVE_SWEEP}, + {"stress.aggressive_sweep", "stress aggressive sweep", C_BOOL, 2, 0, 0, + V_GLOBAL_STRESS_AGGRESSIVE_SWEEP}, - {"stress.checkpoint", "stress checkpoints", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_CHECKPOINT}, + {"stress.checkpoint", "stress checkpoints", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_CHECKPOINT}, {"stress.checkpoint_reserved_txnid_delay", "stress checkpoint invisible transaction id delay", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY}, - {"stress.checkpoint_prepare", "stress checkpoint prepare", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_CHECKPOINT_PREPARE}, - - {"stress.failpoint_eviction_fail_after_reconciliation", "stress failpoint eviction fail after reconciliation", - C_BOOL, 30, 0, 0, V_GLOBAL_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION}, + {"stress.checkpoint_prepare", "stress checkpoint prepare", C_BOOL, 2, 0, 0, + V_GLOBAL_STRESS_CHECKPOINT_PREPARE}, {"stress.failpoint_hs_delete_key_from_ts", "stress failpoint history store delete key from ts", C_BOOL, 30, 0, 0, V_GLOBAL_STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS}, - {"stress.hs_checkpoint_delay", "stress history store checkpoint delay", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY}, - - {"stress.hs_search", "stress history store search", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_HS_SEARCH}, + {"stress.hs_checkpoint_delay", "stress history store checkpoint delay", C_BOOL, 2, 0, 0, + V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY}, - {"stress.hs_sweep", "stress history store sweep", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_HS_SWEEP}, + {"stress.hs_search", "stress history store search", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_HS_SEARCH}, - {"stress.prepare_resolution", "stress prepare resolution", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_PREPARE_RESOLUTION}, + {"stress.hs_sweep", "stress history store sweep", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_HS_SWEEP}, - {"stress.split_1", "stress splits (#1)", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_1}, + {"stress.split_1", "stress splits (#1)", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_1}, - {"stress.split_2", "stress splits (#2)", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_2}, + {"stress.split_2", "stress splits (#2)", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_2}, - {"stress.split_3", "stress splits (#3)", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_3}, + {"stress.split_3", "stress splits (#3)", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_3}, - {"stress.split_4", "stress splits (#4)", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_4}, + {"stress.split_4", "stress splits (#4)", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_4}, - {"stress.split_5", "stress splits (#5)", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_5}, + {"stress.split_5", "stress splits (#5)", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_5}, - {"stress.split_6", "stress splits (#6)", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_6}, + {"stress.split_6", "stress splits (#6)", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_6}, - {"stress.split_7", "stress splits (#7)", - C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_7}, + {"stress.split_7", "stress splits (#7)", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_SPLIT_7}, - {"transaction.implicit", "implicit, without timestamps, transactions (percentage)", - 0, 0, 100, 100, V_GLOBAL_TRANSACTION_IMPLICIT}, + {"transaction.implicit", "implicit, without timestamps, transactions (percentage)", 0, 0, 100, + 100, V_GLOBAL_TRANSACTION_IMPLICIT}, - {"transaction.timestamps", "all transactions (or none), have timestamps", - C_BOOL, 80, 0, 0, V_GLOBAL_TRANSACTION_TIMESTAMPS}, + {"transaction.timestamps", "all transactions (or none), have timestamps", C_BOOL, 80, 0, 0, + V_GLOBAL_TRANSACTION_TIMESTAMPS}, - {"wiredtiger.config", "wiredtiger_open API configuration string", - C_IGNORE | C_STRING, 0, 0, 0, V_GLOBAL_WIREDTIGER_CONFIG}, + {"wiredtiger.config", "wiredtiger_open API configuration string", C_IGNORE | C_STRING, 0, 0, 0, + V_GLOBAL_WIREDTIGER_CONFIG}, - {"wiredtiger.rwlock", "configure wiredtiger read/write mutexes", - C_BOOL, 80, 0, 0, V_GLOBAL_WIREDTIGER_RWLOCK}, + {"wiredtiger.rwlock", "configure wiredtiger read/write mutexes", C_BOOL, 80, 0, 0, + V_GLOBAL_WIREDTIGER_RWLOCK}, - {"wiredtiger.leak_memory", "leak memory on wiredtiger shutdown", - C_BOOL, 0, 0, 0, V_GLOBAL_WIREDTIGER_LEAK_MEMORY}, + {"wiredtiger.leak_memory", "leak memory on wiredtiger shutdown", C_BOOL, 0, 0, 0, + V_GLOBAL_WIREDTIGER_LEAK_MEMORY}, - {NULL, NULL, 0x0, 0, 0, 0, 0} -}; + {NULL, NULL, 0x0, 0, 0, 0, 0}}; diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10017 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10017 deleted file mode 100644 index efec568184e..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10017 +++ /dev/null @@ -1,179 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=0 -backup.incremental=off -backup.incr_granularity=856 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=0 -block_cache.size=47 -btree.huffman_value=0 -buffer_alignment=0 -cache=1452 -cache.evict_max=3 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=66 -checkpoint.wait=33 -debug.checkpoint_retention=10 -debug.cursor_reposition=0 -debug.eviction=0 -debug.log_retention=4 -debug.realloc_exact=0 -debug.realloc_malloc=0 -debug.slow_checkpoint=0 -debug.table_logging=0 -debug.update_restore_evict=0 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=1 -file_manager.close_handle_minimum=7 -file_manager.close_idle_time=29 -file_manager.close_scan_interval=21 -format.abort=0 -format.independent_thread_rng=0 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=63955 -logging.prealloc=1 -logging.remove=1 -ops.alter=0 -ops.compaction=0 -ops.hs_cursor=0 -ops.bound_cursor=0 -ops.prepare=1 -ops.random_cursor=1 -ops.salvage=0 -ops.verify=1 -quiet=1 -random.data_seed=4173770 -random.extra_seed=12599215 -runs.in_memory=0 -runs.ops=0 -runs.predictable_replay=0 -runs.rows=1800000 -runs.tables=3 -runs.threads=32 -runs.timer=6 -runs.verify_failure_dump=0 -statistics.mode=all -statistics_log.sources=off -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=0 -stress.failpoint_eviction_fail_after_reconciliation=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.sleep_before_read_overflow_onpage=0 -stress.split_1=0 -stress.split_2=0 -stress.split_3=0 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -stress.split_8=0 -tiered_storage.flush_frequency=0 -tiered_storage.storage_source=off -transaction.implicit=0 -transaction.timestamps=1 -wiredtiger.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.dictionary=1 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=10 -table1.btree.leaf_page_max=12 -table1.btree.memory_page_max=8 -table1.btree.repeat_data_pct=42 -table1.btree.split_pct=50 -table1.btree.value_max=3971 -table1.btree.value_min=5 -table1.disk.checksum=on -table1.disk.firstfit=0 -table1.ops.pareto=0 -table1.ops.pareto.skew=48 -table1.ops.pct.delete=35 -table1.ops.pct.insert=9 -table1.ops.pct.modify=49 -table1.ops.pct.read=3 -table1.ops.pct.write=4 -table1.ops.truncate=1 -table1.runs.mirror=0 -table1.runs.source=table -table1.runs.type=variable-length column-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.compression=zstd -table2.btree.dictionary=1 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=15 -table2.btree.key_max=109 -table2.btree.key_min=15 -table2.btree.leaf_page_max=9 -table2.btree.memory_page_max=8 -table2.btree.prefix_len=0 -table2.btree.prefix_compression=1 -table2.btree.prefix_compression_min=3 -table2.btree.reverse=0 -table2.btree.split_pct=95 -table2.btree.value_max=2650 -table2.btree.value_min=10 -table2.disk.checksum=on -table2.disk.firstfit=0 -table2.ops.pareto=1 -table2.ops.pareto.skew=56 -table2.ops.pct.delete=0 -table2.ops.pct.insert=1 -table2.ops.pct.modify=0 -table2.ops.pct.read=0 -table2.ops.pct.write=99 -table2.ops.truncate=1 -table2.runs.mirror=0 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.compression=snappy -table3.btree.dictionary=0 -table3.btree.internal_key_truncation=0 -table3.btree.internal_page_max=12 -table3.btree.key_max=33 -table3.btree.key_min=20 -table3.btree.leaf_page_max=9 -table3.btree.memory_page_max=6 -table3.btree.prefix_len=0 -table3.btree.prefix_compression=1 -table3.btree.prefix_compression_min=1 -table3.btree.reverse=0 -table3.btree.split_pct=87 -table3.btree.value_max=478 -table3.btree.value_min=9 -table3.disk.checksum=unencrypted -table3.disk.firstfit=0 -table3.ops.pareto=0 -table3.ops.pareto.skew=21 -table3.ops.pct.delete=63 -table3.ops.pct.insert=24 -table3.ops.pct.modify=0 -table3.ops.pct.read=5 -table3.ops.pct.write=8 -table3.ops.truncate=1 -table3.runs.mirror=0 -table3.runs.source=table -table3.runs.type=row-store diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10384 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10384 deleted file mode 100644 index 9ce716f3524..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10384 +++ /dev/null @@ -1,163 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=1 -backup.incremental=block -backup.incr_granularity=16384 -block_cache=1 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=0 -block_cache.size=26 -btree.huffman_value=0 -buffer_alignment=0 -cache=128 -cache.evict_max=3 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=117 -checkpoint.wait=25 -debug.realloc_exact=0 -debug.realloc_malloc=0 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=0 -format.abort=0 -format.independent_thread_rng=1 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=393645 -logging.prealloc=1 -logging.remove=1 -ops.alter=0 -ops.compaction=0 -ops.hs_cursor=0 -ops.bound_cursor=0 -ops.prepare=0 -ops.random_cursor=0 -ops.salvage=0 -ops.verify=1 -quiet=1 -runs.in_memory=0 -runs.ops=0 -runs.rows=1000000 -runs.tables=3 -runs.threads=4 -runs.timer=11 -runs.verify_failure_dump=0 -statistics.mode=all -statistics_log.sources=off -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=0 -stress.failpoint_eviction_fail_after_reconciliation=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.sleep_before_read_overflow_onpage=0 -stress.split_1=1 -stress.split_2=1 -stress.split_3=1 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=1 -transaction.implicit=0 -transaction.timestamps=1 -wiredtiger.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=snappy -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=15 -table1.btree.key_max=95 -table1.btree.key_min=18 -table1.btree.leaf_page_max=10 -table1.btree.memory_page_max=7 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=0 -table1.btree.prefix_compression_min=1 -table1.btree.reverse=0 -table1.btree.split_pct=81 -table1.btree.value_max=3914 -table1.btree.value_min=4 -table1.disk.checksum=on -table1.disk.firstfit=0 -table1.ops.pct.delete=35 -table1.ops.pct.insert=9 -table1.ops.pct.modify=18 -table1.ops.pct.read=36 -table1.ops.pct.write=2 -table1.ops.truncate=1 -table1.runs.mirror=1 -table1.runs.source=table -table1.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.compression=zlib -table2.btree.dictionary=0 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=9 -table2.btree.key_max=126 -table2.btree.key_min=23 -table2.btree.leaf_page_max=9 -table2.btree.memory_page_max=8 -table2.btree.prefix_len=0 -table2.btree.prefix_compression=1 -table2.btree.prefix_compression_min=3 -table2.btree.reverse=0 -table2.btree.split_pct=70 -table2.btree.value_max=1847 -table2.btree.value_min=6 -table2.disk.checksum=unencrypted -table2.disk.firstfit=0 -table2.ops.pct.delete=1 -table2.ops.pct.insert=3 -table2.ops.pct.modify=16 -table2.ops.pct.read=78 -table2.ops.pct.write=2 -table2.ops.truncate=1 -table2.runs.mirror=1 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.compression=zstd -table3.btree.dictionary=1 -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=16 -table3.btree.key_max=112 -table3.btree.key_min=29 -table3.btree.leaf_page_max=15 -table3.btree.memory_page_max=1 -table3.btree.prefix_len=0 -table3.btree.prefix_compression=1 -table3.btree.prefix_compression_min=5 -table3.btree.reverse=0 -table3.btree.split_pct=63 -table3.btree.value_max=3771 -table3.btree.value_min=13 -table3.disk.checksum=unencrypted -table3.disk.firstfit=1 -table3.ops.pct.delete=2 -table3.ops.pct.insert=0 -table3.ops.pct.modify=9 -table3.ops.pct.read=21 -table3.ops.pct.write=68 -table3.ops.truncate=1 -table3.runs.mirror=1 -table3.runs.source=table -table3.runs.type=row-store diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10961 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10961 deleted file mode 100644 index 254c16c392e..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-10961 +++ /dev/null @@ -1,166 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=0 -backup.incremental=off -backup.incr_granularity=1487 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=1 -block_cache.size=75 -btree.huffman_value=0 -buffer_alignment=0 -cache=1320 -cache.evict_max=5 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=155 -checkpoint.wait=39 -debug.checkpoint_retention=2 -debug.cursor_reposition=0 -debug.eviction=0 -debug.log_retention=8 -debug.realloc_exact=0 -debug.realloc_malloc=0 -debug.slow_checkpoint=0 -debug.table_logging=0 -debug.update_restore_evict=0 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=off -disk.mmap=1 -disk.mmap_all=0 -file_manager.close_handle_minimum=18 -file_manager.close_idle_time=1 -file_manager.close_scan_interval=2 -format.abort=0 -format.independent_thread_rng=1 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=226874 -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=0 -backup.incremental=off -backup.incr_granularity=1487 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=1 -block_cache.size=75 -btree.huffman_value=0 -buffer_alignment=0 -cache=1320 -cache.evict_max=5 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=155 -checkpoint.wait=39 -debug.checkpoint_retention=2 -debug.cursor_reposition=0 -debug.eviction=0 -debug.log_retention=8 -debug.realloc_exact=0 -debug.realloc_malloc=0 -debug.slow_checkpoint=0 -debug.table_logging=0 -debug.update_restore_evict=0 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=off -disk.mmap=1 -disk.mmap_all=0 -file_manager.close_handle_minimum=18 -file_manager.close_idle_time=1 -file_manager.close_scan_interval=2 -format.abort=0 -format.independent_thread_rng=1 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=226874 -logging.prealloc=1 -logging.remove=1 -ops.alter=0 -ops.compaction=0 -ops.hs_cursor=1 -ops.bound_cursor=0 -ops.prepare=0 -ops.random_cursor=0 -ops.salvage=1 -ops.verify=1 -quiet=1 -random.data_seed=680556 -random.extra_seed=4131426 -runs.in_memory=0 -runs.ops=0 -runs.predictable_replay=0 -runs.rows=1000000 -runs.tables=1 -runs.threads=32 -runs.timer=6 -runs.verify_failure_dump=0 -statistics.mode=fast -statistics_log.sources=off -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=0 -stress.failpoint_eviction_fail_after_reconciliation=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.sleep_before_read_overflow_onpage=0 -stress.split_1=0 -stress.split_2=0 -stress.split_3=0 -stress.split_4=1 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -stress.split_8=0 -tiered_storage.flush_frequency=0 -tiered_storage.storage_source=off -transaction.implicit=40 -transaction.timestamps=0 -wiredtiger.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=none -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=10 -table1.btree.key_max=75 -table1.btree.key_min=20 -table1.btree.leaf_page_max=11 -table1.btree.memory_page_max=1 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=0 -table1.btree.prefix_compression_min=7 -table1.btree.reverse=0 -table1.btree.split_pct=66 -table1.btree.value_max=1418 -table1.btree.value_min=19 -table1.disk.checksum=on -table1.disk.firstfit=0 -table1.ops.pareto=1 -table1.ops.pareto.skew=61 -table1.ops.pct.delete=96 -table1.ops.pct.insert=0 -table1.ops.pct.modify=1 -table1.ops.pct.read=1 -table1.ops.pct.write=2 -table1.ops.truncate=1 -table1.runs.mirror=0 -table1.runs.source=table -table1.runs.type=row-store diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11060 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11060 deleted file mode 100644 index 852f2f6507d..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11060 +++ /dev/null @@ -1,188 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=0 -backup.incremental=off -backup.incr_granularity=2981 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=0 -block_cache.size=27 -btree.huffman_value=0 -buffer_alignment=0 -cache=120 -cache.evict_max=4 -cache.eviction_dirty_target=0 -cache.eviction_dirty_trigger=0 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=170 -checkpoint.wait=25 -debug.checkpoint_retention=10 -debug.cursor_reposition=0 -debug.eviction=0 -debug.log_retention=6 -debug.realloc_exact=0 -debug.realloc_malloc=0 -debug.slow_checkpoint=0 -debug.table_logging=0 -debug.update_restore_evict=0 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=0 -file_manager.close_handle_minimum=4 -file_manager.close_idle_time=9 -file_manager.close_scan_interval=22 -format.abort=0 -format.independent_thread_rng=1 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=211679 -logging.prealloc=0 -logging.remove=1 -ops.alter=0 -ops.compaction=0 -ops.hs_cursor=0 -ops.bound_cursor=0 -ops.prepare=1 -ops.random_cursor=1 -ops.salvage=0 -ops.verify=1 -quiet=1 -random.data_seed=16418622 -random.extra_seed=10025607 -runs.in_memory=0 -runs.ops=50000 -runs.predictable_replay=0 -runs.rows=10000 -runs.tables=3 -runs.threads=4 -runs.timer=6 -runs.verify_failure_dump=0 -statistics.mode=fast -statistics_log.sources=off -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=0 -stress.failpoint_eviction_fail_after_reconciliation=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.prepare_resolution=0 -stress.sleep_before_read_overflow_onpage=0 -stress.split_1=0 -stress.split_2=0 -stress.split_3=0 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -stress.split_8=0 -tiered_storage.flush_frequency=0 -tiered_storage.storage_source=off -transaction.implicit=0 -transaction.timestamps=1 -wiredtiger.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=none -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=11 -table1.btree.key_max=62 -table1.btree.key_min=14 -table1.btree.leaf_page_max=14 -table1.btree.memory_page_max=3 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=1 -table1.btree.prefix_compression_min=7 -table1.btree.reverse=0 -table1.btree.split_pct=88 -table1.btree.value_max=3339 -table1.btree.value_min=15 -table1.disk.checksum=unencrypted -table1.disk.firstfit=0 -table1.ops.pareto=1 -table1.ops.pareto.skew=74 -table1.ops.pct.delete=18 -table1.ops.pct.insert=21 -table1.ops.pct.modify=15 -table1.ops.pct.read=21 -table1.ops.pct.write=25 -table1.ops.truncate=1 -table1.runs.mirror=1 -table1.runs.source=table -table1.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.compression=none -table2.btree.dictionary=0 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=11 -table2.btree.key_max=82 -table2.btree.key_min=21 -table2.btree.leaf_page_max=16 -table2.btree.memory_page_max=8 -table2.btree.prefix_len=0 -table2.btree.prefix_compression=1 -table2.btree.prefix_compression_min=3 -table2.btree.reverse=0 -table2.btree.split_pct=81 -table2.btree.value_max=179 -table2.btree.value_min=19 -table2.disk.checksum=on -table2.disk.firstfit=0 -table2.ops.pareto=0 -table2.ops.pareto.skew=94 -table2.ops.pct.delete=14 -table2.ops.pct.insert=75 -table2.ops.pct.modify=2 -table2.ops.pct.read=8 -table2.ops.pct.write=1 -table2.ops.truncate=1 -table2.runs.mirror=1 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.compression=none -table3.btree.dictionary=1 -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=10 -table3.btree.key_max=112 -table3.btree.key_min=21 -table3.btree.leaf_page_max=13 -table3.btree.memory_page_max=1 -table3.btree.prefix_len=0 -table3.btree.prefix_compression=1 -table3.btree.prefix_compression_min=1 -table3.btree.reverse=0 -table3.btree.split_pct=75 -table3.btree.value_max=2733 -table3.btree.value_min=16 -table3.disk.checksum=on -table3.disk.firstfit=1 -table3.ops.pareto=0 -table3.ops.pareto.skew=20 -table3.ops.pct.delete=13 -table3.ops.pct.insert=22 -table3.ops.pct.modify=14 -table3.ops.pct.read=47 -table3.ops.pct.write=4 -table3.ops.truncate=1 -table3.runs.mirror=0 -table3.runs.source=table -table3.runs.type=row-store diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11064 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11064 deleted file mode 100644 index 7a9a8d3e7ce..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11064 +++ /dev/null @@ -1,229 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=0 -backup.incremental=off -backup.incr_granularity=13161 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=1 -block_cache.size=84 -btree.huffman_value=0 -buffer_alignment=0 -cache=880 -cache.evict_max=2 -cache.eviction_dirty_target=0 -cache.eviction_dirty_trigger=0 -cache.minimum=20 -checkpoint=off -checkpoint.log_size=74 -checkpoint.wait=35 -debug.checkpoint_retention=8 -debug.cursor_reposition=0 -debug.eviction=0 -debug.log_retention=5 -debug.realloc_exact=0 -debug.realloc_malloc=0 -debug.slow_checkpoint=0 -debug.table_logging=0 -debug.update_restore_evict=0 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=0 -file_manager.close_handle_minimum=24 -file_manager.close_idle_time=11 -file_manager.close_scan_interval=16 -format.abort=0 -format.independent_thread_rng=0 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=353587 -logging.prealloc=0 -logging.remove=0 -ops.alter=0 -ops.compaction=0 -ops.hs_cursor=1 -ops.bound_cursor=0 -ops.prepare=1 -ops.random_cursor=0 -ops.salvage=0 -ops.verify=1 -quiet=1 -random.data_seed=4492643 -random.extra_seed=8537229 -runs.in_memory=0 -runs.ops=0 -runs.predictable_replay=0 -runs.rows=1000000 -runs.tables=5 -runs.threads=10 -runs.timer=16 -runs.verify_failure_dump=0 -statistics.mode=fast -statistics_log.sources=off -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=0 -stress.failpoint_eviction_fail_after_reconciliation=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=1 -stress.hs_sweep=0 -stress.prepare_resolution=0 -stress.sleep_before_read_overflow_onpage=0 -stress.split_1=0 -stress.split_2=0 -stress.split_3=0 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -stress.split_8=0 -tiered_storage.flush_frequency=0 -tiered_storage.storage_source=off -transaction.implicit=0 -transaction.timestamps=1 -wiredtiger.config= -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=zstd -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=17 -table1.btree.key_max=52 -table1.btree.key_min=20 -table1.btree.leaf_page_max=13 -table1.btree.memory_page_max=7 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=1 -table1.btree.prefix_compression_min=3 -table1.btree.reverse=0 -table1.btree.split_pct=97 -table1.btree.value_max=1389 -table1.btree.value_min=7 -table1.disk.checksum=on -table1.disk.firstfit=1 -table1.ops.pareto=0 -table1.ops.pareto.skew=91 -table1.ops.pct.delete=0 -table1.ops.pct.insert=35 -table1.ops.pct.modify=0 -table1.ops.pct.read=65 -table1.ops.pct.write=0 -table1.ops.truncate=0 -table1.runs.mirror=0 -table1.runs.source=table -table1.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.bitcnt=4 -table2.btree.compression=none -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=9 -table2.btree.leaf_page_max=13 -table2.btree.memory_page_max=10 -table2.btree.split_pct=76 -table2.disk.checksum=unencrypted -table2.disk.firstfit=0 -table2.ops.pareto=1 -table2.ops.pareto.skew=74 -table2.ops.pct.delete=36 -table2.ops.pct.insert=48 -table2.ops.pct.modify=16 -table2.ops.pct.read=0 -table2.ops.pct.write=0 -table2.ops.truncate=0 -table2.runs.mirror=0 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.bitcnt=8 -table3.btree.compression=zstd -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=17 -table3.btree.leaf_page_max=9 -table3.btree.memory_page_max=9 -table3.btree.split_pct=74 -table3.disk.checksum=off -table3.disk.firstfit=0 -table3.ops.pareto=0 -table3.ops.pareto.skew=28 -table3.ops.pct.delete=14 -table3.ops.pct.insert=14 -table3.ops.pct.modify=2 -table3.ops.pct.read=68 -table3.ops.pct.write=2 -table3.ops.truncate=0 -table3.runs.mirror=0 -table3.runs.source=file -table3.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 4 -############################################ -table4.btree.compression=none -table4.btree.dictionary=0 -table4.btree.internal_key_truncation=1 -table4.btree.internal_page_max=12 -table4.btree.leaf_page_max=11 -table4.btree.memory_page_max=8 -table4.btree.repeat_data_pct=39 -table4.btree.split_pct=57 -table4.btree.value_max=1453 -table4.btree.value_min=19 -table4.disk.checksum=uncompressed -table4.disk.firstfit=0 -table4.ops.pareto=0 -table4.ops.pareto.skew=47 -table4.ops.pct.delete=11 -table4.ops.pct.insert=12 -table4.ops.pct.modify=74 -table4.ops.pct.read=0 -table4.ops.pct.write=3 -table4.ops.truncate=0 -table4.runs.mirror=0 -table4.runs.source=file -table4.runs.type=variable-length column-store -############################################ -# TABLE PARAMETERS: table 5 -############################################ -table5.btree.compression=none -table5.btree.dictionary=0 -table5.btree.internal_key_truncation=1 -table5.btree.internal_page_max=11 -table5.btree.key_max=114 -table5.btree.key_min=13 -table5.btree.leaf_page_max=14 -table5.btree.memory_page_max=6 -table5.btree.prefix_len=0 -table5.btree.prefix_compression=1 -table5.btree.prefix_compression_min=5 -table5.btree.reverse=0 -table5.btree.split_pct=86 -table5.btree.value_max=805 -table5.btree.value_min=14 -table5.disk.checksum=on -table5.disk.firstfit=0 -table5.ops.pareto=0 -table5.ops.pareto.skew=84 -table5.ops.pct.delete=1 -table5.ops.pct.insert=2 -table5.ops.pct.modify=6 -table5.ops.pct.read=84 -table5.ops.pct.write=7 -table5.ops.truncate=0 -table5.runs.mirror=0 -table5.runs.source=table -table5.runs.type=row-store diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11121 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11121 deleted file mode 100644 index ed46a06d435..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11121 +++ /dev/null @@ -1,206 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=1 -assert.write_timestamp=0 -backup=0 -backup.incremental=off -backup.incr_granularity=5027 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=1 -block_cache.size=8 -btree.huffman_value=0 -cache=380 -cache.evict_max=2 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=67 -checkpoint.wait=58 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=0 -format.abort=0 -format.independent_thread_rng=1 -format.major_timeout=0 -import=0 -logging=1 -logging.compression=zlib -logging.file_max=354713 -logging.prealloc=0 -logging.remove=1 -ops.alter=0 -ops.compaction=0 -ops.hs_cursor=0 -ops.prepare=0 -ops.random_cursor=0 -ops.salvage=1 -ops.verify=1 -quiet=1 -runs.in_memory=0 -runs.ops=0 -runs.rows=5000000 -runs.tables=5 -runs.threads=10 -runs.timer=6 -runs.type=variable-length column-store -runs.verify_failure_dump=0 -statistics=0 -statistics.server=0 -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_reserved_txnid_delay=0 -stress.checkpoint_prepare=0 -stress.failpoint_eviction_fail_after_reconciliation=1 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.split_1=0 -stress.split_2=0 -stress.split_3=0 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -transaction.implicit=53 -transaction.timestamps=0 -wiredtiger.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=none -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=17 -table1.btree.key_max=103 -table1.btree.key_min=31 -table1.btree.leaf_page_max=15 -table1.btree.memory_page_max=1 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=1 -table1.btree.prefix_compression_min=8 -table1.btree.reverse=0 -table1.btree.split_pct=51 -table1.btree.value_max=1055 -table1.btree.value_min=9 -table1.disk.checksum=on -table1.disk.firstfit=0 -table1.ops.pct.delete=39 -table1.ops.pct.insert=0 -table1.ops.pct.modify=54 -table1.ops.pct.read=0 -table1.ops.pct.write=7 -table1.ops.truncate=1 -table1.runs.source=file -table1.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.compression=none -table2.btree.dictionary=1 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=10 -table2.btree.key_max=77 -table2.btree.key_min=32 -table2.btree.leaf_page_max=15 -table2.btree.memory_page_max=1 -table2.btree.prefix_len=0 -table2.btree.prefix_compression=1 -table2.btree.prefix_compression_min=5 -table2.btree.reverse=0 -table2.btree.split_pct=92 -table2.btree.value_max=2647 -table2.btree.value_min=10 -table2.disk.checksum=unencrypted -table2.disk.firstfit=0 -table2.ops.pct.delete=26 -table2.ops.pct.insert=11 -table2.ops.pct.modify=3 -table2.ops.pct.read=28 -table2.ops.pct.write=32 -table2.ops.truncate=1 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.compression=snappy -table3.btree.dictionary=0 -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=12 -table3.btree.key_max=84 -table3.btree.key_min=21 -table3.btree.leaf_page_max=10 -table3.btree.memory_page_max=1 -table3.btree.prefix_len=0 -table3.btree.prefix_compression=0 -table3.btree.prefix_compression_min=8 -table3.btree.reverse=0 -table3.btree.split_pct=69 -table3.btree.value_max=413 -table3.btree.value_min=19 -table3.disk.checksum=on -table3.disk.firstfit=0 -table3.ops.pct.delete=0 -table3.ops.pct.insert=65 -table3.ops.pct.modify=0 -table3.ops.pct.read=34 -table3.ops.pct.write=1 -table3.ops.truncate=1 -table3.runs.source=table -table3.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 4 -############################################ -table4.btree.compression=snappy -table4.btree.dictionary=0 -table4.btree.internal_key_truncation=1 -table4.btree.internal_page_max=10 -table4.btree.leaf_page_max=10 -table4.btree.memory_page_max=10 -table4.btree.repeat_data_pct=20 -table4.btree.split_pct=68 -table4.btree.value_max=52 -table4.btree.value_min=12 -table4.disk.checksum=unencrypted -table4.disk.firstfit=0 -table4.ops.pct.delete=0 -table4.ops.pct.insert=50 -table4.ops.pct.modify=0 -table4.ops.pct.read=0 -table4.ops.pct.write=50 -table4.ops.truncate=1 -table4.runs.source=table -############################################ -# TABLE PARAMETERS: table 5 -############################################ -table5.btree.compression=none -table5.btree.dictionary=0 -table5.btree.internal_key_truncation=1 -table5.btree.internal_page_max=11 -table5.btree.key_max=127 -table5.btree.key_min=20 -table5.btree.leaf_page_max=9 -table5.btree.memory_page_max=6 -table5.btree.prefix_len=0 -table5.btree.prefix_compression=0 -table5.btree.prefix_compression_min=7 -table5.btree.reverse=0 -table5.btree.split_pct=85 -table5.btree.value_max=4094 -table5.btree.value_min=12 -table5.disk.checksum=unencrypted -table5.disk.firstfit=1 -table5.ops.pct.delete=93 -table5.ops.pct.insert=4 -table5.ops.pct.modify=1 -table5.ops.pct.read=2 -table5.ops.pct.write=0 -table5.ops.truncate=1 -table5.runs.source=table -table5.runs.type=row-store diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11845 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11845 deleted file mode 100644 index 7fa922bb0b7..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-11845 +++ /dev/null @@ -1,289 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -background_compact=0 -background_compact.free_space_target=11 -backup=0 -backup.incremental=off -backup.incr_granularity=512 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=0 -block_cache.size=7 -btree.huffman_value=0 -buffer_alignment=0 -cache=2310 -cache.evict_max=4 -cache.eviction_dirty_target=0 -cache.eviction_dirty_trigger=0 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=103 -checkpoint.wait=85 -chunk_cache=0 -chunk_cache.capacity=265 -chunk_cache.chunk_size=39 -chunk_cache.storage_path=off -chunk_cache.type=off -compact.free_space_target=72 -debug.checkpoint_retention=7 -debug.cursor_reposition=0 -debug.eviction=0 -debug.log_retention=0 -debug.realloc_exact=0 -debug.realloc_malloc=0 -debug.slow_checkpoint=0 -debug.table_logging=0 -debug.update_restore_evict=0 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=0 -file_manager.close_handle_minimum=29 -file_manager.close_idle_time=5 -file_manager.close_scan_interval=27 -format.abort=0 -format.independent_thread_rng=1 -format.major_timeout=0 -import=0 -logging=1 -logging.compression=none -logging.file_max=271721 -logging.prealloc=0 -logging.remove=1 -ops.alter=1 -ops.compaction=0 -ops.hs_cursor=1 -ops.bound_cursor=0 -ops.prepare=0 -ops.random_cursor=0 -ops.salvage=0 -ops.throttle=0 -ops.throttle.sleep_us=286067 -ops.verify=1 -quiet=1 -random.data_seed=1478940 -random.extra_seed=15668881 -runs.in_memory=0 -runs.ops=0 -runs.predictable_replay=0 -runs.rows=1000000 -runs.tables=7 -runs.threads=32 -runs.timer=11 -runs.verify_failure_dump=0 -statistics.mode=fast -statistics_log.sources=off -stress.aggressive_stash_free=0 -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_prepare=0 -stress.compact_slow=0 -stress.evict_reposition=0 -stress.failpoint_eviction_split=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.prepare_resolution_1=0 -stress.sleep_before_read_overflow_onpage=0 -stress.split_1=0 -stress.split_2=0 -stress.split_3=0 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -stress.split_8=0 -tiered_storage.flush_frequency=0 -tiered_storage.storage_source=off -transaction.implicit=0 -transaction.operation_timeout_ms=2000 -transaction.timestamps=0 -wiredtiger.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=none -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=13 -table1.btree.key_max=20 -table1.btree.key_min=18 -table1.btree.leaf_page_max=11 -table1.btree.memory_page_max=3 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=1 -table1.btree.prefix_compression_min=2 -table1.btree.reverse=0 -table1.btree.split_pct=99 -table1.btree.value_max=2392 -table1.btree.value_min=9 -table1.disk.checksum=unencrypted -table1.disk.firstfit=0 -table1.ops.pareto=0 -table1.ops.pareto.skew=8 -table1.ops.pct.delete=16 -table1.ops.pct.insert=10 -table1.ops.pct.modify=5 -table1.ops.pct.read=28 -table1.ops.pct.write=41 -table1.ops.truncate=1 -table1.runs.mirror=1 -table1.runs.source=table -table1.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.compression=none -table2.btree.dictionary=0 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=15 -table2.btree.leaf_page_max=17 -table2.btree.memory_page_max=9 -table2.btree.split_pct=78 -table2.btree.value_max=469 -table2.btree.value_min=13 -table2.disk.checksum=unencrypted -table2.disk.firstfit=0 -table2.ops.pareto=0 -table2.ops.pareto.skew=93 -table2.ops.pct.delete=25 -table2.ops.pct.insert=10 -table2.ops.pct.modify=1 -table2.ops.pct.read=57 -table2.ops.pct.write=7 -table2.ops.truncate=1 -table2.runs.mirror=1 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.compression=none -table3.btree.dictionary=0 -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=15 -table3.btree.leaf_page_max=17 -table3.btree.memory_page_max=9 -table3.btree.split_pct=78 -table3.btree.value_max=469 -table3.btree.value_min=13 -table3.disk.checksum=unencrypted -table3.disk.firstfit=0 -table3.ops.pareto=0 -table3.ops.pareto.skew=93 -table3.ops.pct.delete=25 -table3.ops.pct.insert=10 -table3.ops.pct.modify=1 -table3.ops.pct.read=57 -table3.ops.pct.write=7 -table3.ops.truncate=1 -table3.runs.mirror=1 -table3.runs.source=table -table3.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 4 -############################################ -table4.btree.compression=none -table4.btree.dictionary=0 -table4.btree.internal_key_truncation=1 -table4.btree.internal_page_max=15 -table4.btree.leaf_page_max=17 -table4.btree.memory_page_max=9 -table4.btree.split_pct=78 -table4.btree.value_max=469 -table4.btree.value_min=13 -table4.disk.checksum=unencrypted -table4.disk.firstfit=0 -table4.ops.pareto=0 -table4.ops.pareto.skew=93 -table4.ops.pct.delete=25 -table4.ops.pct.insert=10 -table4.ops.pct.modify=1 -table4.ops.pct.read=57 -table4.ops.pct.write=7 -table4.ops.truncate=1 -table4.runs.mirror=1 -table4.runs.source=table -table4.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 5 -############################################ -table5.btree.compression=none -table5.btree.dictionary=0 -table5.btree.internal_key_truncation=1 -table5.btree.internal_page_max=15 -table5.btree.leaf_page_max=17 -table5.btree.memory_page_max=9 -table5.btree.split_pct=78 -table5.btree.value_max=469 -table5.btree.value_min=13 -table5.disk.checksum=unencrypted -table5.disk.firstfit=0 -table5.ops.pareto=0 -table5.ops.pareto.skew=93 -table5.ops.pct.delete=25 -table5.ops.pct.insert=10 -table5.ops.pct.modify=1 -table5.ops.pct.read=57 -table5.ops.pct.write=7 -table5.ops.truncate=1 -table5.runs.mirror=1 -table5.runs.source=table -table5.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 6 -############################################ -table6.btree.compression=none -table6.btree.dictionary=0 -table6.btree.internal_key_truncation=1 -table6.btree.internal_page_max=15 -table6.btree.leaf_page_max=17 -table6.btree.memory_page_max=9 -table6.btree.split_pct=78 -table6.btree.value_max=469 -table6.btree.value_min=13 -table6.disk.checksum=unencrypted -table6.disk.firstfit=0 -table6.ops.pareto=0 -table6.ops.pareto.skew=93 -table6.ops.pct.delete=25 -table6.ops.pct.insert=10 -table6.ops.pct.modify=1 -table6.ops.pct.read=57 -table6.ops.pct.write=7 -table6.ops.truncate=1 -table6.runs.mirror=1 -table6.runs.source=table -table6.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 7 -############################################ -table7.btree.compression=none -table7.btree.dictionary=0 -table7.btree.internal_key_truncation=1 -table7.btree.internal_page_max=15 -table7.btree.leaf_page_max=17 -table7.btree.memory_page_max=9 -table7.btree.split_pct=78 -table7.btree.value_max=469 -table7.btree.value_min=13 -table7.disk.checksum=unencrypted -table7.disk.firstfit=0 -table7.ops.pareto=0 -table7.ops.pareto.skew=93 -table7.ops.pct.delete=25 -table7.ops.pct.insert=10 -table7.ops.pct.modify=1 -table7.ops.pct.read=57 -table7.ops.pct.write=7 -table7.ops.truncate=1 -table7.runs.mirror=1 -table7.runs.source=table -table7.runs.type=row-store diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9751 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9751 deleted file mode 100644 index 8ff2a91c49d..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9751 +++ /dev/null @@ -1,138 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -assert.write_timestamp=0 -backup=0 -backup.incremental=off -backup.incr_granularity=8115 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=0 -block_cache.size=53 -btree.compression=none -cache=336 -cache.evict_max=2 -cache.minimum=40 -checkpoint=on -checkpoint.log_size=79 -checkpoint.wait=40 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=0 -format.abort=0 -format.independent_thread_rng=0 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=481991 -logging.prealloc=0 -logging.remove=1 -ops.alter=0 -ops.compaction=0 -ops.hs_cursor=0 -ops.prepare=0 -ops.random_cursor=1 -ops.salvage=0 -ops.verify=1 -quiet=1 -runs.in_memory=0 -runs.ops=0 -runs.rows=100000 -runs.source=table -runs.tables=3 -runs.threads=6 -runs.timer=1 -runs.type=variable-length column-store -runs.verify_failure_dump=0 -statistics=0 -statistics.server=1 -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_reserved_txnid_delay=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=0 -stress.failpoint_eviction_fail_after_reconciliation=1 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.split_1=0 -stress.split_2=0 -stress.split_3=0 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -transaction.implicit=0 -transaction.timestamps=1 -wiredtiger.config=off -wiredtiger.rwlock=0 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.dictionary=1 -table1.btree.huffman_value=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=17 -table1.btree.leaf_page_max=9 -table1.btree.memory_page_max=8 -table1.btree.repeat_data_pct=87 -table1.btree.split_pct=60 -table1.btree.value_max=1299 -table1.btree.value_min=12 -table1.disk.checksum=on -table1.disk.firstfit=0 -table1.ops.pct.delete=77 -table1.ops.pct.insert=4 -table1.ops.pct.modify=12 -table1.ops.pct.read=1 -table1.ops.pct.write=6 -table1.ops.truncate=1 -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.dictionary=0 -table2.btree.huffman_value=0 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=14 -table2.btree.leaf_page_max=11 -table2.btree.memory_page_max=7 -table2.btree.repeat_data_pct=89 -table2.btree.split_pct=67 -table2.btree.value_max=3716 -table2.btree.value_min=11 -table2.disk.checksum=unencrypted -table2.disk.firstfit=0 -table2.ops.pct.delete=20 -table2.ops.pct.insert=1 -table2.ops.pct.modify=7 -table2.ops.pct.read=72 -table2.ops.pct.write=0 -table2.ops.truncate=1 -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.dictionary=0 -table3.btree.huffman_value=0 -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=17 -table3.btree.leaf_page_max=12 -table3.btree.memory_page_max=9 -table3.btree.repeat_data_pct=12 -table3.btree.split_pct=54 -table3.btree.value_max=2929 -table3.btree.value_min=8 -table3.disk.checksum=on -table3.disk.firstfit=0 -table3.ops.pct.delete=34 -table3.ops.pct.insert=45 -table3.ops.pct.modify=1 -table3.ops.pct.read=0 -table3.ops.pct.write=20 -table3.ops.truncate=1 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 deleted file mode 100644 index 4889602e518..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 +++ /dev/null @@ -1,160 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=1 -backup.incremental=off -backup.incr_granularity=11461 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=0 -block_cache.size=47 -btree.huffman_value=0 -cache=612 -cache.evict_max=1 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=167 -checkpoint.wait=32 -disk.data_extend=0 -disk.direct_io=0 -disk.encryption=none -disk.mmap=1 -disk.mmap_all=0 -format.abort=0 -format.independent_thread_rng=0 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=199668 -logging.prealloc=0 -logging.remove=0 -ops.alter=0 -ops.compaction=1 -ops.hs_cursor=1 -ops.prepare=0 -ops.random_cursor=0 -ops.salvage=0 -ops.verify=1 -quiet=1 -runs.in_memory=0 -runs.ops=0 -runs.rows=1000000 -runs.tables=3 -runs.threads=16 -runs.timer=6 -runs.verify_failure_dump=0 -statistics=0 -statistics.server=0 -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_reserved_txnid_delay=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=1 -stress.failpoint_eviction_fail_after_reconciliation=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.split_1=0 -stress.split_2=1 -stress.split_3=0 -stress.split_4=0 -stress.split_5=0 -stress.split_6=0 -stress.split_7=0 -transaction.implicit=0 -transaction.timestamps=1 -wiredtiger.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=snappy -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=15 -table1.btree.key_max=24 -table1.btree.key_min=14 -table1.btree.leaf_page_max=11 -table1.btree.memory_page_max=8 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=0 -table1.btree.prefix_compression_min=7 -table1.btree.reverse=0 -table1.btree.split_pct=94 -table1.btree.value_max=1513 -table1.btree.value_min=1 -table1.disk.checksum=unencrypted -table1.disk.firstfit=0 -table1.ops.pct.delete=3 -table1.ops.pct.insert=63 -table1.ops.pct.modify=3 -table1.ops.pct.read=9 -table1.ops.pct.write=22 -table1.ops.truncate=1 -table1.runs.mirror=0 -table1.runs.source=file -table1.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.compression=zlib -table2.btree.dictionary=0 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=12 -table2.btree.key_max=115 -table2.btree.key_min=22 -table2.btree.leaf_page_max=12 -table2.btree.memory_page_max=9 -table2.btree.prefix_len=0 -table2.btree.prefix_compression=1 -table2.btree.prefix_compression_min=7 -table2.btree.reverse=0 -table2.btree.split_pct=86 -table2.btree.value_max=37 -table2.btree.value_min=16 -table2.disk.checksum=on -table2.disk.firstfit=1 -table2.ops.pct.delete=12 -table2.ops.pct.insert=0 -table2.ops.pct.modify=2 -table2.ops.pct.read=60 -table2.ops.pct.write=26 -table2.ops.truncate=1 -table2.runs.mirror=0 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.compression=zstd -table3.btree.dictionary=0 -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=11 -table3.btree.key_max=68 -table3.btree.key_min=21 -table3.btree.leaf_page_max=13 -table3.btree.memory_page_max=1 -table3.btree.prefix_len=41 -table3.btree.prefix_compression=1 -table3.btree.prefix_compression_min=2 -table3.btree.reverse=0 -table3.btree.split_pct=86 -table3.btree.value_max=239 -table3.btree.value_min=9 -table3.disk.checksum=unencrypted -table3.disk.firstfit=0 -table3.ops.pct.delete=50 -table3.ops.pct.insert=2 -table3.ops.pct.modify=1 -table3.ops.pct.read=3 -table3.ops.pct.write=44 -table3.ops.truncate=1 -table3.runs.mirror=0 -table3.runs.source=table -table3.runs.type=row-store - diff --git a/src/third_party/wiredtiger/test/format/format.sh b/src/third_party/wiredtiger/test/format/format.sh index dd9e10ab89d..861ded0890a 100755 --- a/src/third_party/wiredtiger/test/format/format.sh +++ b/src/third_party/wiredtiger/test/format/format.sh @@ -367,28 +367,6 @@ report_failure() echo "$name: failure status reported" > $dir/$status } -# Wait for a process to die. Handle both child and non-child processes. -# $1 pid -# Return <exit code> of process if child or 127 if non-child -wait_for_process() -{ - pid=$1 - ret=127 - - if [ `pstree -p $$ | grep -w $pid | wc -l` -gt "0" ]; then - # Can still produce "wait: pid XXXX is not a child of this shell" due to process - # ending between the steps, can be safely ignored. - wait $pid - ret=$? - else - while [ -d "/proc/$pid/" ]; do - sleep 1 - done - fi - - return $ret -} - # Resolve/cleanup completed jobs. resolve() { @@ -421,28 +399,17 @@ resolve() } # Kill the process group to catch any child processes. - if [ `ps -eo ppid | grep -w $pid | wc -l` -gt "0" ]; then - kill -KILL -- -$pid - fi - # Kill the process. - kill -KILL $pid - wait_for_process $pid - msg "job in $dir killed" + kill -KILL -- -$pid + wait $pid # Remove jobs we killed, they count as neither success or failure. rm -rf $dir $log continue } - wait_for_process $pid + wait $pid eret=$? - # Check for Sanitizer failures, have to do this prior to success because both can be reported. - grep -E -i 'Sanitizer' $log > /dev/null && { - report_failure $dir - continue - } - # Remove successful jobs. grep 'successful run completed' $log > /dev/null && { rm -rf $dir $log @@ -501,7 +468,7 @@ resolve() continue } - # Check for the library abort message or an error from format. + # Check for the library abort message, or an error from format. grep -E \ 'aborting WiredTiger library|format alarm timed out|run FAILED' \ $log > /dev/null && { diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c index 00762181a44..dc91c759bf1 100644 --- a/src/third_party/wiredtiger/test/format/wts.c +++ b/src/third_party/wiredtiger/test/format/wts.c @@ -147,61 +147,40 @@ static WT_EVENT_HANDLER event_handler = { * Configure stressing settings. */ static void -configure_timing_stress(char **p, size_t max) +configure_timing_stress(char *p, size_t max) { - CONFIG_APPEND(*p, ",timing_stress_for_test=["); + CONFIG_APPEND(p, ",timing_stress_for_test=["); if (GV(STRESS_AGGRESSIVE_SWEEP)) - CONFIG_APPEND(*p, ",aggressive_sweep"); + CONFIG_APPEND(p, ",aggressive_sweep"); if (GV(STRESS_CHECKPOINT)) - CONFIG_APPEND(*p, ",checkpoint_slow"); + CONFIG_APPEND(p, ",checkpoint_slow"); if (GV(STRESS_CHECKPOINT_PREPARE)) - CONFIG_APPEND(*p, ",prepare_checkpoint_delay"); + CONFIG_APPEND(p, ",prepare_checkpoint_delay"); if (GV(STRESS_CHECKPOINT_RESERVED_TXNID_DELAY)) - CONFIG_APPEND(*p, ",checkpoint_reserved_txnid_delay"); - if (GV(STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION)) - CONFIG_APPEND(*p, ",failpoint_eviction_fail_after_reconciliation"); + CONFIG_APPEND(p, ",checkpoint_reserved_txnid_delay"); if (GV(STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS)) - CONFIG_APPEND(*p, ",failpoint_history_store_delete_key_from_ts"); + CONFIG_APPEND(p, ",failpoint_history_store_delete_key_from_ts"); if (GV(STRESS_HS_CHECKPOINT_DELAY)) - CONFIG_APPEND(*p, ",history_store_checkpoint_delay"); + CONFIG_APPEND(p, ",history_store_checkpoint_delay"); if (GV(STRESS_HS_SEARCH)) - CONFIG_APPEND(*p, ",history_store_search"); + CONFIG_APPEND(p, ",history_store_search"); if (GV(STRESS_HS_SWEEP)) - CONFIG_APPEND(*p, ",history_store_sweep_race"); - if (GV(STRESS_PREPARE_RESOLUTION)) - CONFIG_APPEND(*p, ",prepare_resolution"); + CONFIG_APPEND(p, ",history_store_sweep_race"); if (GV(STRESS_SPLIT_1)) - CONFIG_APPEND(*p, ",split_1"); + CONFIG_APPEND(p, ",split_1"); if (GV(STRESS_SPLIT_2)) - CONFIG_APPEND(*p, ",split_2"); + CONFIG_APPEND(p, ",split_2"); if (GV(STRESS_SPLIT_3)) - CONFIG_APPEND(*p, ",split_3"); + CONFIG_APPEND(p, ",split_3"); if (GV(STRESS_SPLIT_4)) - CONFIG_APPEND(*p, ",split_4"); + CONFIG_APPEND(p, ",split_4"); if (GV(STRESS_SPLIT_5)) - CONFIG_APPEND(*p, ",split_5"); + CONFIG_APPEND(p, ",split_5"); if (GV(STRESS_SPLIT_6)) - CONFIG_APPEND(*p, ",split_6"); + CONFIG_APPEND(p, ",split_6"); if (GV(STRESS_SPLIT_7)) - CONFIG_APPEND(*p, ",split_7"); - CONFIG_APPEND(*p, "]"); -} - -/* - * configure_file_manager -- - * Configure file manager settings. - */ -static void -configure_file_manager(char **p, size_t max) -{ - CONFIG_APPEND(*p, ",file_manager=["); - if (GV(FILE_MANAGER_CLOSE_HANDLE_MINIMUM) != 0) - CONFIG_APPEND(*p, ",close_handle_minimum=%" PRIu32, GV(FILE_MANAGER_CLOSE_HANDLE_MINIMUM)); - if (GV(FILE_MANAGER_CLOSE_IDLE_TIME) != 0) - CONFIG_APPEND(*p, ",close_idle_time=%" PRIu32, GV(FILE_MANAGER_CLOSE_IDLE_TIME)); - if (GV(FILE_MANAGER_CLOSE_SCAN_INTERVAL) != 0) - CONFIG_APPEND(*p, ",close_scan_interval=%" PRIu32, GV(FILE_MANAGER_CLOSE_SCAN_INTERVAL)); - CONFIG_APPEND(*p, "]"); + CONFIG_APPEND(p, ",split_7"); + CONFIG_APPEND(p, "]"); } /* @@ -296,10 +275,7 @@ create_database(const char *home, WT_CONNECTION **connp) CONFIG_APPEND(p, ",statistics=(%s)", GV(STATISTICS) ? "fast" : "none"); /* Optional timing stress. */ - configure_timing_stress(&p, max); - - /* Optional file manager. */ - configure_file_manager(&p, max); + configure_timing_stress(p, max); /* Extensions. */ CONFIG_APPEND(p, ",extensions=[\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"],", @@ -499,10 +475,7 @@ wts_open(const char *home, WT_CONNECTION **connp, WT_SESSION **sessionp, bool al CONFIG_APPEND(p, ",error_prefix=\"%s\"", progname); /* Optional timing stress. */ - configure_timing_stress(&p, max); - - /* Optional file manager. */ - configure_file_manager(&p, max); + configure_timing_stress(p, max); /* If in-memory, there's only a single, shared WT_CONNECTION handle. */ if (GV(RUNS_IN_MEMORY) != 0) diff --git a/src/third_party/wiredtiger/test/packing/intpack-test3.c b/src/third_party/wiredtiger/test/packing/intpack-test3.c index 6e6ceec158e..4c168f8a83e 100644 --- a/src/third_party/wiredtiger/test/packing/intpack-test3.c +++ b/src/third_party/wiredtiger/test/packing/intpack-test3.c @@ -72,7 +72,7 @@ test_value(int64_t val) ", got %" WT_SIZET_FMT "\n", sinput, used_len, cp > p ? used_len + (size_t)(cp - p) : /* More than buf used */ - used_len - (size_t)(p - cp)); /* Less than buf used */ + used_len - (size_t)(p - cp)); /* Less than buf used */ abort(); } diff --git a/src/third_party/wiredtiger/test/suite/test_app_thread_evict01.py b/src/third_party/wiredtiger/test/suite/test_app_thread_evict01.py deleted file mode 100644 index cf0c573bf49..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_app_thread_evict01.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wtscenario import make_scenarios - -# test_app_thread_evict01.py -# Test to trigger application threads to perform eviction. -class test_app_thread_evict01(wttest.WiredTigerTestCase): - uri = "table:test_app_thread_evict001" - format_values = [ - ('row_integer', dict(key_format='i', value_format='S')), - ] - - # 100MB cache, 52MB trigger, 50MB target - conn_config = "cache_size=100MB,statistics=(all),statistics_log=(wait=1,json=true,on_close=true)," \ - "eviction=(threads_max=1)," \ - "eviction_updates_trigger=52,eviction_dirty_trigger=52,eviction_trigger=52," \ - "eviction_updates_target=50,eviction_dirty_target=50,eviction_target=50," - - scenarios = make_scenarios(format_values) - - def get_stat(self, stat): - stat_cursor = self.session.open_cursor('statistics:') - val = stat_cursor[stat][2] - stat_cursor.close() - return val - - def test_app_thread_evict01(self): - format='key_format={},value_format={}'.format(self.key_format, self.value_format) - self.session.create(self.uri, format) - - # For our target stat to be incremented we need our application thread to evict a page, but - # this is probabilistic as the application thread is always racing against the internal - # eviction threads. Give the application thread a few chances to beat the internal thread - for _ in range(0, 20): - # Insert 40MB of data and perform lots of small inserts so we'll have a lot of - # pages to evict. We are below target levels so no eviction takes place - cursor = self.session.open_cursor(self.uri) - for i in range(40 * 1024): - cursor[i+1] = 'a' * 1024 - - # Perform two large updates. The first causes us to exceed trigger levels, - # and on the second insert the app thread is pulled into eviction since - # trigger levels are exceeded. - self.session.begin_transaction() - cursor[100001] = 'a' * 20 * 1024 * 1024 - cursor[100002] = 'a' * 20 * 1024 * 1024 - self.session.commit_transaction() - - num_app_evict_snapshot_refreshed = self.get_stat(wiredtiger.stat.conn.application_evict_snapshot_refreshed) - cursor.close() - - if num_app_evict_snapshot_refreshed > 0: - break - - self.assertGreater(self.get_stat(wiredtiger.stat.conn.application_evict_snapshot_refreshed), 0) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_backup29.py b/src/third_party/wiredtiger/test/suite/test_backup29.py deleted file mode 100644 index 5cbce78e321..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_backup29.py +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import os, re, time -from wtscenario import make_scenarios -from wtbackup import backup_base -from wiredtiger import stat - -# test_backup29.py -# Test interaction between checkpoint and incremental backup. There was a bug in -# maintaining the incremental backup bitmaps correctly after opening an uncached dhandle. -# This test reconstructs the failure scenario and verifies correct behavior both when a -# restart and when dhandle sweep lead to opening an uncached dhandle. -class test_backup29(backup_base): - conn_config = 'file_manager=(close_handle_minimum=0,' + \ - 'close_idle_time=3,close_scan_interval=1),' + \ - 'statistics=(fast)' - create_config = 'allocation_size=512,key_format=i,value_format=S' - # Backup directory name. Uncomment if actually taking a backup. - # dir='backup.dir' - uri1 = 'test_first' - uri2 = 'test_second' - file1_uri = 'file:' + uri1 + '.wt' - file2_uri = 'file:' + uri2 + '.wt' - table1_uri = 'table:' + uri1 - table2_uri = 'table:' + uri2 - active_uri = 'table:active.wt' - - value_base = '-abcdefghijkl' - - few = 100 - nentries = 5000 - - def get_open_file_count(self): - stat_cursor = self.session.open_cursor('statistics:', None, None) - n = stat_cursor[stat.conn.file_open][2] - stat_cursor.close() - return n - - def parse_blkmods(self, uri): - meta_cursor = self.session.open_cursor('metadata:') - config = meta_cursor[uri] - meta_cursor.close() - # The search string looks like: ,blocks=feffff1f000000000000000000000000 - # Obtain just the hex string. - b = re.search(',blocks=(\w+)', config) - self.assertTrue(b is not None) - # The bitmap string after the = is in group 1. - blocks = b.group(1) - self.pr("block bitmap: " + blocks) - return blocks - - def compare_bitmap(self, orig, new): - # Compare the bitmaps from the metadata. Once a bit is set, it should never - # be cleared. But new bits could be set. So the check is only: if the original - # bitmap has a bit set then the current bitmap must be set for that bit also. - # - # First convert both bitmaps to a binary string, accounting for any possible leading - # zeroes (that would be truncated off). Then compare bit by bit. - orig_bits = bin(int('1'+orig, 16))[3:] - new_bits = bin(int('1'+new, 16))[3:] - self.pr("Original bitmap in binary: " + orig_bits) - self.pr("Reopened bitmap in binary: " + new_bits) - for o_bit, n_bit in zip(orig_bits, new_bits): - if o_bit != '0': - self.assertTrue(n_bit != '0') - - def setup_test(self): - # Create and populate the tables. - self.session.create(self.table1_uri, self.create_config) - self.session.create(self.table2_uri, self.create_config) - c1 = self.session.open_cursor(self.table1_uri) - c2 = self.session.open_cursor(self.table2_uri) - # Only add a few entries. - self.pr("Write: " + str(self.few) + " initial data items") - for i in range(1, self.few): - val = str(i) + self.value_base - c1[i] = val - c2[i] = val - self.session.checkpoint() - - # Take the initial full backup for incremental. We don't actually need to - # take the backup, we only need to open and close the backup cursor to have - # the library keep track of the bitmaps. - config = 'incremental=(enabled,granularity=4k,this_id="ID1")' - bkup_c = self.session.open_cursor('backup:', None, config) - # Uncomment these lines if actually taking the full backup is helpful for debugging. - # os.mkdir(self.dir) - # self.take_full_backup(self.dir, bkup_c) - bkup_c.close() - - # Add a lot more data to both tables to generate a filled-in block mod bitmap. - last_i = self.few - self.pr("Write: " + str(self.nentries) + " additional data items") - for i in range(self.few, self.nentries): - val = str(i) + self.value_base - c1[i] = val - c2[i] = val - c1.close() - c2.close() - self.session.checkpoint() - # Get the block mod bitmap from the file URI. - self.orig1_bitmap = self.parse_blkmods(self.file1_uri) - self.orig2_bitmap = self.parse_blkmods(self.file2_uri) - - - def incr_backup_and_validate(self): - # After reopening we want to open both tables, but only modify one of them for - # the first checkpoint. Then modify the other table, checkpoint, and then check the - # that the block mod bitmap remains correct for the other table. - c1 = self.session.open_cursor(self.table1_uri) - c2 = self.session.open_cursor(self.table2_uri) - last_i = self.nentries - - # Change the first table and checkpoint. Keep the second table clean. - self.pr("Update only table 1: " + str(last_i)) - val = str(last_i) + self.value_base - c1[last_i] = val - self.session.checkpoint() - new1_bitmap = self.parse_blkmods(self.file1_uri) - - # Now change the second table and checkpoint again. - self.pr("Update second table: " + str(last_i)) - c2[last_i] = val - self.session.checkpoint() - new2_bitmap = self.parse_blkmods(self.file2_uri) - - c1.close() - c2.close() - - self.compare_bitmap(self.orig1_bitmap, new1_bitmap) - self.compare_bitmap(self.orig2_bitmap, new2_bitmap) - - def test_backup29_reopen(self): - self.setup_test() - - self.pr("CLOSE and REOPEN conn") - self.reopen_conn() - self.pr("Reopened conn") - - self.incr_backup_and_validate() - - def test_backup29_sweep(self): - self.setup_test() - - self.pr("Waiting to sweep handles") - # Create another table and populate it, and checkpoint. - self.session.create(self.active_uri, self.create_config) - c = self.session.open_cursor(self.active_uri) - for i in range(1, self.few): - c[i] = str(i) + self.value_base - self.session.checkpoint() - - sleep = 0 - max = 20 - # The only files sweep won't close should be the metadata, the history store, the - # lock file, and our active file. - final_nfile = 4 - - # Keep updating and checkpointing this table until all other handles have been swept. - # The checkpoints have the side effect of sweeping the session cache, which will allow - # dhandles to be closed. - while sleep < max: - i = i + 1 - c[i] = str(i) + self.value_base - self.session.checkpoint() - sleep += 0.5 - time.sleep(0.5) - nfile = self.get_open_file_count() - if nfile == final_nfile: - break - c.close() - - # Make sure we swept everything before we ran out of time. - self.assertEqual(nfile, final_nfile) - self.pr("Sweep done") - - self.incr_backup_and_validate() - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_bug029.py b/src/third_party/wiredtiger/test/suite/test_bug029.py deleted file mode 100644 index b2d9e1c6ac4..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_bug029.py +++ /dev/null @@ -1,112 +0,0 @@ - -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# [TEST_TAGS] -# checkpoint:recovery -# [END_TAGS] - -import wttest -import os, shutil - -# test_bug029.py -# -# Test that WT correctly propogates the most recent checkpoint time -# across restarts. We validate this by reproducing the original bug -# from WT-9457: frequent checkpoints pushed the checkpoint clock time -# into the future such that immediately after a restart a backup could -# see its checkpoint deleted out from under it. The result was fatal -# read errors when restoring the backup. - -class test_bug029(wttest.WiredTigerTestCase): - conn_config = ("cache_size=50MB") - uri = "table:test_bug029" - bigvalue = "WiredTiger" * 100 - backup_dir = "backup_dir" - - def add_data(self, uri, start, count): - cursor = self.session.open_cursor(uri, None) - for i in range(start, start + count): - cursor[i] = self.bigvalue - cursor.close() - - def test_bug029(self): - # Create and populate table - self.session.create(self.uri, "key_format=i,value_format=S") - self.add_data(self.uri, 0, 2000) - self.session.checkpoint() - - # Force the checkpoint time forward with a lot of quick checkpoints. - for i in range(100): - self.session.checkpoint("force=1") - - # Add more data and checkpoint again. This creates a bunch of pages - # in the final checkpoint that can be deleted and reused if we hit - # the bug. - self.add_data(self.uri, 2000, 2000) - self.session.checkpoint() - - # Shutdown and reopen. - self.reopen_conn() - - self.add_data(self.uri, 0, 100) - - # Open a backup cursor and force a few checkpoints. This will allow - # WT to delete older checkpoints, but as long as the backup cursor - # is open, it shouldn't delete the backup checkpoint---unless we hit - # the bug. - backup_cursor = self.session.open_cursor('backup:') - - for i in range(10): - self.session.checkpoint("force=1") - - # Write and checkpoint a bunch of data. If we erroneously deleted our - # backup checkpoint this should overwrite some of that checkpoint's - # blocks. - self.add_data(self.uri, 1000, 2000) - self.session.checkpoint() - - # Now do the backup. - os.mkdir(self.backup_dir) - while True: - ret = backup_cursor.next() - if ret != 0: - break - shutil.copy(backup_cursor.get_key(), self.backup_dir) - backup_cursor.close() - - # Open the backup and read data. If the backup snapshot was corrupted - # we will panic and die here. - backup_conn = self.wiredtiger_open(self.backup_dir, self.conn_config) - session = backup_conn.open_session() - cur1 = session.open_cursor(self.uri) - for i in range(0, 4000, 10): - self.assertEqual(cur1[i], self.bigvalue) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_bug030.py b/src/third_party/wiredtiger/test/suite/test_bug030.py deleted file mode 100644 index 3969d71de9d..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_bug030.py +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -import wttest -from helper import simulate_crash_restart -from wiredtiger import stat -from wtdataset import SimpleDataSet -from wtscenario import make_scenarios - -# test_bug030.py -# This tests for the scenario in WT-10522 where we could return early when -# appending a key's original value to its update list due to checking some -# flags that must be ignored when looking at an aborted tombstone. -class test_bug_030(wttest.WiredTigerTestCase): - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - scenarios = make_scenarios(format_values) - - def conn_config(self): - config = 'debug_mode=(update_restore_evict=true)' - return config - - def test_bug030(self): - nrows = 10 - uri = "table:test_bug030" - - if self.value_format == '8t': - valuea = 97 - valueb = 98 - else: - valuea = "abcdef" * 3 - valueb = "ghijkl" * 3 - - self.session.create(uri, 'key_format={},value_format={}'.format( - self.key_format, self.value_format)) - - # Stable insert - self.session.begin_transaction() - cursor = self.session.open_cursor(uri) - for i in range(1, nrows + 1): - cursor[i] = valuea - cursor.close() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(10)) - - self.conn.set_timestamp('oldest_timestamp={},stable_timestamp={}'.format( - self.timestamp_str(10), self.timestamp_str(20))) - - # Unstable delete - self.session.begin_transaction() - cursor = self.session.open_cursor(uri) - for i in range(1, nrows + 1): - cursor.set_key(i) - cursor.remove() - cursor.close() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(30)) - - # Evict everything - self.session.begin_transaction() - evict_cursor = self.session.open_cursor(uri, None, 'debug=(release_evict)') - for i in range(1, nrows + 1): - evict_cursor.set_key(i) - evict_cursor.search() - evict_cursor.reset() - evict_cursor.close() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(40)) - - # Unstable, uncommitted update - self.session.begin_transaction() - cursor = self.session.open_cursor(uri) - for i in range(1, nrows + 1): - cursor[i] = valueb - cursor.close() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(50)) - - self.session.checkpoint() - self.conn.rollback_to_stable() - - # Another delete, committed this time - self.session.begin_transaction() - cursor = self.session.open_cursor(uri) - for i in range(1, nrows + 1): - cursor.set_key(i) - cursor.remove() - cursor.close() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(60)) - - # Finally, evict everything. At this point, our key(s) have an - # update chain with a single entry that's both aborted and restored - # from the data store, that we attempt to reconcile. - self.session.begin_transaction() - evict_cursor = self.session.open_cursor(uri, None, 'debug=(release_evict)') - for i in range(1, nrows + 1): - evict_cursor.set_key(i) - evict_cursor.search() - evict_cursor.reset() - evict_cursor.close() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(70)) diff --git a/src/third_party/wiredtiger/test/suite/test_bug032.py b/src/third_party/wiredtiger/test/suite/test_bug032.py deleted file mode 100644 index bd77d3fa2a8..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_bug032.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wttest -from wtdataset import SimpleDataSet -from wtscenario import make_scenarios - -# test_bug032.py -# This tests for the scenario discovered in WT-11845. -# Before WT-11845 fast truncate determined if a page could be fast truncated by -# looking at the pages aggregated timestamp. This would lead to keys being incorrectly -# truncated if: -# - Two transactions txn1 and txn2 have ids 10 and 20 respectively -# - txn2 is committed and txn1 is still active while a truncate transaction begins. -# txn2 is visible to the truncate while txn1 is not. -# - txn1 is then committed and a page containing updates from both transactions is written to disk. -# The aggregated timestamp uses txn id 20. -# - Truncate reads the aggregated timestamp of the page (id 20) and determines it is visible. -# The page is truncated even though it contains updates from txn1 which is not visible to the -# truncate operation. -class test_bug032(wttest.WiredTigerTestCase): - conn_config = 'cache_size=50MB,statistics=(all)' - - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('string_row', dict(key_format='S', value_format='S')), - ] - scenarios = make_scenarios(format_values) - - def populate(self, uri, ds, nrows, value): - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - for i in range(1, nrows): - cursor[ds.key(i)] = value + str(i) - - self.session.commit_transaction() - cursor.close() - - def test_bug032(self): - uri = 'table:bug032' - nrows = 500 - - # The key to be inserted and truncated in parallel, as described in the test description. - txn1_key_num = 32 - - # 512 byte keys. We're limiting leaf_page_max to 10KB which will give us ~20 keys per page. - value_str = 'a' * 512 - - # Create a table and populate it - ds = SimpleDataSet(self, uri, 0, key_format=self.key_format, value_format=self.value_format, config='allocation_size=512,leaf_page_max=10KB') - ds.create() - self.populate(uri, ds, nrows, value_str) - - # Remove txn1's key which was added by the populate phase. We want truncate and insert to race in - # a way they aren't aware of each other. If there's an existing version of the key then txn1's - # insert becomes a modify and truncate will see the parallel modification, rolling back instead - # of truncating. - self.session.begin_transaction() - c = self.session.open_cursor(uri) - c.set_key(ds.key(txn1_key_num)) - c.remove() - self.session.commit_transaction() - c.close() - - # Perform an in txn1 but don't commit it. - txn1_session = self.conn.open_session() - txn1_session.begin_transaction() - c1 = txn1_session.open_cursor(uri) - c1[ds.key(txn1_key_num)] = value_str - c1.reset() - - # Start and commit txn2. This has a larger txn id than txn1. - txn2_session = self.conn.open_session() - txn2_session.begin_transaction() - c2 = txn2_session.open_cursor(uri) - c2[ds.key(txn1_key_num + 1)] = value_str - txn2_session.commit_transaction() - c2.close() - - # Start the truncate transaction. Here the snapshot will see txn2 but not txn1. - truncate_session = self.conn.open_session() - truncate_session.begin_transaction() - - # Commit txn1. - txn1_session.commit_transaction() - c1.reset() - c1.close() - - # Evict the page txn1 containing modifications from both txn1 and txn2. - evict_cursor = self.session.open_cursor(ds.uri, None, "debug=(release_evict)") - evict_cursor[ds.key(txn1_key_num)] - self.assertEqual(evict_cursor.reset(), 0) - evict_cursor.close() - - # Truncate everything. This will attempt to fast truncate the page we evicted to disk. - # The page cannot be fast truncated as txn1's key is not visible to the truncate. - truncate_session.truncate(uri, None, None, None) - truncate_session.commit_transaction() - - # Search for our key inserted by txn1. This was not truncated by the truncate operation as - # txn1 wasn't visible. - validate_cursor = self.session.open_cursor(ds.uri) - validate_cursor.set_key(ds.key(txn1_key_num)) - self.assertEqual(validate_cursor.search(), 0) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_bulk01.py b/src/third_party/wiredtiger/test/suite/test_bulk01.py index 8317151e5ec..76893efd9ce 100755 --- a/src/third_party/wiredtiger/test/suite/test_bulk01.py +++ b/src/third_party/wiredtiger/test/suite/test_bulk01.py @@ -33,12 +33,10 @@ import wiredtiger, wttest from wtdataset import simple_key, simple_value from wtscenario import make_scenarios -from wiredtiger import stat # Smoke test bulk-load. class test_bulk_load(wttest.WiredTigerTestCase): name = 'test_bulk' - conn_config = "statistics=(fast)" types = [ ('file', dict(type='file:')), @@ -56,27 +54,14 @@ class test_bulk_load(wttest.WiredTigerTestCase): ] scenarios = make_scenarios(types, keyfmt, valfmt) - def get_stat(self, stat): - stat_cursor = self.session.open_cursor('statistics:') - val = stat_cursor[stat][2] - stat_cursor.close() - return val - # Test a simple bulk-load def test_bulk_load(self): uri = self.type + self.name self.session.create(uri, 'key_format=' + self.keyfmt + ',value_format=' + self.valfmt) - - self.assertEqual(self.get_stat(stat.conn.cursor_bulk_count), 0) cursor = self.session.open_cursor(uri, None, "bulk") - self.assertEqual(self.get_stat(stat.conn.cursor_bulk_count), 1) - for i in range(1, 1000): cursor[simple_key(cursor, i)] = simple_value(cursor, i) - cursor.close() - - self.assertEqual(self.get_stat(stat.conn.cursor_bulk_count), 0) # Test a bulk-load triggers variable-length column-store RLE correctly. def test_bulk_load_var_rle(self): diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint04.py b/src/third_party/wiredtiger/test/suite/test_checkpoint04.py index 76ded0c810f..e9411acfe0d 100755 --- a/src/third_party/wiredtiger/test/suite/test_checkpoint04.py +++ b/src/third_party/wiredtiger/test/suite/test_checkpoint04.py @@ -63,7 +63,7 @@ class test_checkpoint04(wttest.WiredTigerTestCase): def test_checkpoint_stats(self): nrows = 100 - ntables = 50 + ntables = 10 multiplier = 1 # Run the loop and increase the value size with each iteration until @@ -117,10 +117,7 @@ class test_checkpoint04(wttest.WiredTigerTestCase): time_total = self.get_stat(stat.conn.txn_checkpoint_time_total) self.pr('txn_checkpoint_time_total ' + str(time_total)) - # Account for When the connection re-opens on an existing datable as we perform a - # checkpoint during the open stage. - expected_ckpts = 3 if multiplier > 1 else 2 - self.assertEqual(num_ckpt, expected_ckpts) + self.assertEqual(num_ckpt, 2 * multiplier) self.assertEqual(running, 0) self.assertEqual(prep_running, 0) # Assert if this loop continues for more than 100 iterations. @@ -130,11 +127,8 @@ class test_checkpoint04(wttest.WiredTigerTestCase): # Run the loop again if any of the below condition fails and exit if the test passes. if prep_min < time_min and prep_max < time_max and prep_recent < time_recent and prep_total < time_total: break - - multiplier += 1 - # Reopen the connection to reset statistics. - # We don't want stats from earlier runs to interfere with later runs. - self.reopen_conn() + else: + multiplier += 1 if __name__ == '__main__': wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint30.py b/src/third_party/wiredtiger/test/suite/test_checkpoint30.py deleted file mode 100644 index 066b51a80bc..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_checkpoint30.py +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import threading, time -import wttest -import wiredtiger -from wtdataset import SimpleDataSet -from wtscenario import make_scenarios - -# test_checkpoint30.py -# -# Test reading a cursor when the aggregate time window is visible to the snapshot -# but not all deleted keys on-disk version are not visible. -class test_checkpoint(wttest.WiredTigerTestCase): - conn_config = 'cache_size=50MB,statistics=(all)' - - format_values = [ - ('column', dict(key_format='r', value_format='S', extraconfig='')), - ('string_row', dict(key_format='S', value_format='S', extraconfig='')), - ] - scenarios = make_scenarios(format_values) - - def large_updates(self, uri, ds, nrows, value, ts): - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - for i in range(1, nrows + 1): - cursor[ds.key(i)] = value - if i % 101 == 0: - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts)) - self.session.begin_transaction() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts)) - cursor.close() - - def large_removes(self, uri, ds, start_row, nrows, ts): - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - for i in range(start_row, nrows + 1): - cursor.set_key(ds.key(i)) - cursor.remove() - if i % 101 == 0: - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts)) - self.session.begin_transaction() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts)) - cursor.close() - - def evict(self, ds, lo, hi, value, ts): - evict_cursor = self.session.open_cursor(ds.uri, None, "debug=(release_evict)") - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts)) - # Evict every 10th key. FUTURE: when that's possible, evict each page exactly once. - for k in range(lo, hi, 10): - v = evict_cursor[ds.key(k)] - self.assertEqual(v, value) - self.assertEqual(evict_cursor.reset(), 0) - self.session.rollback_transaction() - - def check(self, session_local, ds, nrows, value, ts): - cursor = session_local.open_cursor(ds.uri) - count = 0 - for k, v in cursor: - self.assertEqual(v, value) - count += 1 - self.assertEqual(count, nrows) - cursor.close() - - def test_checkpoint(self): - uri = 'table:checkpoint30' - nrows = 100 - - # Create a table. - ds = SimpleDataSet( - self, uri, 0, key_format=self.key_format, value_format=self.value_format, - config=self.extraconfig) - ds.populate() - - value_a = "aaaaa" * 100 - value_b = "bbbbb" * 100 - - # Pin oldest and stable timestamps to 5. - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(5) + - ',stable_timestamp=' + self.timestamp_str(5)) - - # Write some data at time 10. - self.large_updates(uri, ds, nrows, value_a, 10) - self.check(self.session, ds, nrows, value_a, 10) - - # Remove the key-1 at time 20 and keep this transaction open until a reader is started. - session2 = self.conn.open_session() - cursor = session2.open_cursor(uri) - session2.begin_transaction() - cursor.set_key(ds.key(1)) - cursor.remove() - - # Remove the remaining keys with another transaction and commit. - self.large_removes(uri, ds, 2, nrows, 20) - self.check(self.session, ds, 1, value_a, 20) - - # Start the reader transaction. According to the snapshot visibility, except key-1 - # rest of the keys are removed ignoring the read timestamp. - session3 = self.conn.open_session() - session3.begin_transaction() - - # Commit the key-1 remove transaction. - session2.commit_transaction('commit_timestamp=' + self.timestamp_str(25)) - cursor.close() - - # Reader transaction cannot see the remove on key-1. - self.check(session3, ds, 1, value_a, 25) - - # Evict the data. - self.evict(ds, 1, nrows + 1, value_a, 10) - - # Reader transaction cannot see the remove on key-1 after eviction. - self.check(session3, ds, 1, value_a, 25) - - # Checkpoint. - self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(25)) - self.session.checkpoint() - - # Reader transaction cannot see the remove on key-1 after the checkpoint. - self.check(session3, ds, 1, value_a, 25) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint32.py b/src/third_party/wiredtiger/test/suite/test_checkpoint32.py deleted file mode 100644 index a8cd84bb5da..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_checkpoint32.py +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import threading, time -import wttest -import wiredtiger -from wtdataset import SimpleDataSet -from wtscenario import make_scenarios -from wiredtiger import stat - -# test_checkpoint32.py -# -# Test that skipping in-memory reconciled deleted pages as part of the tree walk. -class test_checkpoint32(wttest.WiredTigerTestCase): - - format_values = [ - # FLCS doesn't support skipping pages based on aggregated time. - ('column', dict(key_format='r', value_format='S', extraconfig='')), - ('string_row', dict(key_format='S', value_format='S', extraconfig='')), - ] - - scenarios = make_scenarios(format_values) - - def conn_config(self): - return 'statistics=(all)' - - def check(self, ds, nrows, value): - cursor = self.session.open_cursor(ds.uri) - count = 0 - for k, v in cursor: - self.assertEqual(v, value) - count += 1 - self.assertEqual(count, nrows) - cursor.close() - - def test_checkpoint(self): - uri = 'table:checkpoint32' - nrows = 1000 - - # Create a table. - ds = SimpleDataSet( - self, uri, 0, key_format=self.key_format, value_format=self.value_format, - config=self.extraconfig) - ds.populate() - - value_a = "aaaaa" * 100 - - # Write some initial data. - cursor = self.session.open_cursor(ds.uri, None, None) - for i in range(1, nrows + 1): - self.session.begin_transaction() - cursor[ds.key(i)] = value_a - self.session.commit_transaction() - - # Create a reader transaction that will not be able to see what happens next. - # We don't need to do anything with this; it just needs to exist. - session2 = self.conn.open_session() - session2.begin_transaction() - - # Now remove all data. - for i in range(1, nrows + 1): - self.session.begin_transaction() - cursor.set_key(ds.key(i)) - self.assertEqual(cursor.remove(), 0) - self.session.commit_transaction() - - # Checkpoint. - self.session.checkpoint() - - # Get the existing in-memory delete page skip statistic value. - stat_cursor = self.session.open_cursor('statistics:', None, None) - prev_cur_inmem_del_page_skip = stat_cursor[stat.conn.cursor_tree_walk_inmem_del_page_skip][2] - stat_cursor.close() - - # Now read the removed data. - self.check(ds, 0, value_a) - - # Get the new in-memory delete page skip statistic value. - stat_cursor = self.session.open_cursor('statistics:', None, None) - cur_inmem_del_page_skip = stat_cursor[stat.conn.cursor_tree_walk_inmem_del_page_skip][2] - stat_cursor.close() - - self.assertGreater(cur_inmem_del_page_skip, prev_cur_inmem_del_page_skip) - - # Tidy up. - session2.rollback_transaction() - session2.close() - cursor.close() - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py b/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py index 7ee28a240cc..89a7faddfc0 100644 --- a/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py +++ b/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py @@ -161,15 +161,8 @@ class test_checkpoint_snapshot02(wttest.WiredTigerTestCase): ckpt = checkpoint_thread(self.conn, done) try: ckpt.start() - - # Wait for checkpoint to start and acquire its snapshot before committing. - ckpt_snapshot = 0 - while not ckpt_snapshot: - time.sleep(1) - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_snapshot = stat_cursor[stat.conn.txn_checkpoint_snapshot_acquired][2] - stat_cursor.close() - + # Sleep for sometime so that checkpoint starts before committing last transaction. + time.sleep(2) session1.commit_transaction() finally: @@ -222,15 +215,8 @@ class test_checkpoint_snapshot02(wttest.WiredTigerTestCase): ckpt = checkpoint_thread(self.conn, done) try: ckpt.start() - - # Wait for checkpoint to start and acquire its snapshot before committing. - ckpt_snapshot = 0 - while not ckpt_snapshot: - time.sleep(1) - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_snapshot = stat_cursor[stat.conn.txn_checkpoint_snapshot_acquired][2] - stat_cursor.close() - + # Sleep for sometime so that checkpoint starts before committing last transaction. + time.sleep(2) session1.commit_transaction() finally: @@ -286,15 +272,8 @@ class test_checkpoint_snapshot02(wttest.WiredTigerTestCase): ckpt = checkpoint_thread(self.conn, done) try: ckpt.start() - - # Wait for checkpoint to start and acquire its snapshot before committing. - ckpt_snapshot = 0 - while not ckpt_snapshot: - time.sleep(1) - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_snapshot = stat_cursor[stat.conn.txn_checkpoint_snapshot_acquired][2] - stat_cursor.close() - + # Sleep for sometime so that checkpoint starts before committing last transaction. + time.sleep(2) session2.commit_transaction() finally: diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot05.py b/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot05.py index 583808915b6..e8ff0067f61 100644 --- a/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot05.py +++ b/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot05.py @@ -147,15 +147,8 @@ class test_checkpoint_snapshot05(wttest.WiredTigerTestCase): ckpt = checkpoint_thread(self.conn, done) try: ckpt.start() - - # Wait for checkpoint to start and acquire its snapshot before committing. - ckpt_snapshot = 0 - while not ckpt_snapshot: - time.sleep(1) - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_snapshot = stat_cursor[stat.conn.txn_checkpoint_snapshot_acquired][2] - stat_cursor.close() - + # Sleep for sometime so that checkpoint starts before committing last transaction. + time.sleep(2) session1.commit_transaction() self.evict(self.uri, ds, self.nrows) finally: diff --git a/src/third_party/wiredtiger/test/suite/test_cursor_random.py b/src/third_party/wiredtiger/test/suite/test_cursor_random.py index a339ea3d305..3b64532c036 100644 --- a/src/third_party/wiredtiger/test/suite/test_cursor_random.py +++ b/src/third_party/wiredtiger/test/suite/test_cursor_random.py @@ -26,7 +26,7 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -import wiredtiger, wttest, sys +import wiredtiger, wttest from wtdataset import SimpleDataSet, ComplexDataSet, simple_key, simple_value from wtscenario import make_scenarios @@ -42,7 +42,6 @@ class test_cursor_random(wttest.WiredTigerTestCase): ('not-sample', dict(config='next_random=true')) ] scenarios = make_scenarios(types, config) - expected_warning_msg = 'Eviction took more than 1 minute' # Check that opening a random cursor on a row-store returns not-supported # for methods other than next, reconfigure and reset, and next returns @@ -111,12 +110,6 @@ class test_cursor_random(wttest.WiredTigerTestCase): list.append(cursor.get_key()) self.assertGreater(len(set(list)), 80) - # Ignore the eviction generation drain warning as it is possible for eviction to - # take longer to evict pages due to overflow items on the page. - self.conn.close() - if (sys.platform.startswith('darwin')): - self.ignoreStdoutPatternIfExists(self.expected_warning_msg) - def test_cursor_random_multiple_insert_records_small(self): self.cursor_random_multiple_insert_records(2000) def test_cursor_random_multiple_insert_records_large(self): @@ -144,12 +137,6 @@ class test_cursor_random(wttest.WiredTigerTestCase): list.append(cursor.get_key()) self.assertGreater(len(set(list)), 80) - # Ignore the eviction generation drain warning as it is possible for eviction to - # take longer to evict pages due to overflow items on the page. - self.conn.close() - if (sys.platform.startswith('darwin')): - self.ignoreStdoutPatternIfExists(self.expected_warning_msg) - def test_cursor_random_multiple_page_records_reopen_small(self): self.cursor_random_multiple_page_records(2000, True) def test_cursor_random_multiple_page_records_reopen_large(self): @@ -182,12 +169,6 @@ class test_cursor_random(wttest.WiredTigerTestCase): for i in range(1,10): self.assertEqual(cursor.next(), 0) - # Ignore the eviction generation drain warning as it is possible for eviction to - # take longer to evict pages due to overflow items on the page. - self.conn.close() - if (sys.platform.startswith('darwin')): - self.ignoreStdoutPatternIfExists(self.expected_warning_msg) - # Check that next_random fails in the presence of a set of values, all of # which are deleted. def test_cursor_random_deleted_all(self): @@ -205,12 +186,6 @@ class test_cursor_random(wttest.WiredTigerTestCase): for i in range(1,10): self.assertTrue(cursor.next(), wiredtiger.WT_NOTFOUND) - # Ignore the eviction generation drain warning as it is possible for eviction to - # take longer to evict pages due to overflow items on the page. - self.conn.close() - if (sys.platform.startswith('darwin')): - self.ignoreStdoutPatternIfExists(self.expected_warning_msg) - # Check that opening a random cursor on column-store returns not-supported. class test_cursor_random_column(wttest.WiredTigerTestCase): type_values = [ diff --git a/src/third_party/wiredtiger/test/suite/test_cursor_random03.py b/src/third_party/wiredtiger/test/suite/test_cursor_random03.py deleted file mode 100644 index 4d8696f63ea..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_cursor_random03.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wttest -from wtdataset import SimpleDataSet - -# test_cursor_random03.py -# This python test reproduces the WT-12225 bug where the same stream of numbers are generated -# from the random cursor. In the presence of where all the values are the insert list, open up -# two cursors close to each other in time, and both cursors will return back the exact same stream -# of records again. The test makes sure that records returned in both cursors return at least -# one record that is different, ensuring that the stream of numbers returned from __wt_random -# are not in the same pattern. -class test_cursor_random03(wttest.WiredTigerTestCase): - def test_cursor_random_bug(self): - uri = 'table:random' - - # Do not change the chosen number of records. The records is to make sure that - # the skip insert list random estimate is a power of 2 to act as a mask. - # Also set the leaf-page-max value, otherwise the page might split. - ds = SimpleDataSet(self, uri, 2135, config='leaf_page_max=100MB') - ds.populate() - - for _ in range(0, 5000): - random_keys = [] - - cursor = self.session.open_cursor(uri, None, 'next_random=true') - - # Perform 100 nexts and append to our random keys. - for _ in range(0, 100): - self.assertEqual(cursor.next(), 0) - current = cursor.get_key() - random_keys.append(current) - cursor.close() - - # The random cursor initial seed is time based, reset the initial random seed again - # to make sure that we have not generated with the same random numbers - cursor = self.session.open_cursor(uri, None, 'next_random=true') - found_different = False - for i in range(0, 100): - self.assertEqual(cursor.next(), 0) - current = cursor.get_key() - # Exit early once we found a key that is different. - if (random_keys[i] != current): - found_different = True - break - cursor.close() - - # We expect that the values between two recently opened cursors return different stream - # of records. - self.assertTrue(found_different) - diff --git a/src/third_party/wiredtiger/test/suite/test_hs07.py b/src/third_party/wiredtiger/test/suite/test_hs07.py index 27430cbf8ff..2137a37ba7f 100644 --- a/src/third_party/wiredtiger/test/suite/test_hs07.py +++ b/src/third_party/wiredtiger/test/suite/test_hs07.py @@ -225,7 +225,5 @@ class test_hs07(wttest.WiredTigerTestCase): # Check that the new updates are only seen after the update timestamp self.check(bigvalue, uri, nrows, 300) - self.ignoreStdoutPatternIfExists('Eviction took more than 1 minute') - if __name__ == '__main__': wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_hs11.py b/src/third_party/wiredtiger/test/suite/test_hs11.py index 417d37cca29..647a7bfece5 100755 --- a/src/third_party/wiredtiger/test/suite/test_hs11.py +++ b/src/third_party/wiredtiger/test/suite/test_hs11.py @@ -44,20 +44,8 @@ class test_hs11(wttest.WiredTigerTestCase): ('deletion', dict(update_type='deletion')), ('update', dict(update_type='update')) ] - long_running_txn_values = [ - ('long-running', dict(long_run_txn=True)), - ('no-long-running', dict(long_run_txn=False)) - ] - last_update_type_values = [ - ('modify', dict(modify=True)), - ('no-modify', dict(modify=False)) - ] - nrows = [ - ('small-nrows', dict(nrows=100)), - ('large-nrows', dict(nrows=10000)) - ] - scenarios = make_scenarios(format_values, update_type_values,long_running_txn_values, last_update_type_values, nrows) - timestamps = 5 + scenarios = make_scenarios(format_values, update_type_values) + nrows = 10000 def create_key(self, i): if self.key_format == 'S': @@ -70,18 +58,6 @@ class test_hs11(wttest.WiredTigerTestCase): stat_cursor.close() return val - def evict_cursor(self, uri, nrows): - s = self.conn.open_session() - s.begin_transaction() - # Configure debug behavior on a cursor to evict the page positioned on when the reset API is used. - evict_cursor = s.open_cursor(uri, None, "debug=(release_evict)") - for i in range(1, nrows + 1): - evict_cursor.set_key(self.create_key(i)) - evict_cursor.search() - evict_cursor.reset() - s.rollback_transaction() - evict_cursor.close() - def test_non_ts_updates_clears_hs(self): uri = 'table:test_hs11' create_params = 'key_format={},value_format={}'.format(self.key_format, self.value_format) @@ -93,14 +69,13 @@ class test_hs11(wttest.WiredTigerTestCase): else: value1 = 'a' * 500 value2 = 'b' * 500 - mod_value = 'm' + 'a' * 499 # FIXME-WT-9063 revisit the use of self.retry() throughout this file. # Apply a series of updates from timestamps 1-4. self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) cursor = self.session.open_cursor(uri) - for ts in range(1, self.timestamps): + for ts in range(1, 5): for i in range(1, self.nrows): for retry in self.retry(): with retry.transaction(commit_timestamp = ts): @@ -108,24 +83,8 @@ class test_hs11(wttest.WiredTigerTestCase): # Reconcile and flush versions 1-3 to the history store. self.session.checkpoint() - self.evict_cursor(uri, self.nrows) - - # Apply a modify update at timestamp 5. - if self.modify and self.value_format != '8t': - for i in range(1, self.nrows): - for retry in self.retry(): - with retry.transaction(commit_timestamp = 5): - cursor.set_key(self.create_key(i)) - cursor.modify([wiredtiger.Modify("m", 0, 1)]) - self.timestamps += 1 - - # Start a long running transaction at timestamp 5. - if self.long_run_txn: - session2 = self.conn.open_session() - session2.begin_transaction('read_timestamp=5') - # Apply an update without timestamp. If we have a long running transaction this update - # should not be globally visible until that transaction has ended. + # Apply an update without timestamp. for i in range(1, self.nrows): if i % 2 == 0: if self.update_type == 'deletion': @@ -136,11 +95,6 @@ class test_hs11(wttest.WiredTigerTestCase): # Reconcile and remove the obsolete entries. self.session.checkpoint() - if self.long_run_txn: - session2.rollback_transaction() - - # At this point any updates with no timestamp should be globally visible. - self.evict_cursor(uri, self.nrows) # Now apply an update at timestamp 10. for i in range(1, self.nrows): @@ -148,10 +102,8 @@ class test_hs11(wttest.WiredTigerTestCase): with retry.transaction(commit_timestamp = 10): cursor[self.create_key(i)] = value2 - self.session.checkpoint() - # Ensure that we blew away history store content. - for ts in range(1, self.timestamps): + for ts in range(1, 5): for retry in self.retry(): with retry.transaction(read_timestamp = ts, rollback = True): for i in range(1, self.nrows): @@ -166,10 +118,7 @@ class test_hs11(wttest.WiredTigerTestCase): else: self.assertEqual(cursor[self.create_key(i)], value2) else: - if ts == 5 and self.modify and self.value_format != '8t': - self.assertEqual(cursor[self.create_key(i)], mod_value) - else: - self.assertEqual(cursor[self.create_key(i)], value1) + self.assertEqual(cursor[self.create_key(i)], value1) if self.update_type == 'deletion': hs_truncate = self.get_stat(stat.conn.cache_hs_key_truncate_onpage_removal) @@ -186,12 +135,11 @@ class test_hs11(wttest.WiredTigerTestCase): else: value1 = 'a' * 500 value2 = 'b' * 500 - mod_value = 'm' + 'a' * 499 # Apply a series of updates from timestamps 1-4. self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) cursor = self.session.open_cursor(uri) - for ts in range(1, self.timestamps): + for ts in range(1, 5): for i in range(1, self.nrows): for retry in self.retry(): with retry.transaction(commit_timestamp = ts): @@ -200,15 +148,6 @@ class test_hs11(wttest.WiredTigerTestCase): # Reconcile and flush versions 1-3 to the history store. self.session.checkpoint() - # Apply a modify update at timestamp 5. - if self.modify and self.value_format != '8t': - for i in range(1, self.nrows): - for retry in self.retry(): - with retry.transaction(commit_timestamp = 5): - cursor.set_key(self.create_key(i)) - cursor.modify([wiredtiger.Modify("m", 0, 1)]) - self.timestamps += 1 - # Remove the key with timestamp 10. for i in range(1, self.nrows): if i % 2 == 0: @@ -239,10 +178,7 @@ class test_hs11(wttest.WiredTigerTestCase): else: self.assertEqual(cursor.search(), wiredtiger.WT_NOTFOUND) else: - if self.modify and self.value_format != '8t': - self.assertEqual(cursor[self.create_key(i)], mod_value) - else: - self.assertEqual(cursor[self.create_key(i)], value1) + self.assertEqual(cursor[self.create_key(i)], value1) hs_truncate = self.get_stat(stat.conn.cache_hs_key_truncate_onpage_removal) self.assertEqual(hs_truncate, 0) diff --git a/src/third_party/wiredtiger/test/suite/test_hs20.py b/src/third_party/wiredtiger/test/suite/test_hs20.py index e2b9d878517..071d33de9bd 100755 --- a/src/third_party/wiredtiger/test/suite/test_hs20.py +++ b/src/third_party/wiredtiger/test/suite/test_hs20.py @@ -26,7 +26,7 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -import wiredtiger, wttest, sys +import wiredtiger, wttest from wtscenario import make_scenarios # test_hs20.py @@ -103,8 +103,3 @@ class test_hs20(wttest.WiredTigerTestCase): for retry in self.retry(): with retry.transaction(read_timestamp = 3, rollback = True): self.assertEqual(cursor[self.make_key(i)], value1 + "B") - - if (sys.platform.startswith('darwin')): - # Ignore the eviction generation drain warning as it is possible for eviction to take - # longer to evict pages due to overflow items on the page. - self.ignoreStdoutPatternIfExists('Eviction took more than 1 minute') diff --git a/src/third_party/wiredtiger/test/suite/test_hs32.py b/src/third_party/wiredtiger/test/suite/test_hs32.py deleted file mode 100755 index b90bbaa15db..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_hs32.py +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wtscenario import make_scenarios -from wiredtiger import stat - -# test_hs32.py -# Ensure that updates without timestamps clear the history store records. -class test_hs32(wttest.WiredTigerTestCase): - conn_config = 'cache_size=500MB,statistics=(all)' - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column-fix', dict(key_format='r', value_format='8t')), - ('integer-row', dict(key_format='i', value_format='S')), - ('string-row', dict(key_format='S', value_format='S')), - ] - update_type_values = [ - ('deletion', dict(update_type='deletion')), - ('update', dict(update_type='update')) - ] - long_running_txn_values = [ - ('no-long-run-txn', dict(long_run_txn=False)), - ('long-run-txn', dict(long_run_txn=True)) - ] - scenarios = make_scenarios(format_values, update_type_values,long_running_txn_values) - nrows = 100 - - def create_key(self, i): - if self.key_format == 'S': - return str(i) - return i - - def get_stat(self, stat): - stat_cursor = self.session.open_cursor('statistics:') - val = stat_cursor[stat][2] - stat_cursor.close() - return val - - def evict_cursor(self, uri, nrows): - s = self.conn.open_session() - s.begin_transaction() - # Configure debug behavior on a cursor to evict the page positioned on when the reset API is used. - evict_cursor = s.open_cursor(uri, None, "debug=(release_evict)") - for i in range(1, nrows + 1): - evict_cursor.set_key(self.create_key(i)) - evict_cursor.search() - evict_cursor.reset() - s.rollback_transaction() - evict_cursor.close() - - def test_non_ts_updates_tombstone_clears_hs(self): - uri = 'table:test_hs32' - create_params = 'key_format={},value_format={}'.format(self.key_format, self.value_format) - self.session.create(uri, create_params) - - if self.value_format == '8t': - value1 = 97 - value2 = 98 - else: - value1 = 'a' * 500 - value2 = 'b' * 500 - - # Apply a series of updates from timestamps 1-4. - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) - cursor = self.session.open_cursor(uri) - for ts in range(1, 5): - for i in range(1, self.nrows): - for retry in self.retry(): - with retry.transaction(commit_timestamp = ts): - cursor[self.create_key(i)] = value1 - - # Reconcile and flush versions 1-3 to the history store. - self.session.checkpoint() - self.evict_cursor(uri, self.nrows) - - if self.long_run_txn: - # Apply a another update at timestamp 5. - for i in range(1, self.nrows): - for retry in self.retry(): - with retry.transaction(commit_timestamp = 5): - cursor[self.create_key(i)] = value1 - - # Start a long running transaction to make tombstone not globally visible. - session2 = self.conn.open_session() - session2.begin_transaction('read_timestamp=5') - - # Apply an update/delete without timestamp. - for i in range(1, self.nrows): - self.session.begin_transaction() - if i % 2 == 0: - if self.update_type == 'deletion': - cursor.set_key(self.create_key(i)) - cursor.remove() - else: - cursor[self.create_key(i)] = value2 - self.session.commit_transaction() - - if self.long_run_txn: - # Reconcile and remove the obsolete entries. - self.session.checkpoint() - self.evict_cursor(uri, self.nrows) - - # Rollback the long running transaction. - session2.rollback_transaction() - - # Now apply an update at timestamp 10. - for i in range(1, self.nrows): - for retry in self.retry(): - with retry.transaction(commit_timestamp = 10): - cursor[self.create_key(i)] = value2 - - self.session.checkpoint() - - # Ensure that we blew away history store content. - for ts in range(1, 5): - for retry in self.retry(): - with retry.transaction(read_timestamp = ts, rollback = True): - for i in range(1, self.nrows): - if i % 2 == 0: - if self.update_type == 'deletion': - cursor.set_key(self.create_key(i)) - if self.value_format == '8t': - self.assertEqual(cursor.search(), 0) - self.assertEqual(cursor.get_value(), 0) - else: - self.assertEqual(cursor.search(), wiredtiger.WT_NOTFOUND) - else: - self.assertEqual(cursor[self.create_key(i)], value2) - else: - self.assertEqual(cursor[self.create_key(i)], value1) - - if self.update_type == 'deletion': - cache_hs_key_truncate = self.get_stat(stat.conn.cache_hs_key_truncate) - self.assertGreater(cache_hs_key_truncate, 0) diff --git a/src/third_party/wiredtiger/test/suite/test_prepare20.py b/src/third_party/wiredtiger/test/suite/test_prepare20.py index 6f219ea2c83..0b541d40730 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare20.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare20.py @@ -27,14 +27,14 @@ # OTHER DEALINGS IN THE SOFTWARE. -# test_prepare20.py +# test_prepare19.py # Check that we can use an application-level log to replay unstable transactions. -import wttest +import wiredtiger, wttest from wtscenario import make_scenarios from helper import simulate_crash_restart -class test_prepare20(wttest.WiredTigerTestCase): +class test_prepare19(wttest.WiredTigerTestCase): # Do write the logs immediately, but don't waste time fsyncing them. conn_config = 'log=(enabled),transaction_sync=(enabled=true,method=none)' @@ -131,7 +131,7 @@ class test_prepare20(wttest.WiredTigerTestCase): # First pass: find prepared txns. Ignore (thus abort) any that didn't even prepare. txns = {} self.lcursor.reset() - for _, op, k, oldv, newv in self.lcursor: + for lsn, op, k, oldv, newv in self.lcursor: if op == self.BEGIN: # "key" is the txnid txns[k] = False @@ -143,7 +143,7 @@ class test_prepare20(wttest.WiredTigerTestCase): writing = False committime = None durabletime = None - for _, op, k, oldv, newv in self.lcursor: + for lsn, op, k, oldv, newv in self.lcursor: if op == self.BEGIN: # "key" is the txnid if txns[k]: @@ -198,9 +198,9 @@ class test_prepare20(wttest.WiredTigerTestCase): # Now the test. - def test_prepare20(self): - data_uri = 'file:prepare20data' - log_uri = 'file:prepare20log' + def test_prepare19(self): + data_uri = 'file:prepare19data' + log_uri = 'file:prepare19log' # Create one table for data and another to be an application-level log. # The log's format is application-lsn -> operation, key, oldvalue, newvalue diff --git a/src/third_party/wiredtiger/test/suite/test_prepare21.py b/src/third_party/wiredtiger/test/suite/test_prepare21.py deleted file mode 100644 index ec61092d04c..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_prepare21.py +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import threading, time -from helper import simulate_crash_restart -from test_rollback_to_stable01 import test_rollback_to_stable_base -from wiredtiger import stat -from wtdataset import SimpleDataSet -from wtscenario import make_scenarios -from wtthread import checkpoint_thread - -# test_prepare21.py -# Test prepare rollback doesn't crash because of triggering out of order fix. -class test_prepare21(test_rollback_to_stable_base): - - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - scenarios = make_scenarios(format_values) - - def conn_config(self): - config = 'cache_size=10MB,statistics=(all),timing_stress_for_test=[history_store_checkpoint_delay]' - return config - - def evict_cursor(self, uri, nrows): - # Configure debug behavior on a cursor to evict the page positioned on when the reset API is used. - evict_cursor = self.session.open_cursor(uri, None, "debug=(release_evict)") - self.session.begin_transaction("ignore_prepare=true") - for i in range (1, nrows + 1): - evict_cursor.set_key(i) - evict_cursor.search() - evict_cursor.reset() - evict_cursor.close() - self.session.rollback_transaction() - - def test_prepare_rollback(self): - nrows = 10 - - # Create a table. - uri = "table:prepare21" - ds = SimpleDataSet(self, uri, 0, key_format=self.key_format, value_format=self.value_format) - ds.populate() - - if self.value_format == '8t': - value_a = 97 - value_b = 98 - value_c = 99 - value_d = 100 - else: - value_a = "aaaaa" * 100 - value_b = "bbbbb" * 100 - value_c = "ccccc" * 100 - value_d = "ddddd" * 100 - - # Pin oldest and stable to timestamp 10. - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(10) + - ',stable_timestamp=' + self.timestamp_str(10)) - - self.large_updates(uri, value_a, ds, nrows, False, 20) - self.large_updates(uri, value_b, ds, nrows, False, 30) - self.large_removes(uri, ds, nrows, False, 40) - - prepare_session = self.conn.open_session() - prepare_session.begin_transaction() - cursor = prepare_session.open_cursor(uri) - for i in range (1, nrows + 1): - cursor[i] = value_c - cursor.close() - prepare_session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(50)) - - # Verify data is visible and correct. - self.check(value_a, uri, nrows, None, 20) - self.check(value_b, uri, nrows, None, 30) - - self.evict_cursor(uri, nrows) - - # Pin stable to timestamp 40. - self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(40)) - - # Rollback the prepared update - prepare_session.rollback_transaction() - self.large_updates(uri, value_d, ds, nrows, False, 60) - - done = threading.Event() - ckpt = checkpoint_thread(self.conn, done) - try: - ckpt.start() - - # Wait for checkpoint to start before committing last transaction. - ckpt_started = 0 - while not ckpt_started: - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_started = stat_cursor[stat.conn.txn_checkpoint_running][2] - stat_cursor.close() - - self.evict_cursor(uri, nrows) - finally: - done.set() - ckpt.join() - - # Verify data is visible and correct. - self.check(value_a, uri, nrows, None, 20) - self.check(value_b, uri, nrows, None, 30) - self.check(value_d, uri, nrows, None, 60) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare22.py b/src/third_party/wiredtiger/test/suite/test_prepare22.py deleted file mode 100644 index f35f4a50052..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_prepare22.py +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wtscenario import make_scenarios - -# test_prepare22.py -# Test prepare with rollback to stable without failed eviction. -class test_prepare22(wttest.WiredTigerTestCase): - - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - delete = [ - ('delete', dict(delete=True)), - ('non-delete', dict(delete=False)), - ] - - scenarios = make_scenarios(format_values, delete) - - def test_prepare22(self): - uri = "table:test_prepare22" - self.session.create(uri, 'key_format=' + self.key_format + ',value_format=' + self.value_format) - - if self.value_format == '8t': - value_a = 97 - value_b = 98 - value_c = 99 - else: - value_a = "a" - value_b = "b" - value_c = "c" - - # Pin oldest timestamp to 1 - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) - - # Do the first update - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - cursor[1] = value_a - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(10)) - - # Do the second update - self.session.begin_transaction() - cursor[1] = value_b - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(20)) - - if self.delete: - self.session.begin_transaction() - cursor.set_key(1) - cursor.remove() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(30)) - - # Do a prepared update - self.session.begin_transaction() - cursor[1] = value_c - self.session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(40)) - - # Evict the page - session2 = self.conn.open_session() - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - session2.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(20)) - self.assertEquals(evict_cursor[1], value_b) - evict_cursor.reset() - evict_cursor.close() - session2.rollback_transaction() - - # Ensure the history store is checkpointed - session2.checkpoint() - - # Rollback the prepared transaction - self.session.rollback_transaction() - - # Set stable timestamp to 30 - self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(30)) - - # Call rollback to stable - self.conn.rollback_to_stable() - - # Evict the page again - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - session2.begin_transaction('read_timestamp=' + self.timestamp_str(20)) - self.assertEquals(evict_cursor[1], value_b) - evict_cursor.reset() - evict_cursor.close() - session2.rollback_transaction() - - # Verify we can still read back value a - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(10)) - self.assertEquals(cursor[1], value_a) - self.session.rollback_transaction() - - # Verify we can still read back value b - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(20)) - self.assertEquals(cursor[1], value_b) - self.session.rollback_transaction() - - # Verify we can still read back the deletion - if self.delete: - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(30)) - if self.value_format == '8t': - self.assertEquals(cursor[1], 0) - else: - cursor.set_key(1) - self.assertEquals(cursor.search(), wiredtiger.WT_NOTFOUND) - self.session.rollback_transaction() - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare23.py b/src/third_party/wiredtiger/test/suite/test_prepare23.py deleted file mode 100644 index f7496a5d228..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_prepare23.py +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wtscenario import make_scenarios - -# test_prepare23.py -# Test prepare rollback with rollback to stable and failed eviction. -class test_prepare23(wttest.WiredTigerTestCase): - conn_config = 'timing_stress_for_test=[failpoint_eviction_fail_after_reconciliation]' - - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - delete = [ - ('delete', dict(delete=True)), - ('non-delete', dict(delete=False)), - ] - - scenarios = make_scenarios(format_values, delete) - - def test_prepare23(self): - uri = "table:test_prepare23" - self.session.create(uri, 'key_format=' + self.key_format + ',value_format=' + self.value_format) - - if self.value_format == '8t': - value_a = 97 - value_b = 98 - value_c = 99 - else: - value_a = "a" - value_b = "b" - value_c = "c" - - # Pin oldest timestamp to 1 - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) - - cursor = self.session.open_cursor(uri) - session2 = self.conn.open_session() - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - ts = 0 - for i in range (1, 1001): - # Do the first update - self.session.begin_transaction() - cursor[i] = value_a - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts + 10)) - - # Do the second update - self.session.begin_transaction() - cursor[i] = value_b - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts + 20)) - - if self.delete: - self.session.begin_transaction() - cursor.set_key(i) - cursor.remove() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts + 30)) - - # Do a prepared update - self.session.begin_transaction() - cursor[i] = value_c - self.session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(ts + 40)) - cursor.reset() - - # Evict the page - session2.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(ts + 20)) - self.assertEquals(evict_cursor[i], value_b) - evict_cursor.reset() - session2.rollback_transaction() - - # Rollback the prepared transaction - self.session.rollback_transaction() - - # Set stable timestamp to 30 * i - self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(ts + 30)) - - # Call rollback to stable - self.conn.rollback_to_stable() - - # Verify we can still read back value a - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 10)) - self.assertEquals(cursor[i], value_a) - self.session.rollback_transaction() - - # Verify we can still read back value b - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 20)) - self.assertEquals(cursor[i], value_b) - self.session.rollback_transaction() - - # Verify we can still read back the deletion - if self.delete: - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 30)) - if self.value_format == '8t': - self.assertEquals(cursor[i], 0) - else: - cursor.set_key(i) - self.assertEquals(cursor.search(), wiredtiger.WT_NOTFOUND) - self.session.rollback_transaction() - - ts += 40 - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare24.py b/src/third_party/wiredtiger/test/suite/test_prepare24.py deleted file mode 100644 index af367af87e5..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_prepare24.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wtscenario import make_scenarios - -# test_prepare24.py -# Test prepare commit after eviction failure. -class test_prepare24(wttest.WiredTigerTestCase): - conn_config = 'timing_stress_for_test=[failpoint_eviction_fail_after_reconciliation]' - - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - delete = [ - ('delete', dict(delete=True)), - ('non-delete', dict(delete=False)), - ] - - scenarios = make_scenarios(format_values, delete) - - def test_prepare24(self): - uri = "table:test_prepare24" - self.session.create(uri, 'key_format=' + self.key_format + ',value_format=' + self.value_format) - - if self.value_format == '8t': - value_a = 97 - value_b = 98 - else: - value_a = "a" - value_b = "b" - - # Pin oldest timestamp to 1 - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) - - cursor = self.session.open_cursor(uri) - session2 = self.conn.open_session() - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - ts = 0 - for i in range (1, 1001): - # Insert a value - self.session.begin_transaction() - cursor[i] = value_a - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts + 10)) - - if self.delete: - self.session.begin_transaction() - cursor.set_key(i) - cursor.remove() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts + 20)) - - # Do a prepared update - self.session.begin_transaction() - cursor[i] = value_b - self.session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(ts + 30)) - cursor.reset() - - # Evict the page - session2.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(ts + 10)) - self.assertEquals(evict_cursor[i], value_a) - evict_cursor.reset() - session2.rollback_transaction() - - # Commit the prepared transaction - self.session.timestamp_transaction('commit_timestamp=' + self.timestamp_str(ts + 30)) - self.session.timestamp_transaction('durable_timestamp=' + self.timestamp_str(ts + 40)) - self.session.commit_transaction() - - # Evict the page again - session2.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(ts + 10)) - self.assertEquals(evict_cursor[i], value_a) - evict_cursor.reset() - session2.rollback_transaction() - - # Verify we can still read back value a - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 10)) - self.assertEquals(cursor[i], value_a) - self.session.rollback_transaction() - - # Verify we can still read back the deletion - if self.delete: - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 20)) - if self.value_format == '8t': - self.assertEquals(cursor[i], 0) - else: - cursor.set_key(i) - self.assertEquals(cursor.search(), wiredtiger.WT_NOTFOUND) - self.session.rollback_transaction() - - # Verify we can still read back the prepared update - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 30)) - self.assertEquals(cursor[i], value_b) - self.session.rollback_transaction() - - ts += 40 - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare25.py b/src/third_party/wiredtiger/test/suite/test_prepare25.py deleted file mode 100644 index e512c3c7fef..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_prepare25.py +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wtscenario import make_scenarios - -# test_prepare25.py -# Test prepare rollback and then prepare commit with failed eviction. -class test_prepare25(wttest.WiredTigerTestCase): - conn_config = 'timing_stress_for_test=[failpoint_eviction_fail_after_reconciliation]' - - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - delete = [ - ('delete', dict(delete=True)), - ('non-delete', dict(delete=False)), - ] - - scenarios = make_scenarios(format_values, delete) - - def test_prepare25(self): - uri = "table:test_prepare25" - self.session.create(uri, 'key_format=' + self.key_format + ',value_format=' + self.value_format) - - if self.value_format == '8t': - value_a = 97 - value_b = 98 - value_c = 99 - else: - value_a = "a" - value_b = "b" - value_c = "c" - - # Pin oldest timestamp to 1 - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) - - cursor = self.session.open_cursor(uri) - session2 = self.conn.open_session() - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - ts = 0 - for i in range (1, 1001): - # Insert an update - self.session.begin_transaction() - cursor[i] = value_a - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts + 10)) - - if self.delete: - self.session.begin_transaction() - cursor.set_key(i) - cursor.remove() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts + 20)) - - # Do a prepared update - self.session.begin_transaction() - cursor[i] = value_b - self.session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(ts + 30)) - cursor.reset() - - # Evict the page - session2.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(ts + 10)) - self.assertEquals(evict_cursor[i], value_a) - evict_cursor.reset() - session2.rollback_transaction() - - # Rollback the prepared transaction - self.session.rollback_transaction() - - # Do another prepared update - self.session.begin_transaction() - cursor[i] = value_c - self.session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(ts + 40)) - - # Commit the prepared update - self.session.timestamp_transaction('commit_timestamp=' + self.timestamp_str(ts + 40)) - self.session.timestamp_transaction('durable_timestamp=' + self.timestamp_str(ts + 50)) - self.session.commit_transaction() - cursor.reset() - - # Evict the page again - session2.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(ts + 10)) - self.assertEquals(evict_cursor[i], value_a) - evict_cursor.reset() - session2.rollback_transaction() - - # Verify we can still read back value a - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 10)) - self.assertEquals(cursor[i], value_a) - self.session.rollback_transaction() - - # Verify we can still read back the deletion - if self.delete: - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 20)) - if self.value_format == '8t': - self.assertEquals(cursor[i], 0) - else: - cursor.set_key(i) - self.assertEquals(cursor.search(), wiredtiger.WT_NOTFOUND) - self.session.rollback_transaction() - - # Verify we can still read back value c - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(ts + 40)) - self.assertEquals(cursor[i], value_c) - self.session.rollback_transaction() - - ts += 50 - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare26.py b/src/third_party/wiredtiger/test/suite/test_prepare26.py deleted file mode 100644 index 52e08cedff6..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_prepare26.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wtscenario import make_scenarios - -# test_prepare26.py -# Test prepare rollback and then delete the key. -class test_prepare26(wttest.WiredTigerTestCase): - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - scenarios = make_scenarios(format_values) - - def test_prepare26(self): - uri = "table:test_prepare26" - self.session.create(uri, 'key_format=' + self.key_format + ',value_format=' + self.value_format) - - if self.value_format == '8t': - value_a = 97 - value_b = 98 - value_c = 99 - else: - value_a = "a" - value_b = "b" - value_c = "c" - - # Pin oldest timestamp to 1 - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) - - # Insert a value - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - cursor[1] = value_a - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(10)) - - # Do a prepared update - self.session.begin_transaction() - cursor[1] = value_c - self.session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(20)) - - # Evict the page - session2 = self.conn.open_session() - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - session2.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(10)) - self.assertEquals(evict_cursor[1], value_a) - evict_cursor.reset() - evict_cursor.close() - session2.rollback_transaction() - - # Rollback the prepared transaction - self.session.rollback_transaction() - - # Delete the key - self.session.begin_transaction() - cursor.set_key(1) - cursor.remove() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(30)) - - # Set oldest timestamp to 30 - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(30)) - - # Evict the page again - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - session2.begin_transaction() - evict_cursor.set_key(1) - if self.value_format == '8t': - self.assertEquals(evict_cursor[1], 0) - else: - evict_cursor.set_key(1) - self.assertEquals(evict_cursor.search(), wiredtiger.WT_NOTFOUND) - evict_cursor.reset() - evict_cursor.close() - session2.rollback_transaction() - - # Do another update - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - cursor[1] = value_b - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(40)) - - # Do another update - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - cursor[1] = value_c - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(50)) - - # Evict the page again - evict_cursor = session2.open_cursor(uri, None, 'debug=(release_evict)') - session2.begin_transaction('read_timestamp=' + self.timestamp_str(50)) - self.assertEquals(evict_cursor[1], value_c) - evict_cursor.reset() - evict_cursor.close() - session2.rollback_transaction() - - # Verify we read nothing at the oldest - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(30)) - if self.value_format == '8t': - self.assertEquals(cursor[1], 0) - else: - cursor.set_key(1) - self.assertEquals(cursor.search(), wiredtiger.WT_NOTFOUND) - self.session.rollback_transaction() - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare28.py b/src/third_party/wiredtiger/test/suite/test_prepare28.py deleted file mode 100644 index 55946188089..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_prepare28.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -from time import sleep -import wttest, threading - -# Prior to a bugfix in WiredTiger it was possible to read a partial transaction if the config -# ignore prepare was provided. This test demonstrates that case. -class test_prepare28(wttest.WiredTigerTestCase): - conn_config= 'timing_stress_for_test=[prepare_resolution_2]' - uri = 'table:test_prepare28' - numrows = 1 - value1 = 'aaaaa' - value2 = 'bbbbb' - value3 = 'ccccc' - - def test_ignore_prepare(self): - self.session.create(self.uri, 'key_format=i,value_format=S') - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1)) - cursor = self.session.open_cursor(self.uri) - # Prepare a value at timestamp 4 - self.session.begin_transaction() - cursor[1] = self.value1 - cursor[1] = self.value2 - cursor[1] = self.value3 - self.session.prepare_transaction('prepare_timestamp=4') - # Create a thread. - ooo_thread = threading.Thread(target=self.read_update) - # Start the thread - ooo_thread.start() - self.session.commit_transaction('commit_timestamp=6,durable_timestamp=6') - - def read_update(self): - sleep(0.1) - session = self.setUpSessionOpen(self.conn) - cursor = session.open_cursor(self.uri) - session.begin_transaction('ignore_prepare=true') - cursor.set_key(1) - session.breakpoint() - # Read here - ret = cursor.search() - # Assert it didn't find anything, i.e. not WT_NOTFOUND - assert(ret == -31803) - session.commit_transaction() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py b/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py index 8713ac2c32b..430032cc344 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py @@ -151,7 +151,5 @@ class test_prepare_hs01(wttest.WiredTigerTestCase): nkeys = 4000 self.prepare_updates(uri, ds, nrows, nsessions, nkeys) - self.ignoreStdoutPatternIfExists('Eviction took more than 1 minute') - if __name__ == '__main__': wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_recovery01.py b/src/third_party/wiredtiger/test/suite/test_recovery01.py deleted file mode 100644 index 4e8dd46bd1e..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_recovery01.py +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wttest -from helper import simulate_crash_restart -from wtdataset import SimpleDataSet -from wiredtiger import stat -from wtscenario import make_scenarios - -# test_recovery01.py -# Test WiredTiger logs time spent during recovery and shutdown. -class test_recovery01(wttest.WiredTigerTestCase): - - format_values = [ - ('column', dict(key_format='r', value_format='S')), - ('column_fix', dict(key_format='r', value_format='8t')), - ('row_integer', dict(key_format='i', value_format='S')), - ] - - restart_values = [ - ('crash', dict(crash=True)), - ('shutdown', dict(crash=False)) - ] - - scenarios = make_scenarios(format_values, restart_values) - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - # BACKPORT remove for CI - #self.ignoreStdoutPattern('WT_VERB_RECOVERY_PROGRESS') - - def conn_config(self): - # BACKPORT modify for CI - #config = 'cache_size=50MB,statistics=(all),log=(enabled=true),verbose=(recovery_progress)' - config = 'cache_size=50MB,statistics=(all),log=(enabled=true)' - return config - - def large_updates(self, uri, value, ds, nrows, commit_ts): - # Update a large number of records. - session = self.session - cursor = session.open_cursor(uri) - for i in range(1, nrows+1): - session.begin_transaction() - cursor[ds.key(i)] = value - if commit_ts == 0: - session.commit_transaction() - else: - session.commit_transaction('commit_timestamp=' + self.timestamp_str(commit_ts)) - cursor.close() - - def check(self, check_value, uri, nrows, read_ts): - session = self.session - if read_ts == 0: - session.begin_transaction() - else: - session.begin_transaction('read_timestamp=' + self.timestamp_str(read_ts)) - cursor = session.open_cursor(uri) - count = 0 - for k, v in cursor: - self.assertEqual(v, check_value) - count += 1 - session.commit_transaction() - self.assertEqual(count, nrows) - - def test_recovery(self): - nrows = 1000 - - # Create two tables. One logged and another one non-logged. - uri_1 = "table:recovery01_1" - ds_1 = SimpleDataSet( - self, uri_1, 0, key_format=self.key_format, value_format=self.value_format, - config='log=(enabled=true)') - ds_1.populate() - - uri_2 = "table:recovery01_2" - ds_2 = SimpleDataSet( - self, uri_2, 0, key_format=self.key_format, value_format=self.value_format, - config='log=(enabled=false)') - ds_2.populate() - - if self.value_format == '8t': - valuea = 97 - valueb = 98 - else: - valuea = "aaaaa" * 100 - valueb = "bbbbb" * 100 - - # Pin oldest and stable to timestamp 1. - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1) + - ',stable_timestamp=' + self.timestamp_str(1)) - - self.large_updates(uri_1, valuea, ds_1, nrows, 0) - self.check(valuea, uri_1, nrows, 0) - - self.large_updates(uri_2, valuea, ds_2, nrows, 10) - self.check(valuea, uri_2, nrows, 10) - - self.large_updates(uri_1, valueb, ds_1, nrows, 0) - self.check(valueb, uri_1, nrows, 0) - - self.large_updates(uri_2, valueb, ds_2, nrows, 20) - self.check(valueb, uri_2, nrows, 20) - - self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(10)) - self.session.checkpoint() - - if self.crash: - simulate_crash_restart(self, ".", "RESTART") - else: - self.reopen_conn() - - self.check(valueb, uri_1, nrows, 0) - self.check(valuea, uri_2, nrows, 10) - self.check(valuea, uri_2, nrows, 20) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable04.py b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable04.py index a65f7c5ff79..6bc9cda70a4 100755 --- a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable04.py +++ b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable04.py @@ -55,12 +55,7 @@ class test_rollback_to_stable04(test_rollback_to_stable_base): ('prepare', dict(prepare=True)) ] - evict = [ - ('no_evict', dict(evict=False)), - ('evict', dict(evict=True)) - ] - - scenarios = make_scenarios(format_values, in_memory_values, prepare_values, evict) + scenarios = make_scenarios(format_values, in_memory_values, prepare_values) def conn_config(self): config = 'cache_size=500MB,statistics=(all)' @@ -117,11 +112,6 @@ class test_rollback_to_stable04(test_rollback_to_stable_base): self.large_modifies(uri, 'Q', ds, 0, 1, nrows, self.prepare, 30) self.large_modifies(uri, 'R', ds, 1, 1, nrows, self.prepare, 40) self.large_modifies(uri, 'S', ds, 2, 1, nrows, self.prepare, 50) - - # Evict the pages to disk - if self.evict: - self.evict_cursor(uri, nrows, value_modS) - self.large_updates(uri, value_b, ds, nrows, self.prepare, 60) self.large_updates(uri, value_c, ds, nrows, self.prepare, 70) self.large_modifies(uri, 'T', ds, 3, 1, nrows, self.prepare, 80) diff --git a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable06.py b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable06.py index c9eb37918c5..676bf934b6e 100755 --- a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable06.py +++ b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable06.py @@ -52,12 +52,7 @@ class test_rollback_to_stable06(test_rollback_to_stable_base): ('prepare', dict(prepare=True)) ] - evict = [ - ('no_evict', dict(evict=False)), - ('evict', dict(evict=True)) - ] - - scenarios = make_scenarios(format_values, in_memory_values, prepare_values, evict) + scenarios = make_scenarios(format_values, in_memory_values, prepare_values) def conn_config(self): config = 'cache_size=50MB,statistics=(all)' @@ -134,21 +129,5 @@ class test_rollback_to_stable06(test_rollback_to_stable_base): else: self.assertGreaterEqual(upd_aborted + hs_removed + keys_removed, nrows * 4) - # Reinsert the same updates with the same timestamps and flush to disk. - # If the updates have not been correctly removed by RTS WiredTiger will - # see the key already exists in the history store and abort. - self.large_updates(uri, value_a, ds, nrows, self.prepare, 20) - self.large_updates(uri, value_b, ds, nrows, self.prepare, 30) - self.large_updates(uri, value_c, ds, nrows, self.prepare, 40) - self.large_updates(uri, value_d, ds, nrows, self.prepare, 50) - - # Do a checkpoint before shutdown - if not self.in_memory: - self.session.checkpoint() - - # Evict the pages to disk - if self.evict: - self.evict_cursor(uri, nrows, value_d) - if __name__ == '__main__': wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable39.py b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable39.py deleted file mode 100644 index 90bf63935da..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable39.py +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -import threading, time -from helper import simulate_crash_restart -from test_rollback_to_stable01 import test_rollback_to_stable_base -from wiredtiger import stat -from wtdataset import SimpleDataSet -from wtscenario import make_scenarios -from wtthread import checkpoint_thread - -# test_rollback_to_stable39.py -# Test to delay checkpoint and perform eviction in parallel to ensure eviction moves the content from data store to history store -# and then checkpoint history store to see the same content in data store and history store. Later use the checkpoint to restore -# the database which will trigger eviction to insert the same record from data store to history store. -class test_rollback_to_stable39(test_rollback_to_stable_base): - restart_config = False - - format_values = [ - ('column', dict(key_format='r', value_format='S', prepare_extraconfig='')), - ('column_fix', dict(key_format='r', value_format='8t', - prepare_extraconfig=',allocation_size=512,leaf_page_max=512')), - ('row_integer', dict(key_format='i', value_format='S', prepare_extraconfig='')), - ] - - prepare_values = [ - ('no_prepare', dict(prepare=False)), - ('prepare', dict(prepare=True)) - ] - - scenarios = make_scenarios(format_values, prepare_values) - - def conn_config(self): - config = 'cache_size=25MB,statistics=(all),statistics_log=(json,on_close,wait=1)' - if self.restart_config: - config += ',timing_stress_for_test=[checkpoint_slow]' - else: - config += ',timing_stress_for_test=[history_store_checkpoint_delay]' - return config - - def test_rollback_to_stable(self): - nrows = 1000 - - # Create a table. - uri = "table:rollback_to_stable39" - ds = SimpleDataSet( - self, uri, 0, key_format=self.key_format, value_format=self.value_format) - ds.populate() - - if self.value_format == '8t': - value_a = 97 - value_b = 98 - value_c = 99 - else: - value_a = "aaaaa" * 100 - value_b = "bbbbb" * 100 - value_c = "ccccc" * 100 - - # Pin oldest and stable to timestamp 10. - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(10) + - ',stable_timestamp=' + self.timestamp_str(10)) - - # Perform several updates. - self.large_updates(uri, value_a, ds, nrows, self.prepare, 20) - # Verify data is visible and correct. - self.check(value_a, uri, nrows, None, 21 if self.prepare else 20) - - self.large_removes(uri, ds, nrows, self.prepare, 30) - # Verify no data is visible. - self.check(value_a, uri, 0, nrows, 31 if self.prepare else 30) - - # Pin stable to timestamp 40 if prepare otherwise 30. - self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(40 if self.prepare else 30)) - - # Create a checkpoint thread - done = threading.Event() - ckpt = checkpoint_thread(self.conn, done) - try: - ckpt.start() - - # Wait for checkpoint to start before committing. - ckpt_started = 0 - while not ckpt_started: - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_started = stat_cursor[stat.conn.txn_checkpoint_running][2] - stat_cursor.close() - time.sleep(1) - - # Perform several updates in parallel with checkpoint. - # Rollbacks may occur when checkpoint is running, so retry as needed. - self.retry_rollback('update ds, e', None, - lambda: self.large_updates(uri, value_b, ds, nrows, self.prepare, 50)) - self.evict_cursor(uri, nrows, value_b) - finally: - done.set() - ckpt.join() - - # Simulate a crash by copying to a new directory(RESTART). - self.restart_config = True - simulate_crash_restart(self, ".", "RESTART") - - # Check that the correct data is seen at and after the stable timestamp. - self.check(value_a, uri, nrows, None, 21 if self.prepare else 20) - self.check(value_a, uri, 0, nrows, 40) - - stat_cursor = self.session.open_cursor('statistics:', None, None) - hs_removed = stat_cursor[stat.conn.txn_rts_hs_removed][2] - hs_sweep = stat_cursor[stat.conn.txn_rts_sweep_hs_keys][2] - keys_removed = stat_cursor[stat.conn.txn_rts_keys_removed][2] - keys_restored = stat_cursor[stat.conn.txn_rts_keys_restored][2] - upd_aborted = stat_cursor[stat.conn.txn_rts_upd_aborted][2] - stat_cursor.close() - - self.assertEqual(keys_removed, 0) - self.assertEqual(keys_restored, 0) - self.assertEqual(upd_aborted, 0) - self.assertEqual(hs_removed, 0) - self.assertEqual(hs_sweep, 0) - - # Perform several updates. - self.large_updates(uri, value_c, ds, nrows, self.prepare, 60) - - # Verify data is visible and correct. - self.check(value_c, uri, nrows, None, 61 if self.prepare else 60) - - # Create a checkpoint thread - done = threading.Event() - ckpt = checkpoint_thread(self.conn, done) - try: - ckpt.start() - - # Wait for checkpoint to start before committing. - ckpt_started = 0 - while not ckpt_started: - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_started = stat_cursor[stat.conn.txn_checkpoint_running][2] - stat_cursor.close() - time.sleep(1) - - self.evict_cursor(uri, nrows, value_c) - finally: - done.set() - ckpt.join() - - -if __name__ == '__main__': - wttest.run() - diff --git a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable40.py b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable40.py deleted file mode 100755 index 07df57c2966..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable40.py +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import fnmatch, os, shutil, time -from helper import copy_wiredtiger_home, simulate_crash_restart -from test_rollback_to_stable01 import test_rollback_to_stable_base -from wiredtiger import stat -from wtdataset import SimpleDataSet -from wtscenario import make_scenarios - -# test_rollback_to_stable40.py -# Test the rollback to stable operation performs as expected following a server crash -# and recovery. Verify that the on-disk value is replaced by the correct value from -# the history store. -class test_rollback_to_stable40(test_rollback_to_stable_base): - session_config = 'isolation=snapshot' - - key_format_values = [ - ('column', dict(key_format='r')), - ('integer_row', dict(key_format='i')), - ] - - scenarios = make_scenarios(key_format_values) - - def conn_config(self): - config = 'cache_size=1MB,statistics=(all),log=(enabled=true)' - return config - - def test_rollback_to_stable(self): - nrows = 3 - - # Create a table without logging. - uri = "table:rollback_to_stable40" - ds = SimpleDataSet( - self, uri, 0, key_format=self.key_format, value_format="S", config='log=(enabled=false)') - ds.populate() - - # Pin oldest and stable to timestamp 10. - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(10) + - ',stable_timestamp=' + self.timestamp_str(10)) - - value_a = "aaaaa" * 100 - value_b = "bbbbb" * 100 - value_c = "ccccc" * 100 - value_d = "ddddd" * 100 - - # Insert 3 keys with same updates. - cursor = self.session.open_cursor(uri) - self.session.begin_transaction() - cursor[1] = value_a - cursor[2] = value_a - cursor[3] = value_a - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(20)) - - # Update the first and last key with another value with a large timestamp. - self.session.begin_transaction() - cursor[1] = value_d - cursor[3] = value_d - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(1000)) - - # Update the middle key with lot of updates to generate more history. - for i in range(21, 499): - self.session.begin_transaction() - cursor[2] = value_b + str(i) - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(i)) - - # With this checkpoint, all the updates in the history store are persisted to disk. - self.session.checkpoint() - - self.session.begin_transaction() - cursor[2] = value_c - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(500)) - - # Pin oldest and stable to timestamp 500. - self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(500) + - ',stable_timestamp=' + self.timestamp_str(500)) - - # Evict the globally visible update to write to the disk, this will reset the time window. - evict_cursor = self.session.open_cursor(uri, None, "debug=(release_evict)") - self.session.begin_transaction("ignore_prepare=true") - evict_cursor.set_key(2) - self.assertEqual(evict_cursor[2], value_c) - evict_cursor.reset() - evict_cursor.close() - self.session.rollback_transaction() - - self.session.begin_transaction() - cursor[2] = value_d - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(501)) - - # 1. This checkpoint will move the globally visible update to the first of the key range. - # 2. The existing updates in the history store are having with a larger timestamp are - # obsolete, so they are not explicitly removed. - # 3. Any of the history store updates that are already evicted will not rewrite by the - # checkpoint. - self.session.checkpoint() - - # Verify data is visible and correct. - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(1000)) - for i in range (1, nrows + 1): - cursor.set_key(ds.key(i)) - self.assertEqual(cursor.search(), 0) - self.assertEquals(cursor.get_value(), value_d) - self.session.rollback_transaction() - cursor.close() - - # Simulate a server crash and restart. - simulate_crash_restart(self, ".", "RESTART") - - # Verify data is visible and correct. - cursor = self.session.open_cursor(uri) - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(1000)) - for i in range (1, nrows + 1): - cursor.set_key(ds.key(i)) - self.assertEqual(cursor.search(), 0) - if i % 2 == 0: - self.assertEquals(cursor.get_value(), value_c) - else: - self.assertEquals(cursor.get_value(), value_a) - self.session.rollback_transaction() - - stat_cursor = self.session.open_cursor('statistics:', None, None) - calls = stat_cursor[stat.conn.txn_rts][2] - hs_removed = stat_cursor[stat.conn.txn_rts_hs_removed][2] - keys_removed = stat_cursor[stat.conn.txn_rts_keys_removed][2] - keys_restored = stat_cursor[stat.conn.txn_rts_keys_restored][2] - pages_visited = stat_cursor[stat.conn.txn_rts_pages_visited][2] - upd_aborted = stat_cursor[stat.conn.txn_rts_upd_aborted][2] - stat_cursor.close() - - self.assertEqual(calls, 0) - self.assertEqual(keys_removed, 0) - self.assertEqual(keys_restored, 0) - self.assertGreaterEqual(upd_aborted, 0) - self.assertGreater(pages_visited, 0) - self.assertGreaterEqual(hs_removed, 3) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_scrub_eviction_prepare.py b/src/third_party/wiredtiger/test/suite/test_scrub_eviction_prepare.py deleted file mode 100644 index 92eabcc4a37..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_scrub_eviction_prepare.py +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import wiredtiger, wttest -from wiredtiger import stat, WiredTigerError - -# test_scrub_eviction_prepare.py -# -# Test to do the following steps. -# 1. Prepare an update with one key (key-2) -# 2. Commit an update with another key(key-1) -# 3, Make sure both the keys are on the same page. -# 4. Set the key to full update and evict the page with release_evict -# 5. Read the page back in memory -# 6. Checkpoint -# 7. Repeat steps 5,6 and validate that the page read back into memory should -# not be reconciled everytime with the help of btree stat. -class test_scrub_eviction_prepare(wttest.WiredTigerTestCase): - - def conn_config(self): - config = 'cache_size=100MB,statistics=(all),statistics_log=(json,on_close,wait=1)' - return config - - def get_stats(self, uri): - stat_cursor = self.session.open_cursor('statistics:' + uri) - btree_ckpt_pages_rec = stat_cursor[stat.dsrc.btree_checkpoint_pages_reconciled][2] - stat_cursor.close() - return btree_ckpt_pages_rec - - def read_key(self, uri): - cur2 = self.session.open_cursor(uri) - cur2.set_key(2) - self.assertEqual(cur2.search(), 0) - cur2.close() - - def test_scrub_eviction_prepare(self): - uri = 'table:test_scrub_eviction_prepare' - - # Create a table. - self.session.create(uri, 'key_format=i,value_format=S') - session2 = self.conn.open_session() - session3 = self.conn.open_session() - cursor2 = session2.open_cursor(uri) - - # Insert a key 2 and commit the transaction. - session2.begin_transaction() - cursor2[2] = '20' - session2.commit_transaction() - - # Insert a key 1 and prepare the transaction. - session3.begin_transaction() - cursor2[1] = '10' - session3.prepare_transaction('prepare_timestamp=10') - - # Leaving a cursor open after updates can affect the release_evict cursor's - # behavior. It might not guarantee eviction because the open cursor pins the - # page in the cache. Therefore, always close the cursor explicitly before using. - cursor2.close() - - # Set the key to 2(to avoid prepare conflict if the key is set to 1) in the evict - # cursor and evict the page which has both the keys 1 and 2. - evict_cursor = self.session.open_cursor(uri, None, "debug=(release_evict)") - evict_cursor.set_key(2) - self.assertEqual(evict_cursor.search(), 0) - self.assertEqual(evict_cursor.reset(), 0) - evict_cursor.close() - - self.session.checkpoint() - self.assertEqual(1, self.get_stats(uri)) - - # Read the key 2 to avoid prepared conflict, this will bring back the page - # that has both the keys 1 & 2 into the memory. - self.read_key(uri) - self.session.checkpoint() - # The page with prepared update should not be reconciled again. - self.assertEqual(1, self.get_stats(uri)) - - # Read the key 2 to avoid prepared conflict, this will bring back the page - # that has both the keys 1 & 2 into the memory. - self.read_key(uri) - self.session.checkpoint() - # The page with prepared update should not be reconciled again. - self.assertEqual(1, self.get_stats(uri)) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_search_near05.py b/src/third_party/wiredtiger/test/suite/test_search_near05.py deleted file mode 100644 index f54485817c1..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_search_near05.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# test_search_near05.py -# Search_near with a key past the end. - -import wttest -from wtscenario import make_scenarios - -class test_search_near05(wttest.WiredTigerTestCase): - uri = 'file:test_search_near05' - - key_format_values = [ - ('fix', dict(key_format='r', value_format='8t')), - ('var', dict(key_format='r', value_format='I')), - ('row', dict(key_format='Q', value_format='I')), - ] - - ops = [ - ('update', dict(delete=False)), - ('delete', dict(delete=True)), - ] - - scenarios = make_scenarios(key_format_values, ops) - - def evict(self, value): - evict_cursor = self.session.open_cursor(self.uri, None, "debug=(release_evict)") - self.session.begin_transaction() - for i in range(1, 1001): - v = evict_cursor[i] - self.assertEqual(v, value) - self.assertEqual(evict_cursor.reset(), 0) - self.session.rollback_transaction() - - def test_implicit_record_cursor_insert_next(self): - self.session.create(self.uri, 'key_format={},value_format={}'.format(self.key_format, self.value_format)) - cursor = self.session.open_cursor(self.uri) - value1 = 1 - value2 = 2 - for i in range(1, 1001): - cursor[i] = value1 - - # Do a checkpoint to write everything to the disk image - self.session.checkpoint() - # Evict the data - self.evict(value1) - - # Update or delete the last key - if self.delete: - self.session.begin_transaction() - cursor.set_key(1000) - cursor.remove() - self.session.commit_transaction() - else: - cursor[1000] = value2 - - self.session.begin_transaction() - cursor.set_key(1100) - cursor.search_near() - - if self.delete: - if self.value_format == "8t": - self.assertEqual(cursor.get_key(), 1000) - self.assertEqual(cursor.get_value(), 0) - else: - self.assertEqual(cursor.get_key(), 999) - self.assertEqual(cursor.get_value(), value1) - else: - self.assertEqual(cursor.get_key(), 1000) - self.assertEqual(cursor.get_value(), value2) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_search_near06.py b/src/third_party/wiredtiger/test/suite/test_search_near06.py deleted file mode 100644 index 81f9f853c76..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_search_near06.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# test_search_near06.py -# Search_near with a key past the end much like search_near_05, but -# this time use timestamps to ensure the update isn't visible. - -import wttest -from wtscenario import make_scenarios - -class test_search_near06(wttest.WiredTigerTestCase): - uri = 'file:test_search_near06' - - key_format_values = [ - ('fix', dict(key_format='r', value_format='8t')), - ('var', dict(key_format='r', value_format='I')), - ('row', dict(key_format='Q', value_format='I')), - ] - - ops = [ - ('update', dict(delete=False)), - ('delete', dict(delete=True)), - ] - - scenarios = make_scenarios(key_format_values, ops) - - def evict(self, value): - evict_cursor = self.session.open_cursor(self.uri, None, "debug=(release_evict)") - self.session.begin_transaction() - for i in range(1, 1001): - v = evict_cursor[i] - self.assertEqual(v, value) - self.assertEqual(evict_cursor.reset(), 0) - self.session.rollback_transaction() - - def test_implicit_record_cursor_insert_next(self): - self.session.create(self.uri, 'key_format={},value_format={}'.format(self.key_format, self.value_format)) - cursor = self.session.open_cursor(self.uri) - value1 = 1 - value2 = 2 - for i in range(1, 1001): - cursor[i] = value1 - - # Do a checkpoint to write everything to the disk image - self.session.checkpoint() - # Evict the data - self.evict(value1) - - # Update or delete the last key - if self.delete: - self.session.begin_transaction() - cursor.set_key(1000) - cursor.remove() - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(10)) - else: - self.session.begin_transaction() - cursor[1000] = value2 - self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(10)) - - self.session.begin_transaction('read_timestamp=' + self.timestamp_str(5)) - cursor.set_key(1100) - cursor.search_near() - - self.assertEqual(cursor.get_key(), 1000) - self.assertEqual(cursor.get_value(), value1) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_stat08.py b/src/third_party/wiredtiger/test/suite/test_stat08.py index 0b833c1934c..7e91932d1d7 100644 --- a/src/third_party/wiredtiger/test/suite/test_stat08.py +++ b/src/third_party/wiredtiger/test/suite/test_stat08.py @@ -33,29 +33,14 @@ import wiredtiger, wttest # Session statistics for bytes read into the cache. class test_stat08(wttest.WiredTigerTestCase): - nentries = 100000 - # Leave the cache size on the default setting to avoid filling up the cache - # too much and triggering unnecessary rollbacks. But make the value fairly - # large to make obvious change to the statistics. - conn_config = 'statistics=(all)' - entry_value = "abcde" * 400 + nentries = 350000 + conn_config = 'cache_size=10MB,statistics=(all)' + entry_value = "abcde" * 40 BYTES_READ = wiredtiger.stat.session.bytes_read READ_TIME = wiredtiger.stat.session.read_time session_stats = { BYTES_READ : "session: bytes read into cache", \ READ_TIME : "session: page read from disk to cache time (usecs)"} - def get_stat(self, stat): - statc = self.session.open_cursor('statistics:session', None, None) - val = statc[stat][2] - statc.close() - return val - - def get_cstat(self, stat): - statc = self.session.open_cursor('statistics:', None, None) - val = statc[stat][2] - statc.close() - return val - def check_stats(self, cur, k): # # Some Windows machines lack the time granularity to detect microseconds. @@ -74,33 +59,13 @@ class test_stat08(wttest.WiredTigerTestCase): self.assertTrue(value > 0) def test_session_stats(self): - # We want to configure for pages to be explicitly evicted when we are done with them so - # that we can correctly verify the statistic measuring bytes read from cache. - self.session = self.conn.open_session("debug=(release_evict_page=true)") - self.session.create("table:test_stat08", "key_format=i,value_format=S") + self.session = self.conn.open_session() + self.session.create("table:test_stat08", + "key_format=i,value_format=S") cursor = self.session.open_cursor('table:test_stat08', None, None) - self.session.begin_transaction() - txn_dirty = self.get_stat(wiredtiger.stat.session.txn_bytes_dirty) - cache_dirty = self.get_cstat(wiredtiger.stat.conn.cache_bytes_dirty) - self.assertEqual(txn_dirty, 0) - self.assertLessEqual(txn_dirty, cache_dirty) # Write the entries. - for i in range(1, self.nentries): - txn_dirty_before = self.get_stat(wiredtiger.stat.session.txn_bytes_dirty) + for i in range(0, self.nentries): cursor[i] = self.entry_value - txn_dirty_after = self.get_stat(wiredtiger.stat.session.txn_bytes_dirty) - self.assertLess(txn_dirty_before, txn_dirty_after) - # Since we're using an explicit transaction, we need to resolve somewhat frequently. - # So check the statistics and restart the transaction every 200 operations. - if i % 200 == 0: - cache_dirty_txn = self.get_cstat(wiredtiger.stat.conn.cache_bytes_dirty) - # Make sure the txn's dirty bytes doesn't exceed the cache. - self.assertLessEqual(txn_dirty_after, cache_dirty_txn) - self.session.rollback_transaction() - self.session.begin_transaction() - txn_dirty = self.get_stat(wiredtiger.stat.session.txn_bytes_dirty) - self.assertEqual(txn_dirty, 0) - self.session.commit_transaction() cursor.reset() # Read the entries. diff --git a/src/third_party/wiredtiger/test/suite/test_sweep04.py b/src/third_party/wiredtiger/test/suite/test_sweep04.py deleted file mode 100755 index a741639f82c..00000000000 --- a/src/third_party/wiredtiger/test/suite/test_sweep04.py +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/env python -# -# Public Domain 2014-present MongoDB, Inc. -# Public Domain 2008-2014 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# test_sweep04.py -# Test lots of tables with more steadily created and dropped. -# A core group of tables is used most often and hangs around. -# Test that the total number of dhandles, while increasing, -# starts to level off, that is, the sweeps are keeping up. -# Then test that if we only access the core tables for a while, -# the total number of dhandles comes back down to a small number. - -import time -from suite_random import suite_random -from wiredtiger import stat -import wttest - -# Given a set of values corresponding to successive times, -# we have an implied set of points in two dimensions. -# Compute the average for the values and the slope for the -# least squares regression of the line. -# -# We'd use numpy, but we aren't assured that it is always installed -# for our python. -def average_slope(y): - n = len(y) - if n == 0: - return [0, 0] # there's no average or slope - elif n == 1: - return [y[0], 0] # there's no slope - - average = sum(y) / n - x = range(1, n + 1) # The implied x axis, steadily increasing integers. - - # Here's a formula for least squares slope: - # https://www.mathsisfun.com/data/least-squares-regression.html - top = n * sum(x[i] * y[i] for i in range(n)) - sum(x) * sum(y) - bottom = n * sum(x[i]**2 for i in range(n)) - sum(x)**2 - slope = top / bottom - return [average, slope] - -@wttest.longtest("lots of files") -class test_sweep04(wttest.WiredTigerTestCase): - tablebase = 'test_sweep04' - uri = 'table:' + tablebase - - # Configuration values for the run. If any of these values are changed, - # the simulation will run, but the acceptance criteria may fail at the end. - core_tables = 10 # Number of core tables that always exist. - transient_tables = 100 # Number of transient tables at any time. - transient_examined = 10 # Number of transient tables opened at a time. - ratio_examined = 0.01 # The chance that transient tables are examined. - transient_table_max = 10000 # Defines the length of the run. - numkv = 1 # Number of k/v pairs. Shouldn't matter for this test. - nsessions = 100 # Number of sessions in our pool. - - conn_config = 'file_manager=(close_handle_minimum=0,' + \ - 'close_idle_time=3,close_scan_interval=1),' + \ - 'statistics=(fast),operation_tracking=(enabled=false),' - - create_params = 'key_format=i,value_format=i' - - # Create a uri for one of the core tables - def core_uri(self, i): - return '%s-c.%d' % (self.uri, i) - - # Create a uri for one of the transient tables - def transient_uri(self, i): - return '%s-t.%d' % (self.uri, i) - - def create_table(self, uri): - self.session.create(uri, self.create_params) - c = self.session.open_cursor(uri, None) - for k in range(self.numkv): - c[k+1] = 1 - c.close() - - # Access a set of tables in some minimal way that ensures its - # dhandle is at least momentarily in use. "uri_maker" is a - # function that is used to create the uri. - def examine(self, session, uri_maker, start, count): - for i in range(0, count): - c = session.open_cursor(uri_maker(start + i)) - self.assertEquals(c[1], 1) - c.close() - - def test_big_run(self): - # populate - r = suite_random() - - # Create the set of core tables - for i in range(0, self.core_tables): - self.create_table(self.core_uri(i)) - - created_transient = 0 # Running total of transients created. - available_transient = 0 # The next available transient number. - - # Create the initial batch of transient tables. - while created_transient < self.transient_tables: - self.create_table(self.transient_uri(created_transient)) - created_transient += 1 - - # Open all the session we'll use in advance. - sessions = [] - for i in range(self.nsessions): - sessions.append(self.conn.open_session()) - - # We keep the dhandle counts for each time we get stats. - dhandle_counts = [] - - # The big loop: For half the run, we are stressing by accessing both core tables - # and transient tables, and creating/dropping transient tables. The second half - # of the run, we stop creating/dropping tables and only access core tables - # just to see if all outstanding dhandles are swept. - maxloop = self.transient_table_max * 2 - lasttime = time.time() - for loopcount in range(0, maxloop): - stressing = (created_transient < self.transient_table_max) - if loopcount % 100 == 0: - self.pr('{}/{} stressing={}'.format(loopcount, maxloop, stressing)) - - # Make sure at least 3 seconds elapses between each 100 times through - # the loop, to give the various sweeps time to operate. - thistime = time.time() - delta = thistime - lasttime - if delta < 3.0: - time.sleep(3.0 - delta) - lasttime = thistime - - if stressing: - self.session.drop(self.transient_uri(available_transient), "force") - available_transient += 1 - self.create_table(self.transient_uri(created_transient)) - created_transient += 1 - - rand_session = sessions[r.rand_range(0, self.nsessions)] - - # In the stress part of the run, some small fraction (given by ratio_examined) will - # look at the transient tables. Looking at these rarely makes them candidates for - # closing by the connection sweep. - big = 1000000 # Any large number works. - if stressing and r.rand32() % big > big * self.ratio_examined: - # Access "count" transient tables, starting at table "tnum". - count = self.transient_examined - tnum = r.rand_range(available_transient, available_transient + self.transient_tables - count) - self.examine(rand_session, self.transient_uri, tnum, count) - else: - # Access a single core table, numbered "tnum". - tnum = r.rand_range(0, self.core_tables) - self.examine(rand_session, self.core_uri, tnum, 1) - - if loopcount % 100 == 99: - # Gather statistics about the number of dhandles, to be checked at - # the end of the run. - stat_cursor = self.session.open_cursor('statistics:', None, None) - - # Enable for detailed output. - if False: - close = stat_cursor[stat.conn.dh_sweep_close][2] - remove = stat_cursor[stat.conn.dh_sweep_remove][2] - sweep = stat_cursor[stat.conn.dh_sweeps][2] - sclose = stat_cursor[stat.conn.dh_session_handles][2] - ssweep = stat_cursor[stat.conn.dh_session_sweeps][2] - tod = stat_cursor[stat.conn.dh_sweep_tod][2] - ref = stat_cursor[stat.conn.dh_sweep_ref][2] - self.pr(('DHANDLE STATS: close={}, remove={}, sweep={}, session_handles={}, '+ - 'session_sweeps={}, sweep_tod={}, sweep_ref={}').format( - close, remove, sweep, sclose, ssweep, tod, ref)) - - dhandles = stat_cursor[stat.conn.dh_conn_handle_count][2] - files_open = stat_cursor[stat.conn.file_open][2] - self.pr(' dhandle_count={}'.format(dhandles)) - self.pr(' file_open={}'.format(files_open)) - dhandle_counts.append(dhandles) - stat_cursor.close() - - # This (extremely verbose) debugging is disabled, as it writes to stdout, - # and that causes the test framework fail the test. - if False: - if loopcount % 1000 == 999: - self.conn.debug_info('handles=true') - self.pr(' average,slope={}'.format(str(average_slope(dhandle_counts)))) - - # Reset any sessions we've used. This may be necessary to trigger some session sweeps. - rand_session.reset() - self.session.reset() - - # The run is finished, process and check the dhandle counts we've collected. - # - # Half the run is dhandle growth, and the second half should see a decline. - # If everything is working right in the first half of the run, we should start - # to see the number of dhandles start to reach an asymptote. So we check the slope of - # the dhandle line in the second quarter to see that is the case. In the second - # half of the run, where we aren't accessing the transient tables, those references - # should free up, and we should see an asymptote at the end much closer to the - # number of files. - half = len(dhandle_counts)//2 - qtr = len(dhandle_counts)//4 - tenth = len(dhandle_counts)//10 - - (q1_avg, q1_slope) = average_slope(dhandle_counts[0:qtr]) - (q2_avg, q2_slope) = average_slope(dhandle_counts[qtr:half]) - (q3_avg, q3_slope) = average_slope(dhandle_counts[half:-qtr]) - (q4_avg, q4_slope) = average_slope(dhandle_counts[-qtr:]) - (end_run_avg, end_run_slope) = average_slope(dhandle_counts[-tenth:]) - - self.pr('1st qtr: average={},slope={}'.format(q1_avg, q1_slope)) - self.pr('2nd qtr: average={},slope={}'.format(q2_avg, q2_slope)) - self.pr('3rd qtr: average={},slope={}'.format(q3_avg, q3_slope)) - self.pr('4th qtr: average={},slope={}'.format(q4_avg, q4_slope)) - - self.pr('end run: average={},slope={}'.format(end_run_avg, end_run_slope)) - - # Note, we don't check the first half average, it's likely to be big, but its size - # depends on many factors. The important thing is that the slope has flattened out. - # Even with variations due to sweep timing, the slope shouldn't be greater than - # 15.0 (dhandles per 100 times through the loop). - self.assertLess(abs(q2_slope), q1_slope) - self.assertLess(abs(q2_slope), 15.0) - - # At the end of the run, we expect a pretty flat slope and a pretty small number - # of dhandles. A slope of 5.0 (dhandles per 100 times though the loop) is rather - # flat and still leaves room for some variation. - self.assertLess(abs(end_run_slope), 5.0) - self.assertLess(end_run_avg, self.core_tables + self.transient_tables + 20) - -if __name__ == '__main__': - wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_tiered05.py b/src/third_party/wiredtiger/test/suite/test_tiered05.py index c109596361f..8b638788736 100644 --- a/src/third_party/wiredtiger/test/suite/test_tiered05.py +++ b/src/third_party/wiredtiger/test/suite/test_tiered05.py @@ -71,7 +71,8 @@ class test_tiered05(wttest.WiredTigerTestCase): 'tiered_storage=(auth_token=%s,' % self.auth_token + \ 'bucket=%s,' % self.bucket + \ 'bucket_prefix=%s,' % self.bucket_prefix + \ - 'name=%s)' % self.ss_name + 'name=%s,' % self.ss_name + \ + 'object_target_size=20M)' # Test calling the flush_tier API with a tiered manager. Should get an error. def test_tiered(self): diff --git a/src/third_party/wiredtiger/test/suite/test_tiered06.py b/src/third_party/wiredtiger/test/suite/test_tiered06.py index d876b305c75..c4e931c7a3f 100755 --- a/src/third_party/wiredtiger/test/suite/test_tiered06.py +++ b/src/third_party/wiredtiger/test/suite/test_tiered06.py @@ -58,7 +58,7 @@ class test_tiered06(wttest.WiredTigerTestCase): config = '' # S3 store is built as an optional loadable extension, not all test environments build S3. if self.ss_name == 's3_store': - #config = '=(config=\"(verbose=[api:1,version,tiered:1])\")' + #config = '=(config=\"(verbose=1)\")' extlist.skip_if_missing = True #if self.ss_name == 'dir_store': #config = '=(config=\"(verbose=1,delay_ms=200,force_delay=3)\")' @@ -104,14 +104,22 @@ class test_tiered06(wttest.WiredTigerTestCase): self.get_fs_config(prefix)) # The object doesn't exist yet. - self.assertFalse(fs.fs_exist(session, 'foobar')) + if self.ss_name == 's3_store': + with self.expectedStderrPattern('.*HTTP response code: 404.*'): + self.assertFalse(fs.fs_exist(session, 'foobar')) + else: + self.assertFalse(fs.fs_exist(session, 'foobar')) # We cannot use the file system to create files, it is readonly. # So use python I/O to build up the file. f = open('foobar', 'wb') # The object still doesn't exist yet. - self.assertFalse(fs.fs_exist(session, 'foobar')) + if self.ss_name == 's3_store': + with self.expectedStderrPattern('.*HTTP response code: 404.*'): + self.assertFalse(fs.fs_exist(session, 'foobar')) + else: + self.assertFalse(fs.fs_exist(session, 'foobar')) outbytes = ('MORE THAN ENOUGH DATA\n'*100000).encode() f.write(outbytes) diff --git a/src/third_party/wiredtiger/test/suite/test_tiered14.py b/src/third_party/wiredtiger/test/suite/test_tiered14.py index c041bb11635..61e3a54cf91 100644 --- a/src/third_party/wiredtiger/test/suite/test_tiered14.py +++ b/src/third_party/wiredtiger/test/suite/test_tiered14.py @@ -28,7 +28,7 @@ from helper_tiered import generate_s3_prefix, get_auth_token, get_bucket1_name from wtscenario import make_scenarios -import os, random, wttest +import os, random, wtscenario, wttest from wtdataset import TrackedSimpleDataSet, TrackedComplexDataSet # test_tiered14.py @@ -69,7 +69,7 @@ class test_tiered14(wttest.WiredTigerTestCase): num_ops = 20, ss_name = 's3_store')), ] - scenarios = make_scenarios(multiplier, keyfmt, dataset, storage_sources) + scenarios = wtscenario.make_scenarios(multiplier, keyfmt, dataset, storage_sources) def conn_config(self): if self.ss_name == 'dir_store' and not os.path.exists(self.bucket): @@ -86,7 +86,7 @@ class test_tiered14(wttest.WiredTigerTestCase): config = '' # S3 store is built as an optional loadable extension, not all test environments build S3. if self.ss_name == 's3_store': - #config = '=(config=\"(verbose=[api:1,version,tiered:-3])\")' + #config = '=(config=\"(verbose=1)\")' extlist.skip_if_missing = True #if self.ss_name == 'dir_store': #config = '=(config=\"(verbose=1,delay_ms=200,force_delay=3)\")' diff --git a/src/third_party/wiredtiger/test/suite/test_txn13.py b/src/third_party/wiredtiger/test/suite/test_txn13.py index 6c7529fc250..6b2ed77e4ac 100644 --- a/src/third_party/wiredtiger/test/suite/test_txn13.py +++ b/src/third_party/wiredtiger/test/suite/test_txn13.py @@ -91,7 +91,6 @@ class test_txn13(wttest.WiredTigerTestCase, suite_subprocess): else: self.session.commit_transaction() - self.ignoreStdoutPatternIfExists('Eviction took more than 1 minute') self.assertTrue(gotException == self.expect_err) if __name__ == '__main__': diff --git a/src/third_party/wiredtiger/test/suite/test_verify.py b/src/third_party/wiredtiger/test/suite/test_verify.py index 37804eb327b..af0ae6e5f11 100755 --- a/src/third_party/wiredtiger/test/suite/test_verify.py +++ b/src/third_party/wiredtiger/test/suite/test_verify.py @@ -26,7 +26,7 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -import os, re, struct +import os, struct from suite_subprocess import suite_subprocess import wiredtiger, wttest @@ -63,15 +63,6 @@ class test_verify(wttest.WiredTigerTestCase, suite_subprocess): self.assertEqual(i, self.nentries) cursor.close() - def count_file_contains(self, filename, content): - count = 0 - with open(filename) as f: - for line in f: - if content in line: - count += 1 - f.close() - return count - def open_and_position(self, tablename, pct): """ Open the file for the table, position it at a 4K page @@ -86,30 +77,13 @@ class test_verify(wttest.WiredTigerTestCase, suite_subprocess): filename = tablename + ".wt" filesize = os.path.getsize(filename) - position = int((filesize * pct) // 100) + position = (filesize * pct) // 100 self.pr('damaging file at: ' + str(position)) fp = open(filename, "r+b") fp.seek(position) return fp - def open_and_offset(self, tablename, offset): - """ - Open the file for the table, position it at the given offset. - As a side effect, the connection is closed. - """ - # we close the connection to guarantee everything is - # flushed and closed from the WT point of view. - if self.conn != None: - self.conn.close() - self.conn = None - filename = tablename + ".wt" - - self.pr('damaging file at: ' + str(offset)) - fp = open(filename, "r+b") - fp.seek(offset) - return fp - def test_verify_process_empty(self): """ Test verify in a 'wt' process, using an empty table @@ -163,67 +137,8 @@ class test_verify(wttest.WiredTigerTestCase, suite_subprocess): self.conn = self.setUpConnectionOpen(".") self.session = self.setUpSessionOpen(self.conn) self.assertRaisesWithMessage(wiredtiger.WiredTigerError, - lambda: self.session.verify('table:' + self.tablename, "read_corrupt"), + lambda: self.session.verify('table:' + self.tablename, None), "/WT_SESSION.verify/") - self.assertEqual(self.count_file_contains("stderr.txt", - "calculated block checksum doesn't match expected checksum"), 1) - - def test_verify_api_read_corrupt_pages(self): - """ - Test verify via API, on a table that is purposely corrupted in - multiple places. A verify operation with read_corrupt on should - result in multiple checksum errors being logged. - """ - params = 'key_format=S,value_format=S' - self.session.create('table:' + self.tablename, params) - self.populate(self.tablename) - with self.open_and_position(self.tablename, 25) as f: - for i in range(0, 100): - f.write(b'\x01\xff\x80') - with self.open_and_position(self.tablename, 50) as f: - for i in range(0, 100): - f.write(b'\x01\xff\x80') - with self.open_and_position(self.tablename, 75) as f: - for i in range(0, 100): - f.write(b'\x01\xff\x80') - - def test_verify_api_corrupt_first_page(self): - """ - Test that verify works when the first child of an internal node is corrupted. A verify - operation with read_corrupt on should result in a checksum errors being logged. - """ - params = 'key_format=S,value_format=S' - self.session.create('table:' + self.tablename, params) - self.populate(self.tablename) - - # wt verify -d dump_address performs a depth-first traversal of the BTree. So the first - # leaf page it prints is the first child of its parent. Grab the offset of this one so we - # can corrupt it. - self.runWt(['verify', '-d', 'dump_address', 'table:' + self.tablename], outfilename='dump.out') - - # Grab the offset position of the first page. - offset = 0 - lines = open('dump.out').readlines() - for line in lines: - m = re.search('(\d+)-(\d+).*row-store leaf', line) - if m: - offset = int((int(m.group(2)) - int(m.group(1)))/2) - break - - # Open the file and corrupt the first page. - with self.open_and_offset(self.tablename, offset) as f: - for i in range(0, 100): - f.write(b'\x01\xff\x80') - - # open_and_position closed the session/connection, reopen them now. - self.conn = self.setUpConnectionOpen(".") - self.session = self.setUpSessionOpen(self.conn) - self.assertRaisesWithMessage(wiredtiger.WiredTigerError, - lambda: self.session.verify('table:' + self.tablename, "read_corrupt"), - "/WT_SESSION.verify/") - - self.assertEqual(self.count_file_contains("stderr.txt", - "calculated block checksum doesn't match expected checksum"), 1) def test_verify_process_75pct_null(self): """ @@ -236,11 +151,9 @@ class test_verify(wttest.WiredTigerTestCase, suite_subprocess): with self.open_and_position(self.tablename, 75) as f: for i in range(0, 4096): f.write(struct.pack('B', 0)) - self.runWt(["verify", "-c", "table:" + self.tablename], + self.runWt(["verify", "table:" + self.tablename], errfilename="verifyerr.out", failure=True) self.check_non_empty_file("verifyerr.out") - self.assertEqual(self.count_file_contains("verifyerr.out", - "calculated block checksum doesn't match expected checksum"), 1) def test_verify_process_25pct_junk(self): """ @@ -253,43 +166,10 @@ class test_verify(wttest.WiredTigerTestCase, suite_subprocess): with self.open_and_position(self.tablename, 25) as f: for i in range(0, 100): f.write(b'\x01\xff\x80') - self.runWt(["verify", "-c", "table:" + self.tablename], - errfilename="verifyerr.out", failure=True) - self.check_non_empty_file("verifyerr.out") - self.assertEqual(self.count_file_contains("verifyerr.out", - "calculated block checksum doesn't match expected checksum"), 1) - - def test_verify_process_read_corrupt_pages(self): - """ - Test verify in a 'wt' process on a table that is purposely corrupted - in multiple places. A verify operation with read_corrupt on should - result in multiple checksum errors being logged. - """ - params = 'key_format=S,value_format=S' - self.session.create('table:' + self.tablename, params) - self.populate(self.tablename) - with self.open_and_position(self.tablename, 25) as f: - for i in range(0, 100): - f.write(b'\x01\xff\x80') - with self.open_and_position(self.tablename, 75) as f: - for i in range(0, 100): - f.write(b'\x01\xff\x80') - with self.open_and_position(self.tablename, 80) as f: - for i in range(0, 100): - f.write(b'\x01\xff\x80') - self.runWt(["verify", "-c", "table:" + self.tablename], + self.runWt(["verify", "table:" + self.tablename], errfilename="verifyerr.out", failure=True) - self.check_non_empty_file("verifyerr.out") - # It is expected that more than one checksum error is logged given - # that we have corrupted the table in multiple locations, but we may - # not necessarily detect all three corruptions - e.g. we won't detect - # a corruption if we overwrite free space or overwrite a page that is - # a child of another page that we overwrite. - self.assertGreater(self.count_file_contains("verifyerr.out", - "calculated block checksum doesn't match expected checksum"), 1) - def test_verify_process_truncated(self): """ Test verify in a 'wt' process on a table that is purposely damaged, diff --git a/src/third_party/wiredtiger/test/suite/wttest.py b/src/third_party/wiredtiger/test/suite/wttest.py index a751231f334..edd22e346c7 100755 --- a/src/third_party/wiredtiger/test/suite/wttest.py +++ b/src/third_party/wiredtiger/test/suite/wttest.py @@ -42,7 +42,7 @@ except ImportError: import unittest from contextlib import contextmanager -import errno, glob, os, re, shutil, sys, threading, time, traceback, types +import errno, glob, os, re, shutil, sys, time, traceback import wiredtiger, wtscenario, wthooks def shortenWithEllipsis(s, maxlen): @@ -180,38 +180,6 @@ class ExtensionList(list): ext = '' if extarg == None else '=' + extarg self.append(dirname + '/' + name + ext) -# Custom result class that will prefix the pid in text output (including if it's a child). -# Only enabled when we are in verbose mode so we don't check that here. -class PidAwareTextTestResult(unittest.TextTestResult): - _thread_prefix = threading.local() - - def __init__(self, stream, descriptions, verbosity): - super(PidAwareTextTestResult, self).__init__(stream, descriptions, verbosity) - self._thread_prefix.value = "[pid:{}]: ".format(os.getpid()) - - def tags(self, new_tags, gone_tags): - # We attach the PID to the thread so we only need the new_tags. - for tag in new_tags: - if tag.startswith("pid:"): - pid = tag[len("pid:"):] - self._thread_prefix.value = "[pid:{}/{}]: ".format(os.getpid(), pid) - - def startTest(self, test): - self.stream.write(self._thread_prefix.value) - super(PidAwareTextTestResult, self).startTest(test) - - def getDescription(self, test): - return str(test.shortDescription()) - - def printErrorList(self, flavour, errors): - for test, err in errors: - self.stream.writeln(self.separator1) - self.stream.writeln("%s%s: %s" % (self._thread_prefix.value, - flavour, self.getDescription(test))) - self.stream.writeln(self.separator2) - self.stream.writeln("%s%s" % (self._thread_prefix.value, err)) - self.stream.flush() - class WiredTigerTestCase(unittest.TestCase): _globalSetup = False _printOnceSeen = {} @@ -568,11 +536,8 @@ class WiredTigerTestCase(unittest.TestCase): # In addition, check to make sure exc_info is "clean", because # the ConcurrencyTestSuite in Python2 indicates failures using that. if hasattr(self, '_outcome'): # Python 3.4+ - if hasattr(self._outcome, 'errors'): # Python 3.4 - 3.10 - result = self.defaultTestResult() # these 2 methods have no side effects - self._feedErrorsToResult(result, self._outcome.errors) - else: # Python 3.11+ - result = self._outcome.result + result = self.defaultTestResult() # these 2 methods have no side effects + self._feedErrorsToResult(result, self._outcome.errors) else: # Python 3.2 - 3.3 or 3.0 - 3.1 and 2.7 result = getattr(self, '_outcomeForDoCleanups', self._resultForDoCleanups) error = self.list2reason(result, 'errors') @@ -621,9 +586,9 @@ class WiredTigerTestCase(unittest.TestCase): elapsed = time.time() - self.starttime if elapsed > 0.001 and WiredTigerTestCase._verbose >= 2: - print("[pid:{}]: {}: {:.2f} seconds".format(os.getpid(), str(self), elapsed)) + print("%s: %.2f seconds" % (str(self), elapsed)) if (not passed) and (not self.skipped): - print("[pid:{}]: ERROR in {}".format(os.getpid(), str(self))) + print("ERROR in " + str(self)) self.pr('FAIL') self.pr('preserving directory ' + self.testdir) if WiredTigerTestCase._verbose > 2: @@ -869,7 +834,7 @@ class WiredTigerTestCase(unittest.TestCase): @staticmethod def prout(s): - os.write(WiredTigerTestCase._dupout, str.encode("[pid:{}]: {}\n".format(os.getpid(), s))) + os.write(WiredTigerTestCase._dupout, str.encode(s + '\n')) def pr(self, s): """ @@ -908,7 +873,7 @@ class WiredTigerTestCase(unittest.TestCase): def tty(message): if WiredTigerTestCase._ttyDescriptor == None: WiredTigerTestCase._ttyDescriptor = open('/dev/tty', 'w') - WiredTigerTestCase._ttyDescriptor.write("[pid:{}]: {}\n".format(os.getpid(), message)) + WiredTigerTestCase._ttyDescriptor.write(message + '\n') def ttyVerbose(self, level, message): WiredTigerTestCase.ttyVerbose(level, message) @@ -970,16 +935,6 @@ def islongtest(): def getseed(): return WiredTigerTestCase._seeds -# We have to override the ThreadsafeForwardingResult implementation of tags so it gets set immediately -# which allows us to set the pid of the process on our output stream to make debugging easier. -def immediate_tags(self, new_tags, gone_tags): - self.result.tags(new_tags, gone_tags) - -def wrap_result_for_tags(thread_safe_result, thread_number): - # We use this technique to override the method instead of extending the class as it allows for less changes. - thread_safe_result.tags = types.MethodType(immediate_tags, thread_safe_result) - return thread_safe_result - def runsuite(suite, parallel): suite_to_run = suite if parallel > 1: @@ -987,19 +942,16 @@ def runsuite(suite, parallel): if not WiredTigerTestCase._globalSetup: WiredTigerTestCase.globalSetup() WiredTigerTestCase._concurrent = True - suite_to_run = ConcurrentTestSuite(suite, fork_for_tests(parallel), wrap_result=wrap_result_for_tags) + suite_to_run = ConcurrentTestSuite(suite, fork_for_tests(parallel)) try: if WiredTigerTestCase._randomseed: WiredTigerTestCase.prout("Starting test suite with seedw={0} and seedz={1}. Rerun this test with -seed {0}.{1} to get the same randomness" .format(str(WiredTigerTestCase._seeds[0]), str(WiredTigerTestCase._seeds[1]))) - result_class = None - if WiredTigerTestCase._verbose > 1: - result_class = PidAwareTextTestResult return unittest.TextTestRunner( - verbosity=WiredTigerTestCase._verbose, resultclass=result_class).run(suite_to_run) + verbosity=WiredTigerTestCase._verbose).run(suite_to_run) except BaseException as e: # This should not happen for regular test errors, unittest should catch everything - print("[pid:{}]: ERROR: running test: {}".format(os.getpid(), e)) + print('ERROR: running test: ', e) raise e def run(name='__main__'): diff --git a/src/third_party/wiredtiger/test/test_coverage.md b/src/third_party/wiredtiger/test/test_coverage.md index a9b7c9ff9f6..b186c7ac318 100644 --- a/src/third_party/wiredtiger/test/test_coverage.md +++ b/src/third_party/wiredtiger/test/test_coverage.md @@ -15,7 +15,6 @@ |Checkpoint|History Store|[test_checkpoint03.py](../test/suite/test_checkpoint03.py) |Checkpoint|Metadata|[test_checkpoint_snapshot01.py](../test/suite/test_checkpoint_snapshot01.py) |Checkpoint|Obsolete Data|[test_checkpoint08.py](../test/suite/test_checkpoint08.py) -|Checkpoint|Recovery|[test_bug029.py](../test/suite/test_bug029.py) |Compression||[test_dictionary.py](../test/suite/test_dictionary.py) |Config Api||[test_base02.py](../test/suite/test_base02.py), [test_config02.py](../test/suite/test_config02.py) |Connection Api||[test_version.py](../test/suite/test_version.py) diff --git a/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp b/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp index a3461ccd814..59dfebc19ba 100644 --- a/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp +++ b/src/third_party/wiredtiger/test/unittest/tests/test_reconciliation_tracking.cpp @@ -37,7 +37,7 @@ TEST_CASE("Reconciliation tracking: ovfl_discard_verbose", "[reconciliation]") SECTION("handle null page and tag") { - REQUIRE(__ut_ovfl_discard_verbose(session, nullptr, nullptr, nullptr) == EINVAL); + REQUIRE(__ut_ovfl_discard_verbose(session, nullptr, nullptr, nullptr) == 0); } } diff --git a/src/third_party/wiredtiger/tools/litmus_tests/README.md b/src/third_party/wiredtiger/tools/litmus_tests/README.md deleted file mode 100644 index 397176de0f8..00000000000 --- a/src/third_party/wiredtiger/tools/litmus_tests/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# WiredTiger litmus tests -In order to support lock free algorithms in the WiredTiger codebase, we define a number of litmus test. These test are intended to be run by the herd7 simulator. - -For any algorithm which has defined litmus tests they can be found under that algorithm's subdirectory. - -To run the litmus tests either install and run herd7, instructions [here](https://github.com/herd/herdtools7/blob/master/INSTALL.md). Or run them from the web interface found [here](http://diy.inria.fr/www/#). - -If a litmus test is required for X86 there should be one defined for ARM64 as well. The reverse is not neccesarily true as X86 has a stronger memory model than ARM. - -### Litmus test style in WiredTiger -WiredTiger litmus tests must use spaces and not have any tabs in the file. There needs to be a single whitespace between the intial state definition block {}, and the process definition block. There must also be an additional whitespace line before the exists clause. - -Test names should be separated with underscores, e.g. wt_gen_drain. - -Additionally per WiredTiger's usual style there should be a newline at the end of the file. diff --git a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_drain_arm64.litmus b/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_drain_arm64.litmus deleted file mode 100644 index bfa2994919f..00000000000 --- a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_drain_arm64.litmus +++ /dev/null @@ -1,14 +0,0 @@ -AArch64 wt_gen_drain -{ -conn_gen=5; -0:X0=conn_gen; 0:X1=sess_gen; -1:X0=conn_gen; 1:X1=sess_gen; -} - - P0 | P1 ; - MOV X9, #1 | LDR X2, [X0] ; - ldaddal X9, X2, [X0] | STR X2, [X1] ; - LDR X2, [X1] | dmb ish ; - | LDR X3, [X0] ; - -exists (0:X2=0 /\ 1:X2=5 /\ 1:X3=5) diff --git a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_drain_x86.litmus b/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_drain_x86.litmus deleted file mode 100644 index 9a8251847e7..00000000000 --- a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_drain_x86.litmus +++ /dev/null @@ -1,12 +0,0 @@ -X86 wt_gen_drain -{ -conn_gen=5; -} - - P0 | P1 ; - LOCK; ADD [conn_gen], $1 | MOV EAX,[conn_gen] ; - MOV EAX, [sess_gen] | MOV [sess_gen], EAX ; - | MFENCE ; - | MOV EBX,[conn_gen] ; - -exists (0:EAX=0 /\ 1:EAX=5 /\ 1:EBX=5) diff --git a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_oldest_arm64.litmus b/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_oldest_arm64.litmus deleted file mode 100644 index 2f8e1a2da6c..00000000000 --- a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_oldest_arm64.litmus +++ /dev/null @@ -1,15 +0,0 @@ -AArch64 wt_gen_oldest -{ -conn_gen=5;sess_gen=0; -0:X0=conn_gen; 0:X1=sess_gen; -1:X0=conn_gen; 1:X1=sess_gen; -2:X0=conn_gen; 2:X1=sess_gen; -} - - P0 | P1 | P2 ; - LDR X2, [X0] | LDR X2, [X0] | MOV W9, #1 ; - dmb ishld | STR X2, [X1] | ldaddal W9, W1, [X0] ; - LDR X3, [X1] | dmb ish | ; - | LDR X4, [X0] | ; - -exists (0:X2=6 /\ 0:X3=0 /\ 1:X2=5 /\ 1:X4=5) diff --git a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_oldest_x86.litmus b/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_oldest_x86.litmus deleted file mode 100644 index 3dc6e8fbde7..00000000000 --- a/src/third_party/wiredtiger/tools/litmus_tests/generations/gen_oldest_x86.litmus +++ /dev/null @@ -1,12 +0,0 @@ -X86 wt_gen_oldest -{ -conn_gen=5; -} - -P0 | P1 | P2 ; -MOV EAX, [conn_gen] | MOV EAX,[conn_gen] | LOCK; ADD [conn_gen], $1 ; -MOV EBX, [sess_gen] | MOV [sess_gen], EAX | ; - | MFENCE | ; - | MOV EBX,[conn_gen] | ; - -exists (0:EAX=6 /\ 0:EBX=0 /\ 1:EAX=5 /\ 1:EBX=5) |
