summaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-03-19 18:47:55 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-19 08:32:52 +0000
commit304101880b6a4abc1cd1229aaa0d69a81d364ae8 (patch)
tree174cdc0263ed739949a462c97601dffaf2856a61 /src/third_party
parentd07af94226fd8fe8455e5dd70455028b2d77ae3f (diff)
downloadmongo-304101880b6a4abc1cd1229aaa0d69a81d364ae8.tar.gz
Import wiredtiger: f6ab94b43bc56ce16ba0192ed15d1b602e9f2017 from branch mongodb-4.4
ref: 59c2abc4d9..f6ab94b43b for: 4.3.5 WT-5170 Convert the os_posix layer to use mmap for I/O instead of system calls WT-5259 Write wiki documentation on how to generate and use XRay traces WT-5617 Coverity: Memory leak WT-5630 Adding stage to turtle init to prevent startup on a too-low version WT-5721 Remove LAS file when upgrading to 4.4 WT-5735 Coverity analysis defect 114070: Explicit null dereferenced WT-5785 Fix potential deadlocks in eviction and verify code paths WT-5831 Fix the case of history store corruption WT-5834 Incremental backup returning too large offset WT-5843 Mark page dirty when reconciled page updates are aborted WT-5857 Prepend homedir for system call pathnames in format backup test WT-5858 Fix incremental backups both log/block based for first time WT-5859 Fix a seg fault in verification WT-5862 Add conditional around macro definition WT-5868 Fix test_txn19 because of changing of error message WT-5872 test/format not writing out isolation level WT-5874 Disable test_wt2323_join_visiblity WT-5879 Fix a bug reconciling metadata
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/wiredtiger/README6
-rw-r--r--src/third_party/wiredtiger/RELEASE_INFO6
-rw-r--r--src/third_party/wiredtiger/build_posix/aclocal/version-set.m410
-rw-r--r--src/third_party/wiredtiger/build_posix/aclocal/version.m42
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py5
-rw-r--r--src/third_party/wiredtiger/dist/s_define.list2
-rw-r--r--src/third_party/wiredtiger/dist/s_string.ok6
-rw-r--r--src/third_party/wiredtiger/dist/stat_data.py6
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/block/block_ckpt.c27
-rw-r--r--src/third_party/wiredtiger/src/block/block_open.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_handle.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_misc.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_vrfy.c3
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c88
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c3
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_log.c21
-rw-r--r--src/third_party/wiredtiger/src/docs/devdoc-index.dox7
-rw-r--r--src/third_party/wiredtiger/src/docs/devdoc-xray.dox76
-rw-r--r--src/third_party/wiredtiger/src/docs/programming.dox3
-rw-r--r--src/third_party/wiredtiger/src/docs/spell.ok5
-rw-r--r--src/third_party/wiredtiger/src/evict/evict_page.c28
-rw-r--r--src/third_party/wiredtiger/src/history/hs.c7
-rw-r--r--src/third_party/wiredtiger/src/include/connection.h8
-rw-r--r--src/third_party/wiredtiger/src/include/extern_posix.h5
-rw-r--r--src/third_party/wiredtiger/src/include/log.h5
-rw-r--r--src/third_party/wiredtiger/src/include/meta.h8
-rw-r--r--src/third_party/wiredtiger/src/include/os.h10
-rw-r--r--src/third_party/wiredtiger/src/include/stat.h6
-rw-r--r--src/third_party/wiredtiger/src/include/wiredtiger.in799
-rw-r--r--src/third_party/wiredtiger/src/meta/meta_turtle.c47
-rw-r--r--src/third_party/wiredtiger/src/os_posix/os_fallocate.c69
-rw-r--r--src/third_party/wiredtiger/src/os_posix/os_fs.c378
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_visibility.c4
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_write.c2
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_util.c2
-rw-r--r--src/third_party/wiredtiger/src/support/stat.c20
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c4
-rwxr-xr-xsrc/third_party/wiredtiger/src/utilities/util_dump.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/Makefile.am6
-rwxr-xr-xsrc/third_party/wiredtiger/test/evergreen.yml53
-rw-r--r--src/third_party/wiredtiger/test/format/backup.c42
-rw-r--r--src/third_party/wiredtiger/test/format/config.c3
-rw-r--r--src/third_party/wiredtiger/test/format/config.h5
-rw-r--r--src/third_party/wiredtiger/test/format/format.h1
-rw-r--r--src/third_party/wiredtiger/test/format/wts.c2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_compat01.py9
-rw-r--r--src/third_party/wiredtiger/test/suite/test_compat02.py13
-rw-r--r--src/third_party/wiredtiger/test/suite/test_compat03.py10
-rw-r--r--src/third_party/wiredtiger/test/suite/test_compat04.py5
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_txn19.py46
51 files changed, 1282 insertions, 601 deletions
diff --git a/src/third_party/wiredtiger/README b/src/third_party/wiredtiger/README
index 30fec2bebe9..ca559776c70 100644
--- a/src/third_party/wiredtiger/README
+++ b/src/third_party/wiredtiger/README
@@ -1,6 +1,6 @@
-WiredTiger 3.2.2: (August 28, 2019)
+WiredTiger 10.0.0: (March 18, 2020)
-This is version 3.2.2 of WiredTiger.
+This is version 10.0.0 of WiredTiger.
WiredTiger release packages and documentation can be found at:
@@ -8,7 +8,7 @@ WiredTiger release packages and documentation can be found at:
The documentation for this specific release can be found at:
- http://source.wiredtiger.com/3.2.2/index.html
+ http://source.wiredtiger.com/10.0.0/index.html
The WiredTiger source code can be found at:
diff --git a/src/third_party/wiredtiger/RELEASE_INFO b/src/third_party/wiredtiger/RELEASE_INFO
index fb7a3527813..37e31bad921 100644
--- a/src/third_party/wiredtiger/RELEASE_INFO
+++ b/src/third_party/wiredtiger/RELEASE_INFO
@@ -1,6 +1,6 @@
-WIREDTIGER_VERSION_MAJOR=3
-WIREDTIGER_VERSION_MINOR=2
-WIREDTIGER_VERSION_PATCH=2
+WIREDTIGER_VERSION_MAJOR=10
+WIREDTIGER_VERSION_MINOR=0
+WIREDTIGER_VERSION_PATCH=0
WIREDTIGER_VERSION="$WIREDTIGER_VERSION_MAJOR.$WIREDTIGER_VERSION_MINOR.$WIREDTIGER_VERSION_PATCH"
WIREDTIGER_RELEASE_DATE=`date "+%B %e, %Y"`
diff --git a/src/third_party/wiredtiger/build_posix/aclocal/version-set.m4 b/src/third_party/wiredtiger/build_posix/aclocal/version-set.m4
index b69dbf8507f..3ca21022bfa 100644
--- a/src/third_party/wiredtiger/build_posix/aclocal/version-set.m4
+++ b/src/third_party/wiredtiger/build_posix/aclocal/version-set.m4
@@ -1,14 +1,14 @@
dnl build by dist/s_version
-VERSION_MAJOR=3
-VERSION_MINOR=2
-VERSION_PATCH=2
-VERSION_STRING='"WiredTiger 3.2.2: (August 28, 2019)"'
+VERSION_MAJOR=10
+VERSION_MINOR=0
+VERSION_PATCH=0
+VERSION_STRING='"WiredTiger 10.0.0: (March 18, 2020)"'
AC_SUBST(VERSION_MAJOR)
AC_SUBST(VERSION_MINOR)
AC_SUBST(VERSION_PATCH)
AC_SUBST(VERSION_STRING)
-VERSION_NOPATCH=3.2
+VERSION_NOPATCH=10.0
AC_SUBST(VERSION_NOPATCH)
diff --git a/src/third_party/wiredtiger/build_posix/aclocal/version.m4 b/src/third_party/wiredtiger/build_posix/aclocal/version.m4
index 06b22838d57..e953552c356 100644
--- a/src/third_party/wiredtiger/build_posix/aclocal/version.m4
+++ b/src/third_party/wiredtiger/build_posix/aclocal/version.m4
@@ -1,2 +1,2 @@
dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version
-3.2.2
+10.0.0
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index 1f4d42d3197..a4858ddcdca 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -988,7 +988,10 @@ wiredtiger_open_common =\
handle''',
min=15, undoc=True),
Config('mmap', 'true', r'''
- Use memory mapping to access files when possible''',
+ Use memory mapping when accessing files in a read-only mode''',
+ type='boolean'),
+ Config('mmap_all', 'false', r'''
+ Use memory mapping to read and write all data files''',
type='boolean'),
Config('multiprocess', 'false', r'''
permit sharing between processes (will automatically start an
diff --git a/src/third_party/wiredtiger/dist/s_define.list b/src/third_party/wiredtiger/dist/s_define.list
index 5a5c524c777..20512c31929 100644
--- a/src/third_party/wiredtiger/dist/s_define.list
+++ b/src/third_party/wiredtiger/dist/s_define.list
@@ -45,6 +45,8 @@ WT_LOG_SLOT_MAXBITS
WT_LOG_SLOT_UNBUFFERED_ISSET
WT_LOG_V3_MAJOR
WT_LOG_V3_MINOR
+WT_LOG_V4_MAJOR
+WT_LOG_V4_MINOR
WT_OPTRACK_BUFSIZE
WT_OPTRACK_MAXRECS
WT_PACKED_STRUCT_BEGIN
diff --git a/src/third_party/wiredtiger/dist/s_string.ok b/src/third_party/wiredtiger/dist/s_string.ok
index 7a841259fec..9070134e8e2 100644
--- a/src/third_party/wiredtiger/dist/s_string.ok
+++ b/src/third_party/wiredtiger/dist/s_string.ok
@@ -88,6 +88,7 @@ CreateFileMappingW
CreateFileW
Crummey
CustomersPhone
+DAX
DECL
DECR
DESC
@@ -258,6 +259,7 @@ Memrata
Metadata
Mewhort
Mitzenmacher
+Mmap
MongoDB
MoveFileExW
Multi
@@ -975,6 +977,7 @@ mT
madvise
majorp
malloc
+mappable
marshall
marshalled
maxCLevel
@@ -1021,6 +1024,7 @@ mytxn
namespace
namespaces
nbits
+nbsp
nchunks
nclr
nd
@@ -1339,6 +1343,8 @@ unistd
unlink
unlinked
unmap
+unmapped
+unmapping
unmarshall
unmarshalled
unmerged
diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py
index 0bdc6ddce84..d519fa820b9 100644
--- a/src/third_party/wiredtiger/dist/stat_data.py
+++ b/src/third_party/wiredtiger/dist/stat_data.py
@@ -193,11 +193,17 @@ connection_stats = [
##########################################
BlockStat('block_byte_map_read', 'mapped bytes read', 'size'),
BlockStat('block_byte_read', 'bytes read', 'size'),
+ BlockStat('block_byte_read_mmap', 'bytes read via memory map API', 'size'),
+ BlockStat('block_byte_read_syscall', 'bytes read via system call API', 'size'),
BlockStat('block_byte_write', 'bytes written', 'size'),
BlockStat('block_byte_write_checkpoint', 'bytes written for checkpoint', 'size'),
+ BlockStat('block_byte_write_mmap', 'bytes written via memory map API', 'size'),
+ BlockStat('block_byte_write_syscall', 'bytes written via system call API', 'size'),
BlockStat('block_map_read', 'mapped blocks read'),
BlockStat('block_preload', 'blocks pre-loaded'),
BlockStat('block_read', 'blocks read'),
+ BlockStat('block_remap_file_resize', 'number of times the file was remapped because it changed size via fallocate or truncate'),
+ BlockStat('block_remap_file_write', 'number of times the region was remapped via write'),
BlockStat('block_write', 'blocks written'),
##########################################
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 3de62dcdfcd..cc68dee60e9 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-4.4",
- "commit": "59c2abc4d95f7d29b8a4ed43c7f182cd3c515e90"
+ "commit": "f6ab94b43bc56ce16ba0192ed15d1b602e9f2017"
}
diff --git a/src/third_party/wiredtiger/src/block/block_ckpt.c b/src/third_party/wiredtiger/src/block/block_ckpt.c
index 12c0db4e43d..6cbe80a9317 100644
--- a/src/third_party/wiredtiger/src/block/block_ckpt.c
+++ b/src/third_party/wiredtiger/src/block/block_ckpt.c
@@ -662,21 +662,32 @@ __ckpt_add_blkmod_entry(
WT_SESSION_IMPL *session, WT_BLOCK_MODS *blk_mod, wt_off_t offset, wt_off_t len)
{
uint64_t end, start;
- uint32_t end_rdup;
+ uint32_t end_buf_bytes, end_rdup_bytes;
WT_ASSERT(session, blk_mod->granularity != 0);
start = (uint64_t)offset / blk_mod->granularity;
end = (uint64_t)(offset + len) / blk_mod->granularity;
WT_ASSERT(session, end < UINT32_MAX);
- end_rdup = WT_MAX(__wt_rduppo2((uint32_t)end, 8), WT_BLOCK_MODS_LIST_MIN);
- if ((end_rdup << 3) > blk_mod->nbits) {
+ end_rdup_bytes = WT_MAX(__wt_rduppo2((uint32_t)end, 8), WT_BLOCK_MODS_LIST_MIN);
+ end_buf_bytes = (uint32_t)blk_mod->nbits >> 3;
+ /*
+ * We are doing a lot of shifting. Make sure that the number of bytes we end up with is a
+ * multiple of eight. We guarantee that in the rounding up call, but also make sure that the
+ * constant stays a multiple of eight.
+ */
+ WT_ASSERT(session, end_rdup_bytes % 8 == 0);
+ if (end_rdup_bytes > end_buf_bytes) {
/* If we don't have enough, extend the buffer. */
if (blk_mod->nbits == 0) {
- WT_RET(__wt_buf_initsize(session, &blk_mod->bitstring, end_rdup));
- memset(blk_mod->bitstring.mem, 0, end_rdup);
- } else
- WT_RET(__wt_buf_set(session, &blk_mod->bitstring, blk_mod->bitstring.data, end_rdup));
- blk_mod->nbits = end_rdup << 3;
+ WT_RET(__wt_buf_initsize(session, &blk_mod->bitstring, end_rdup_bytes));
+ memset(blk_mod->bitstring.mem, 0, end_rdup_bytes);
+ } else {
+ WT_RET(
+ __wt_buf_set(session, &blk_mod->bitstring, blk_mod->bitstring.data, end_rdup_bytes));
+ memset(
+ (uint8_t *)blk_mod->bitstring.mem + end_buf_bytes, 0, end_rdup_bytes - end_buf_bytes);
+ }
+ blk_mod->nbits = end_rdup_bytes << 3;
}
/* Set all the bits needed to record this offset/length pair. */
diff --git a/src/third_party/wiredtiger/src/block/block_open.c b/src/third_party/wiredtiger/src/block/block_open.c
index c2a3f509701..67eb2b66299 100644
--- a/src/third_party/wiredtiger/src/block/block_open.c
+++ b/src/third_party/wiredtiger/src/block/block_open.c
@@ -380,7 +380,7 @@ __desc_read(WT_SESSION_IMPL *session, uint32_t allocsize, WT_BLOCK *block)
* file name, and is now frantically pounding their interrupt key.
*/
if (desc->magic != WT_BLOCK_MAGIC || !checksum_matched) {
- if (strcmp(block->name, WT_METAFILE) == 0)
+ if (strcmp(block->name, WT_METAFILE) == 0 || strcmp(block->name, WT_HS_FILE) == 0)
WT_ERR_MSG(session, WT_TRY_SALVAGE, "%s is corrupted", block->name);
WT_ERR_MSG(session, WT_ERROR, "%s does not appear to be a WiredTiger file", block->name);
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_handle.c b/src/third_party/wiredtiger/src/btree/bt_handle.c
index c0bf610e984..b6f8a31034f 100644
--- a/src/third_party/wiredtiger/src/btree/bt_handle.c
+++ b/src/third_party/wiredtiger/src/btree/bt_handle.c
@@ -709,7 +709,7 @@ __btree_tree_open_empty(WT_SESSION_IMPL *session, bool creation)
return (0);
err:
- if (ref->page != NULL)
+ if (ref != NULL && ref->page != NULL)
__wt_page_out(session, &ref->page);
if (root != NULL)
__wt_page_out(session, &root);
diff --git a/src/third_party/wiredtiger/src/btree/bt_misc.c b/src/third_party/wiredtiger/src/btree/bt_misc.c
index edf6e4bad05..072b66800f8 100644
--- a/src/third_party/wiredtiger/src/btree/bt_misc.c
+++ b/src/third_party/wiredtiger/src/btree/bt_misc.c
@@ -20,6 +20,8 @@ __wt_addr_string(WT_SESSION_IMPL *session, const uint8_t *addr, size_t addr_size
btree = S2BT_SAFE(session);
+ WT_ASSERT(session, buf != NULL);
+
if (addr == NULL || addr_size == 0) {
buf->data = WT_NO_ADDR_STRING;
buf->size = strlen(WT_NO_ADDR_STRING);
diff --git a/src/third_party/wiredtiger/src/btree/bt_vrfy.c b/src/third_party/wiredtiger/src/btree/bt_vrfy.c
index 4c0962d180b..4a7eb1a697b 100644
--- a/src/third_party/wiredtiger/src/btree/bt_vrfy.c
+++ b/src/third_party/wiredtiger/src/btree/bt_vrfy.c
@@ -527,8 +527,9 @@ __verify_addr_string(WT_SESSION_IMPL *session, WT_REF *ref, WT_ITEM *buf)
WT_DECL_RET;
char tp_string[2][WT_TP_STRING_SIZE];
+ WT_ERR(__wt_scr_alloc(session, 0, &tmp));
+
if (__wt_ref_addr_copy(session, ref, &addr)) {
- WT_ERR(__wt_scr_alloc(session, 0, &tmp));
WT_ERR(__wt_buf_fmt(session, buf, "%s %s,%s",
__wt_addr_string(session, addr.addr, addr.size, tmp),
__wt_time_pair_to_string(addr.oldest_start_ts, addr.oldest_start_txn, tp_string[0]),
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index e42c9255c41..b1b2dbf02ca 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -558,7 +558,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
- {"mmap", "boolean", NULL, NULL, NULL, 0}, {"multiprocess", "boolean", NULL, NULL, NULL, 0},
+ {"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
+ {"multiprocess", "boolean", NULL, NULL, NULL, 0},
{"operation_timeout_ms", "int", NULL, "min=1", NULL, 0},
{"operation_tracking", "category", NULL, NULL,
confchk_wiredtiger_open_operation_tracking_subconfigs, 2},
@@ -628,7 +629,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
- {"mmap", "boolean", NULL, NULL, NULL, 0}, {"multiprocess", "boolean", NULL, NULL, NULL, 0},
+ {"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
+ {"multiprocess", "boolean", NULL, NULL, NULL, 0},
{"operation_timeout_ms", "int", NULL, "min=1", NULL, 0},
{"operation_tracking", "category", NULL, NULL,
confchk_wiredtiger_open_operation_tracking_subconfigs, 2},
@@ -697,7 +699,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
- {"mmap", "boolean", NULL, NULL, NULL, 0}, {"multiprocess", "boolean", NULL, NULL, NULL, 0},
+ {"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
+ {"multiprocess", "boolean", NULL, NULL, NULL, 0},
{"operation_timeout_ms", "int", NULL, "min=1", NULL, 0},
{"operation_tracking", "category", NULL, NULL,
confchk_wiredtiger_open_operation_tracking_subconfigs, 2},
@@ -764,7 +767,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
- {"mmap", "boolean", NULL, NULL, NULL, 0}, {"multiprocess", "boolean", NULL, NULL, NULL, 0},
+ {"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
+ {"multiprocess", "boolean", NULL, NULL, NULL, 0},
{"operation_timeout_ms", "int", NULL, "min=1", NULL, 0},
{"operation_tracking", "category", NULL, NULL,
confchk_wiredtiger_open_operation_tracking_subconfigs, 2},
@@ -1011,16 +1015,17 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
",log=(archive=true,compressor=,enabled=false,file_max=100MB,"
"os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on,"
"zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4),"
- "mmap=true,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),timing_stress_for_test=,transaction_sync=(enabled=false"
- ",method=fsync),use_environment=true,use_environment_priv=false,"
+ "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),"
+ "timing_stress_for_test=,transaction_sync=(enabled=false,"
+ "method=fsync),use_environment=true,use_environment_priv=false,"
"verbose=,write_through=",
- confchk_wiredtiger_open, 51},
+ confchk_wiredtiger_open, 52},
{"wiredtiger_open_all",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
",builtin_extension_config=,cache_cursors=true,"
@@ -1042,16 +1047,17 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
",log=(archive=true,compressor=,enabled=false,file_max=100MB,"
"os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on,"
"zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4),"
- "mmap=true,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),timing_stress_for_test=,transaction_sync=(enabled=false"
- ",method=fsync),use_environment=true,use_environment_priv=false,"
+ "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),"
+ "timing_stress_for_test=,transaction_sync=(enabled=false,"
+ "method=fsync),use_environment=true,use_environment_priv=false,"
"verbose=,version=(major=0,minor=0),write_through=",
- confchk_wiredtiger_open_all, 52},
+ confchk_wiredtiger_open_all, 53},
{"wiredtiger_open_basecfg",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
",builtin_extension_config=,cache_cursors=true,"
@@ -1071,15 +1077,16 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"log=(archive=true,compressor=,enabled=false,file_max=100MB,"
"os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on,"
"zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4),"
- "mmap=true,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),timing_stress_for_test=,transaction_sync=(enabled=false"
- ",method=fsync),verbose=,version=(major=0,minor=0),write_through=",
- confchk_wiredtiger_open_basecfg, 46},
+ "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),"
+ "timing_stress_for_test=,transaction_sync=(enabled=false,"
+ "method=fsync),verbose=,version=(major=0,minor=0),write_through=",
+ confchk_wiredtiger_open_basecfg, 47},
{"wiredtiger_open_usercfg",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
",builtin_extension_config=,cache_cursors=true,"
@@ -1099,15 +1106,16 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"log=(archive=true,compressor=,enabled=false,file_max=100MB,"
"os_cache_dirty_pct=0,path=\".\",prealloc=true,recover=on,"
"zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4),"
- "mmap=true,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),timing_stress_for_test=,transaction_sync=(enabled=false"
- ",method=fsync),verbose=,write_through=",
- confchk_wiredtiger_open_usercfg, 45},
+ "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),"
+ "timing_stress_for_test=,transaction_sync=(enabled=false,"
+ "method=fsync),verbose=,write_through=",
+ confchk_wiredtiger_open_usercfg, 46},
{NULL, NULL, NULL, 0}};
int
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index c904f4702b3..b1cabb5e098 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -2572,6 +2572,9 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *c
WT_ERR(__wt_config_gets(session, cfg, "mmap", &cval));
conn->mmap = cval.val != 0;
+ WT_ERR(__wt_config_gets(session, cfg, "mmap_all", &cval));
+ conn->mmap_all = cval.val != 0;
+
WT_ERR(__wt_config_gets(session, cfg, "operation_timeout_ms", &cval));
conn->operation_timeout_us = (uint64_t)(cval.val * WT_THOUSAND);
diff --git a/src/third_party/wiredtiger/src/conn/conn_log.c b/src/third_party/wiredtiger/src/conn/conn_log.c
index abc03f3ed1e..850c8393a5f 100644
--- a/src/third_party/wiredtiger/src/conn/conn_log.c
+++ b/src/third_party/wiredtiger/src/conn/conn_log.c
@@ -107,17 +107,14 @@ __logmgr_version(WT_SESSION_IMPL *session, bool reconfig)
new_version = 1;
first_record = WT_LOG_END_HEADER;
downgrade = true;
- } else {
- /*
- * Assume current version unless the minor compatibility setting is the earlier version.
- */
+ } else if (conn->compat_major == WT_LOG_V2_MAJOR) {
+ new_version = conn->compat_minor == WT_LOG_V2_MINOR ? 2 : 3;
first_record = WT_LOG_END_HEADER + log->allocsize;
+ downgrade = true;
+ } else {
new_version = WT_LOG_VERSION;
+ first_record = WT_LOG_END_HEADER + log->allocsize;
downgrade = false;
- if (conn->compat_minor == WT_LOG_V2_MINOR) {
- new_version = 2;
- downgrade = true;
- }
}
/*
@@ -126,16 +123,16 @@ __logmgr_version(WT_SESSION_IMPL *session, bool reconfig)
if (conn->req_max_major != WT_CONN_COMPAT_NONE) {
if (conn->req_max_major < WT_LOG_V2_MAJOR)
conn->log_req_max = 1;
- else if (conn->req_max_minor == WT_LOG_V2_MINOR)
- conn->log_req_max = 2;
+ else if (conn->req_max_major == WT_LOG_V2_MAJOR)
+ conn->log_req_max = conn->req_max_minor == WT_LOG_V2_MINOR ? 2 : 3;
else
conn->log_req_max = WT_LOG_VERSION;
}
if (conn->req_min_major != WT_CONN_COMPAT_NONE) {
if (conn->req_min_major < WT_LOG_V2_MAJOR)
conn->log_req_min = 1;
- else if (conn->req_min_minor == WT_LOG_V2_MINOR)
- conn->log_req_min = 2;
+ else if (conn->req_min_major == WT_LOG_V2_MAJOR)
+ conn->log_req_min = conn->req_min_minor == WT_LOG_V2_MINOR ? 2 : 3;
else
conn->log_req_min = WT_LOG_VERSION;
}
diff --git a/src/third_party/wiredtiger/src/docs/devdoc-index.dox b/src/third_party/wiredtiger/src/docs/devdoc-index.dox
index f7707653207..bcae15c1f48 100644
--- a/src/third_party/wiredtiger/src/docs/devdoc-index.dox
+++ b/src/third_party/wiredtiger/src/docs/devdoc-index.dox
@@ -40,6 +40,13 @@ monitoring units (PMU); they measure CPU cycles, cache misses, branches, etc.
Kernel events include scheduling context switches, page faults and block I/O.
Here we provide a quick cheat sheet of how to use `perf` with WiredTiger.
+@subpage devdoc-xray
+
+XRay is a tool, originally developed at Google and now integrated in LLVM, that
+instruments the program such that when it runs it produces a trace of executed
+functions and their timestamps. This article explains how to instrument
+WiredTiger, collect the XRay traces, and analyze them.
+
@subpage devdoc-perf-flamegraphs
Why is my CPU busy? FlameGraphs help visually summarize on-CPU call stacks and
diff --git a/src/third_party/wiredtiger/src/docs/devdoc-xray.dox b/src/third_party/wiredtiger/src/docs/devdoc-xray.dox
new file mode 100644
index 00000000000..3aa1fa2686e
--- /dev/null
+++ b/src/third_party/wiredtiger/src/docs/devdoc-xray.dox
@@ -0,0 +1,76 @@
+/*! @page devdoc-xray Instrumentation and introspection with XRay
+
+XRay is a tool, originally developed at Google and now integrated in LLVM, that
+instruments the program such that when it runs it produces a trace of executed
+functions and their timestamps. This article explains how to instrument
+WiredTiger, collect the XRay traces, and analyze them. As an example, we will
+show how to trace \c wtperf.
+
+Step 1. Install LLVM.
+
+@code
+$ sudo apt install llvm
+@endcode
+
+LLVM needs to be version 8 or higher. Check the version like this:
+
+@code
+$ llvm-config –version
+@endcode
+
+If your distribution's default \c llvm-config isn't from the 8 series, you'll
+need to move one with a major version of 8 into the \c $PATH such that it gets
+invoked instead.
+
+Step 2. Configure the WiredTiger build with LLVM flags.
+
+@code
+../configure --enable-llvm CC="clang-8" CFLAGS="-fxray-instrument"
+@endcode
+
+Step 3. Build as usual.
+
+@code
+$ cd build_posix
+$ make
+@endcode
+
+Step 4. Run wtperf.
+
+Use the script \c wtperf_xray.sh to launch \c wtperf from the directory
+containing the \c wtperf binary. The first argument to the script must be the
+benchmark configuration file. For example:
+
+@code
+$ cd bench/wtperf
+$ ../../../bench/wtperf/runners/wtperf_xray.sh ../../../bench/wtperf/runners/small-btree.wtperf
+@endcode
+
+In general the usage is:


+
+@code
+wtperf_xray.sh <wtperf-config-file> [-h output-directory] [wtperf other arguments]
+@endcode
+
+The run of the program will produce an xray log -- the name of the log file will
+be printed to \c stdout.
+
+Step 5. Process the traces.
+
+To process the traces, use the \c xray_to_optrack tool in the \c
+tools/xray_to_optrack directory. If the tool isn't built, build it by typing \c
+make in the directory.
+
+Then, run the tool like this:
+
+@code
+xray_to_optrack <xray_instrumented_binary> <xray_log>
+@endcode
+
+\c xray_instrumented_binary is the binary that produced the log, \c wtperf in
+our case, and \c xray_log is the log file.
+
+The script will produce one or more files with a prefix \c optrack. You can view
+these files with optrack tools, described in the optrack documentation.
+
+*/
diff --git a/src/third_party/wiredtiger/src/docs/programming.dox b/src/third_party/wiredtiger/src/docs/programming.dox
index 106d1bdd1c5..334ee5ce4c6 100644
--- a/src/third_party/wiredtiger/src/docs/programming.dox
+++ b/src/third_party/wiredtiger/src/docs/programming.dox
@@ -44,8 +44,8 @@ each of which is ordered by one or more columns.
- @subpage in_memory
- @subpage cursor_join
- @subpage cursor_log
-- @subpage operation_tracking
- @subpage rebalance
+- @subpage operation_tracking
- @subpage shared_cache
- @subpage statistics
- @subpage_single upgrade
@@ -62,6 +62,7 @@ each of which is ordered by one or more columns.
<h2>Performance monitoring and tuning</h2>
- @subpage_single tune_statistics
- @subpage_single wtperf
+
<p>
- @subpage_single tune_build_options
- @subpage_single tune_bulk_load
diff --git a/src/third_party/wiredtiger/src/docs/spell.ok b/src/third_party/wiredtiger/src/docs/spell.ok
index 95fb2756f7c..b34771df3f0 100644
--- a/src/third_party/wiredtiger/src/docs/spell.ok
+++ b/src/third_party/wiredtiger/src/docs/spell.ok
@@ -106,6 +106,7 @@ WiredTigerPanicException
WiredTigerRollbackException
WiredTigerStat
WiredTigerTestCase
+XRay
Yann
Za
Zstd
@@ -261,6 +262,7 @@ freelist
fsync
ftruncate
fvisibility
+fxray
gcc
gdbm
ge
@@ -317,6 +319,7 @@ libkvs
libtool
libwiredtiger
lifecycle
+llvm
lmin
ln
loadtext
@@ -482,6 +485,7 @@ startsync
startuml
statlog
stderr
+stdout
str
strerror
strftime
@@ -558,6 +562,7 @@ wrlock
wtperf
wtstats
xa
+xray
yieldcpu
zlib
zseries
diff --git a/src/third_party/wiredtiger/src/evict/evict_page.c b/src/third_party/wiredtiger/src/evict/evict_page.c
index 9fe4677da49..00718e20f70 100644
--- a/src/third_party/wiredtiger/src/evict/evict_page.c
+++ b/src/third_party/wiredtiger/src/evict/evict_page.c
@@ -95,7 +95,8 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32
WT_DECL_RET;
WT_PAGE *page;
uint64_t time_start, time_stop;
- bool clean_page, closing, inmem_split, local_gen, tree_dead;
+ uint32_t session_flags;
+ bool clean_page, closing, inmem_split, is_owner, local_gen, tree_dead;
conn = S2C(session);
page = ref->page;
@@ -111,6 +112,31 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32
LF_SET(WT_EVICT_CALL_NO_SPLIT);
/*
+ * Before we enter the eviction generation, make sure this session has a cached history store
+ * cursor, otherwise we can deadlock with a session wanting exclusive access to a handle: that
+ * session will have a handle list write lock and will be waiting on eviction to drain, we'll be
+ * inside eviction waiting on a handle list read lock to open a history store cursor.
+ *
+ * The test for the no-reconciliation flag is necessary because the session may already be doing
+ * history store operations and if we open/close the existing history store cursor, we can
+ * affect those already-running history store operations by changing the cursor state. When
+ * doing history store operations, we set the no-reconciliation flag, use it as short-hand to
+ * avoid that problem. This doesn't open up the window for the deadlock because setting the
+ * no-reconciliation flag limits eviction to in-memory splits. FIXME: This isn't reasonable and
+ * needs a better fix.
+ *
+ * The test for the connection's default session is because there are known problems with using
+ * cached cursors from the default session. FIXME: This isn't reasonable and needs a better fix.
+ */
+ if (!WT_IS_METADATA(S2BT(session)->dhandle) && !F_ISSET(conn, WT_CONN_IN_MEMORY) &&
+ session->hs_cursor == NULL && !F_ISSET(session, WT_SESSION_NO_RECONCILE) &&
+ session != conn->default_session) {
+ session_flags = 0; /* [-Werror=maybe-uninitialized] */
+ WT_RET(__wt_hs_cursor(session, &session_flags, &is_owner));
+ WT_RET(__wt_hs_cursor_close(session, session_flags, is_owner));
+ }
+
+ /*
* Enter the eviction generation. If we re-enter eviction, leave the previous eviction
* generation (which must be as low as the current generation), untouched.
*/
diff --git a/src/third_party/wiredtiger/src/history/hs.c b/src/third_party/wiredtiger/src/history/hs.c
index 861ddb5f996..492a2242018 100644
--- a/src/third_party/wiredtiger/src/history/hs.c
+++ b/src/third_party/wiredtiger/src/history/hs.c
@@ -141,6 +141,8 @@ int
__wt_hs_create(WT_SESSION_IMPL *session, const char **cfg)
{
WT_CONNECTION_IMPL *conn;
+ WT_DECL_RET;
+ const char *drop_cfg[] = {WT_CONFIG_BASE(session, WT_SESSION_drop), "force=true", NULL};
conn = S2C(session);
@@ -148,6 +150,11 @@ __wt_hs_create(WT_SESSION_IMPL *session, const char **cfg)
if (F_ISSET(conn, WT_CONN_IN_MEMORY | WT_CONN_READONLY))
return (0);
+ /* The LAS table may exist on upgrade. Discard it. */
+ WT_WITH_SCHEMA_LOCK(
+ session, ret = __wt_schema_drop(session, "file:WiredTigerLAS.wt", drop_cfg));
+ WT_RET(ret);
+
/* Re-create the table. */
WT_RET(__wt_session_create(session, WT_HS_URI, WT_HS_CONFIG));
diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h
index 285f760019e..6f6ebb0d7f0 100644
--- a/src/third_party/wiredtiger/src/include/connection.h
+++ b/src/third_party/wiredtiger/src/include/connection.h
@@ -35,7 +35,7 @@ extern WT_PROCESS __wt_process;
/*
* WT_KEYED_ENCRYPTOR --
- * An list entry for an encryptor with a unique (name, keyid).
+ * A list entry for an encryptor with a unique (name, keyid).
*/
struct __wt_keyed_encryptor {
const char *keyid; /* Key id of encryptor */
@@ -150,8 +150,7 @@ struct __wt_named_extractor {
/*
* WT_CONN_HOTBACKUP_START --
- * Macro to set connection data appropriately for when we commence hot
- * backup.
+ * Macro to set connection data appropriately for when we commence hot backup.
*/
#define WT_CONN_HOTBACKUP_START(conn) \
do { \
@@ -443,7 +442,8 @@ struct __wt_connection_impl {
uint64_t direct_io; /* O_DIRECT, FILE_FLAG_NO_BUFFERING */
uint64_t write_through; /* FILE_FLAG_WRITE_THROUGH */
- bool mmap; /* mmap configuration */
+ bool mmap; /* use mmap when reading checkpoints */
+ bool mmap_all; /* use mmap for all I/O on data files */
int page_size; /* OS page size for mmap alignment */
/* AUTOMATIC FLAG VALUE GENERATION START */
diff --git a/src/third_party/wiredtiger/src/include/extern_posix.h b/src/third_party/wiredtiger/src/include/extern_posix.h
index a2280aefa4f..9b8821c86b9 100644
--- a/src/third_party/wiredtiger/src/include/extern_posix.h
+++ b/src/third_party/wiredtiger/src/include/extern_posix.h
@@ -53,10 +53,15 @@ extern void __wt_cond_wait_signal(WT_SESSION_IMPL *session, WT_CONDVAR *cond, ui
bool (*run_func)(WT_SESSION_IMPL *), bool *signalled);
extern void __wt_epoch_raw(WT_SESSION_IMPL *session, struct timespec *tsp)
WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default")));
+extern void __wt_map_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session);
+extern void __wt_prepare_remap_resize_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session);
+extern void __wt_release_without_remap(WT_FILE_HANDLE *file_handle);
+extern void __wt_remap_resize_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session);
extern void __wt_sleep(uint64_t seconds, uint64_t micro_seconds)
WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default")));
extern void __wt_stream_set_line_buffer(FILE *fp)
WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default")));
extern void __wt_stream_set_no_buffer(FILE *fp) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default")));
extern void __wt_thread_id(uintmax_t *id) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default")));
+extern void __wt_unmap_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session);
extern void __wt_yield(void) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default")));
diff --git a/src/third_party/wiredtiger/src/include/log.h b/src/third_party/wiredtiger/src/include/log.h
index 9c67e12607c..6c232221338 100644
--- a/src/third_party/wiredtiger/src/include/log.h
+++ b/src/third_party/wiredtiger/src/include/log.h
@@ -351,8 +351,9 @@ struct __wt_log_desc {
* MongoDB to detect users accidentally running old binaries on a newer
* release. There are no actual log file format changes with version 2 and
* 3.
+ * NOTE: We bumped the log version from 3 to 4 for the same reason.
*/
-#define WT_LOG_VERSION 3
+#define WT_LOG_VERSION 4
uint16_t version; /* 04-05: Log version */
uint16_t unused; /* 06-07: Unused */
uint64_t log_size; /* 08-15: Log file size */
@@ -369,6 +370,8 @@ struct __wt_log_desc {
#define WT_LOG_V2_MINOR 0
#define WT_LOG_V3_MAJOR 3
#define WT_LOG_V3_MINOR 1
+#define WT_LOG_V4_MAJOR 10
+#define WT_LOG_V4_MINOR 0
/*
* __wt_log_desc_byteswap --
diff --git a/src/third_party/wiredtiger/src/include/meta.h b/src/third_party/wiredtiger/src/include/meta.h
index a92d7e88e9f..10d8d923b5d 100644
--- a/src/third_party/wiredtiger/src/include/meta.h
+++ b/src/third_party/wiredtiger/src/include/meta.h
@@ -47,6 +47,14 @@
#define WT_METADATA_VERSION_STR "WiredTiger version string"
/*
+ * As a result of a data format change WiredTiger is not able to start on versions below 3.2.0, as
+ * it will write out a data format that is not readable by those versions. These version numbers
+ * provide such mechanism.
+ */
+#define WT_MIN_STARTUP_VERSION_MAJOR 3 /* Minimum version we can start on. */
+#define WT_MIN_STARTUP_VERSION_MINOR 2
+
+/*
* WT_WITH_TURTLE_LOCK --
* Acquire the turtle file lock, perform an operation, drop the lock.
*/
diff --git a/src/third_party/wiredtiger/src/include/os.h b/src/third_party/wiredtiger/src/include/os.h
index e58fbdbca71..668e8daf781 100644
--- a/src/third_party/wiredtiger/src/include/os.h
+++ b/src/third_party/wiredtiger/src/include/os.h
@@ -11,7 +11,7 @@
/* \
* A call returning 0 indicates success; any call where \
* 0 is not the only successful return must provide an \
- * expression evaluating to 0 in all successful cases. \
+ * expression evaluating to 0 in all successful cases. \
* \
* XXX \
* Casting the call's return to int is because CentOS 7.3.1611 \
@@ -139,6 +139,14 @@ struct __wt_file_handle_posix {
int fd; /* POSIX file handle */
bool direct_io; /* O_DIRECT configured */
+
+ /* The memory buffer and variables if we use mmap for I/O */
+ uint8_t *mmap_buf;
+ bool mmap_file_mappable;
+ int mmap_prot;
+ volatile uint32_t mmap_resizing;
+ wt_off_t mmap_size;
+ volatile uint32_t mmap_usecount;
};
#endif
diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h
index 23761319646..d1c7888e54f 100644
--- a/src/third_party/wiredtiger/src/include/stat.h
+++ b/src/third_party/wiredtiger/src/include/stat.h
@@ -322,10 +322,16 @@ struct __wt_connection_stats {
int64_t block_read;
int64_t block_write;
int64_t block_byte_read;
+ int64_t block_byte_read_mmap;
+ int64_t block_byte_read_syscall;
int64_t block_byte_write;
int64_t block_byte_write_checkpoint;
+ int64_t block_byte_write_mmap;
+ int64_t block_byte_write_syscall;
int64_t block_map_read;
int64_t block_byte_map_read;
+ int64_t block_remap_file_resize;
+ int64_t block_remap_file_write;
int64_t cache_read_app_count;
int64_t cache_read_app_time;
int64_t cache_write_app_count;
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index 63aac197478..322fbe47485 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -2956,8 +2956,10 @@ struct __wt_connection {
* merging LSM trees in the database. Each worker thread uses a session handle from the configured
* session_max., an integer between 3 and 20; default \c 4.}
* @config{ ),,}
- * @config{mmap, Use memory mapping to access files when possible., a boolean flag; default \c
- * true.}
+ * @config{mmap, Use memory mapping when accessing files in a read-only mode., a boolean flag;
+ * default \c true.}
+ * @config{mmap_all, Use memory mapping to read and write all data files., a boolean flag; default
+ * \c false.}
* @config{multiprocess, permit sharing between processes (will automatically start an RPC server
* for primary processes and use RPC for secondary processes). <b>Not yet supported in
* WiredTiger</b>., a boolean flag; default \c false.}
@@ -4959,853 +4961,868 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_CONN_BLOCK_WRITE 1025
/*! block-manager: bytes read */
#define WT_STAT_CONN_BLOCK_BYTE_READ 1026
+/*! block-manager: bytes read via memory map API */
+#define WT_STAT_CONN_BLOCK_BYTE_READ_MMAP 1027
+/*! block-manager: bytes read via system call API */
+#define WT_STAT_CONN_BLOCK_BYTE_READ_SYSCALL 1028
/*! block-manager: bytes written */
-#define WT_STAT_CONN_BLOCK_BYTE_WRITE 1027
+#define WT_STAT_CONN_BLOCK_BYTE_WRITE 1029
/*! block-manager: bytes written for checkpoint */
-#define WT_STAT_CONN_BLOCK_BYTE_WRITE_CHECKPOINT 1028
+#define WT_STAT_CONN_BLOCK_BYTE_WRITE_CHECKPOINT 1030
+/*! block-manager: bytes written via memory map API */
+#define WT_STAT_CONN_BLOCK_BYTE_WRITE_MMAP 1031
+/*! block-manager: bytes written via system call API */
+#define WT_STAT_CONN_BLOCK_BYTE_WRITE_SYSCALL 1032
/*! block-manager: mapped blocks read */
-#define WT_STAT_CONN_BLOCK_MAP_READ 1029
+#define WT_STAT_CONN_BLOCK_MAP_READ 1033
/*! block-manager: mapped bytes read */
-#define WT_STAT_CONN_BLOCK_BYTE_MAP_READ 1030
+#define WT_STAT_CONN_BLOCK_BYTE_MAP_READ 1034
+/*!
+ * 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 1035
+/*! block-manager: number of times the region was remapped via write */
+#define WT_STAT_CONN_BLOCK_REMAP_FILE_WRITE 1036
/*! cache: application threads page read from disk to cache count */
-#define WT_STAT_CONN_CACHE_READ_APP_COUNT 1031
+#define WT_STAT_CONN_CACHE_READ_APP_COUNT 1037
/*! cache: application threads page read from disk to cache time (usecs) */
-#define WT_STAT_CONN_CACHE_READ_APP_TIME 1032
+#define WT_STAT_CONN_CACHE_READ_APP_TIME 1038
/*! cache: application threads page write from cache to disk count */
-#define WT_STAT_CONN_CACHE_WRITE_APP_COUNT 1033
+#define WT_STAT_CONN_CACHE_WRITE_APP_COUNT 1039
/*! cache: application threads page write from cache to disk time (usecs) */
-#define WT_STAT_CONN_CACHE_WRITE_APP_TIME 1034
+#define WT_STAT_CONN_CACHE_WRITE_APP_TIME 1040
/*! cache: bytes belonging to page images in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_IMAGE 1035
+#define WT_STAT_CONN_CACHE_BYTES_IMAGE 1041
/*! cache: bytes belonging to the history store table in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_HS 1036
+#define WT_STAT_CONN_CACHE_BYTES_HS 1042
/*! cache: bytes currently in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_INUSE 1037
+#define WT_STAT_CONN_CACHE_BYTES_INUSE 1043
/*! cache: bytes dirty in the cache cumulative */
-#define WT_STAT_CONN_CACHE_BYTES_DIRTY_TOTAL 1038
+#define WT_STAT_CONN_CACHE_BYTES_DIRTY_TOTAL 1044
/*! cache: bytes not belonging to page images in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_OTHER 1039
+#define WT_STAT_CONN_CACHE_BYTES_OTHER 1045
/*! cache: bytes read into cache */
-#define WT_STAT_CONN_CACHE_BYTES_READ 1040
+#define WT_STAT_CONN_CACHE_BYTES_READ 1046
/*! cache: bytes written from cache */
-#define WT_STAT_CONN_CACHE_BYTES_WRITE 1041
+#define WT_STAT_CONN_CACHE_BYTES_WRITE 1047
/*! cache: cache overflow score */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_SCORE 1042
+#define WT_STAT_CONN_CACHE_LOOKASIDE_SCORE 1048
/*! cache: checkpoint blocked page eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_CHECKPOINT 1043
+#define WT_STAT_CONN_CACHE_EVICTION_CHECKPOINT 1049
/*! cache: eviction calls to get a page */
-#define WT_STAT_CONN_CACHE_EVICTION_GET_REF 1044
+#define WT_STAT_CONN_CACHE_EVICTION_GET_REF 1050
/*! cache: eviction calls to get a page found queue empty */
-#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY 1045
+#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY 1051
/*! cache: eviction calls to get a page found queue empty after locking */
-#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2 1046
+#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2 1052
/*! cache: eviction currently operating in aggressive mode */
-#define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET 1047
+#define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET 1053
/*! cache: eviction empty score */
-#define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE 1048
+#define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE 1054
/*! cache: eviction passes of a file */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK_PASSES 1049
+#define WT_STAT_CONN_CACHE_EVICTION_WALK_PASSES 1055
/*! cache: eviction server candidate queue empty when topping up */
-#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1050
+#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1056
/*! cache: eviction server candidate queue not empty when topping up */
-#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1051
+#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1057
/*! cache: eviction server evicting pages */
-#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1052
+#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1058
/*!
* cache: eviction server slept, because we did not make progress with
* eviction
*/
-#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1053
+#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1059
/*! cache: eviction server unable to reach eviction goal */
-#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1054
+#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1060
/*! cache: eviction server waiting for a leaf page */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK_LEAF_NOTFOUND 1055
+#define WT_STAT_CONN_CACHE_EVICTION_WALK_LEAF_NOTFOUND 1061
/*! cache: eviction state */
-#define WT_STAT_CONN_CACHE_EVICTION_STATE 1056
+#define WT_STAT_CONN_CACHE_EVICTION_STATE 1062
/*! cache: eviction walk target pages histogram - 0-9 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT10 1057
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT10 1063
/*! cache: eviction walk target pages histogram - 10-31 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT32 1058
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT32 1064
/*! cache: eviction walk target pages histogram - 128 and higher */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_GE128 1059
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_GE128 1065
/*! cache: eviction walk target pages histogram - 32-63 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT64 1060
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT64 1066
/*! cache: eviction walk target pages histogram - 64-128 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT128 1061
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT128 1067
/*! cache: eviction walk target strategy both clean and dirty pages */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_BOTH_CLEAN_AND_DIRTY 1062
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_BOTH_CLEAN_AND_DIRTY 1068
/*! cache: eviction walk target strategy only clean pages */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_CLEAN 1063
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_CLEAN 1069
/*! cache: eviction walk target strategy only dirty pages */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_DIRTY 1064
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_DIRTY 1070
/*! cache: eviction walks abandoned */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1065
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1071
/*! cache: eviction walks gave up because they restarted their walk twice */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STOPPED 1066
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STOPPED 1072
/*!
* 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 1067
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 1073
/*!
* 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 1068
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 1074
/*! cache: eviction walks reached end of tree */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ENDED 1069
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ENDED 1075
/*! cache: eviction walks started from root of tree */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK_FROM_ROOT 1070
+#define WT_STAT_CONN_CACHE_EVICTION_WALK_FROM_ROOT 1076
/*! cache: eviction walks started from saved location in tree */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK_SAVED_POS 1071
+#define WT_STAT_CONN_CACHE_EVICTION_WALK_SAVED_POS 1077
/*! cache: eviction worker thread active */
-#define WT_STAT_CONN_CACHE_EVICTION_ACTIVE_WORKERS 1072
+#define WT_STAT_CONN_CACHE_EVICTION_ACTIVE_WORKERS 1078
/*! cache: eviction worker thread created */
-#define WT_STAT_CONN_CACHE_EVICTION_WORKER_CREATED 1073
+#define WT_STAT_CONN_CACHE_EVICTION_WORKER_CREATED 1079
/*! cache: eviction worker thread evicting pages */
-#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1074
+#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1080
/*! cache: eviction worker thread removed */
-#define WT_STAT_CONN_CACHE_EVICTION_WORKER_REMOVED 1075
+#define WT_STAT_CONN_CACHE_EVICTION_WORKER_REMOVED 1081
/*! cache: eviction worker thread stable number */
-#define WT_STAT_CONN_CACHE_EVICTION_STABLE_STATE_WORKERS 1076
+#define WT_STAT_CONN_CACHE_EVICTION_STABLE_STATE_WORKERS 1082
/*! cache: files with active eviction walks */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1077
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1083
/*! cache: files with new eviction walks started */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1078
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1084
/*! cache: force re-tuning of eviction workers once in a while */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_RETUNE 1079
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_RETUNE 1085
/*! cache: forced eviction - pages evicted that were clean count */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN 1080
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN 1086
/*! cache: forced eviction - pages evicted that were clean time (usecs) */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN_TIME 1081
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN_TIME 1087
/*! cache: forced eviction - pages evicted that were dirty count */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY 1082
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY 1088
/*! cache: forced eviction - pages evicted that were dirty time (usecs) */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY_TIME 1083
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY_TIME 1089
/*!
* cache: forced eviction - pages selected because of too many deleted
* items count
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1084
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1090
/*! cache: forced eviction - pages selected count */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1085
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1091
/*! cache: forced eviction - pages selected unable to be evicted count */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1086
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1092
/*! cache: forced eviction - pages selected unable to be evicted time */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL_TIME 1087
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL_TIME 1093
/*! cache: hazard pointer blocked page eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1088
+#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1094
/*! cache: hazard pointer check calls */
-#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1089
+#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1095
/*! cache: hazard pointer check entries walked */
-#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1090
+#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1096
/*! cache: hazard pointer maximum array length */
-#define WT_STAT_CONN_CACHE_HAZARD_MAX 1091
+#define WT_STAT_CONN_CACHE_HAZARD_MAX 1097
/*! cache: history store key truncation due to mixed timestamps */
-#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_MIX_TS 1092
+#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_MIX_TS 1098
/*!
* cache: history store key truncation due to the key being removed from
* the data page
*/
-#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL 1093
+#define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL 1099
/*! cache: history store score */
-#define WT_STAT_CONN_CACHE_HS_SCORE 1094
+#define WT_STAT_CONN_CACHE_HS_SCORE 1100
/*! cache: history store table insert calls */
-#define WT_STAT_CONN_CACHE_HS_INSERT 1095
+#define WT_STAT_CONN_CACHE_HS_INSERT 1101
/*! cache: history store table max on-disk size */
-#define WT_STAT_CONN_CACHE_HS_ONDISK_MAX 1096
+#define WT_STAT_CONN_CACHE_HS_ONDISK_MAX 1102
/*! cache: history store table on-disk size */
-#define WT_STAT_CONN_CACHE_HS_ONDISK 1097
+#define WT_STAT_CONN_CACHE_HS_ONDISK 1103
/*! cache: history store table reads */
-#define WT_STAT_CONN_CACHE_HS_READ 1098
+#define WT_STAT_CONN_CACHE_HS_READ 1104
/*! cache: history store table reads missed */
-#define WT_STAT_CONN_CACHE_HS_READ_MISS 1099
+#define WT_STAT_CONN_CACHE_HS_READ_MISS 1105
/*! cache: history store table reads requiring squashed modifies */
-#define WT_STAT_CONN_CACHE_HS_READ_SQUASH 1100
+#define WT_STAT_CONN_CACHE_HS_READ_SQUASH 1106
/*! cache: history store table remove calls due to key truncation */
-#define WT_STAT_CONN_CACHE_HS_REMOVE_KEY_TRUNCATE 1101
+#define WT_STAT_CONN_CACHE_HS_REMOVE_KEY_TRUNCATE 1107
/*! cache: history store table writes requiring squashed modifies */
-#define WT_STAT_CONN_CACHE_HS_WRITE_SQUASH 1102
+#define WT_STAT_CONN_CACHE_HS_WRITE_SQUASH 1108
/*! cache: in-memory page passed criteria to be split */
-#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1103
+#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1109
/*! cache: in-memory page splits */
-#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1104
+#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1110
/*! cache: internal pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1105
+#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1111
/*! cache: internal pages queued for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_QUEUED 1106
+#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_QUEUED 1112
/*! cache: internal pages seen by eviction walk */
-#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_SEEN 1107
+#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_SEEN 1113
/*! cache: internal pages seen by eviction walk that are already queued */
-#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_ALREADY_QUEUED 1108
+#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_ALREADY_QUEUED 1114
/*! cache: internal pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1109
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1115
/*! cache: leaf pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1110
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1116
/*! cache: maximum bytes configured */
-#define WT_STAT_CONN_CACHE_BYTES_MAX 1111
+#define WT_STAT_CONN_CACHE_BYTES_MAX 1117
/*! cache: maximum page size at eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1112
+#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1118
/*! cache: modified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1113
+#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1119
/*! cache: modified pages evicted by application threads */
-#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1114
+#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1120
/*! cache: operations timed out waiting for space in cache */
-#define WT_STAT_CONN_CACHE_TIMED_OUT_OPS 1115
+#define WT_STAT_CONN_CACHE_TIMED_OUT_OPS 1121
/*! cache: overflow pages read into cache */
-#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1116
+#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1122
/*! cache: page split during eviction deepened the tree */
-#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1117
+#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1123
/*! cache: page written requiring history store records */
-#define WT_STAT_CONN_CACHE_WRITE_HS 1118
+#define WT_STAT_CONN_CACHE_WRITE_HS 1124
/*! cache: pages currently held in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_INUSE 1119
+#define WT_STAT_CONN_CACHE_PAGES_INUSE 1125
/*! cache: pages evicted by application threads */
-#define WT_STAT_CONN_CACHE_EVICTION_APP 1120
+#define WT_STAT_CONN_CACHE_EVICTION_APP 1126
/*! cache: pages queued for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1121
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1127
/*! cache: pages queued for eviction post lru sorting */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_POST_LRU 1122
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_POST_LRU 1128
/*! cache: pages queued for urgent eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1123
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1129
/*! cache: pages queued for urgent eviction during walk */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1124
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1130
/*! cache: pages read into cache */
-#define WT_STAT_CONN_CACHE_READ 1125
+#define WT_STAT_CONN_CACHE_READ 1131
/*! cache: pages read into cache after truncate */
-#define WT_STAT_CONN_CACHE_READ_DELETED 1126
+#define WT_STAT_CONN_CACHE_READ_DELETED 1132
/*! cache: pages read into cache after truncate in prepare state */
-#define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED 1127
+#define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED 1133
/*! cache: pages requested from the cache */
-#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1128
+#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1134
/*! cache: pages seen by eviction walk */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1129
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1135
/*! cache: pages seen by eviction walk that are already queued */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_ALREADY_QUEUED 1130
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_ALREADY_QUEUED 1136
/*! cache: pages selected for eviction unable to be evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1131
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1137
/*!
* cache: pages selected for eviction unable to be evicted as the parent
* page has overflow items
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FAIL_PARENT_HAS_OVERFLOW_ITEMS 1132
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL_PARENT_HAS_OVERFLOW_ITEMS 1138
/*!
* 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 1133
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL_ACTIVE_CHILDREN_ON_AN_INTERNAL_PAGE 1139
/*!
* cache: pages selected for eviction unable to be evicted because of
* failure in reconciliation
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FAIL_IN_RECONCILIATION 1134
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL_IN_RECONCILIATION 1140
/*!
* cache: pages selected for eviction unable to be evicted due to newer
* modifications on a clean page
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FAIL_WITH_NEWER_MODIFICATIONS_ON_A_CLEAN_PAGE 1135
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL_WITH_NEWER_MODIFICATIONS_ON_A_CLEAN_PAGE 1141
/*! cache: pages walked for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK 1136
+#define WT_STAT_CONN_CACHE_EVICTION_WALK 1142
/*! cache: pages written from cache */
-#define WT_STAT_CONN_CACHE_WRITE 1137
+#define WT_STAT_CONN_CACHE_WRITE 1143
/*! cache: pages written requiring in-memory restoration */
-#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1138
+#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1144
/*! cache: percentage overhead */
-#define WT_STAT_CONN_CACHE_OVERHEAD 1139
+#define WT_STAT_CONN_CACHE_OVERHEAD 1145
/*! cache: tracked bytes belonging to internal pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1140
+#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1146
/*! cache: tracked bytes belonging to leaf pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_LEAF 1141
+#define WT_STAT_CONN_CACHE_BYTES_LEAF 1147
/*! cache: tracked dirty bytes in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1142
+#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1148
/*! cache: tracked dirty pages in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1143
+#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1149
/*! cache: unmodified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1144
+#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1150
/*! capacity: background fsync file handles considered */
-#define WT_STAT_CONN_FSYNC_ALL_FH_TOTAL 1145
+#define WT_STAT_CONN_FSYNC_ALL_FH_TOTAL 1151
/*! capacity: background fsync file handles synced */
-#define WT_STAT_CONN_FSYNC_ALL_FH 1146
+#define WT_STAT_CONN_FSYNC_ALL_FH 1152
/*! capacity: background fsync time (msecs) */
-#define WT_STAT_CONN_FSYNC_ALL_TIME 1147
+#define WT_STAT_CONN_FSYNC_ALL_TIME 1153
/*! capacity: bytes read */
-#define WT_STAT_CONN_CAPACITY_BYTES_READ 1148
+#define WT_STAT_CONN_CAPACITY_BYTES_READ 1154
/*! capacity: bytes written for checkpoint */
-#define WT_STAT_CONN_CAPACITY_BYTES_CKPT 1149
+#define WT_STAT_CONN_CAPACITY_BYTES_CKPT 1155
/*! capacity: bytes written for eviction */
-#define WT_STAT_CONN_CAPACITY_BYTES_EVICT 1150
+#define WT_STAT_CONN_CAPACITY_BYTES_EVICT 1156
/*! capacity: bytes written for log */
-#define WT_STAT_CONN_CAPACITY_BYTES_LOG 1151
+#define WT_STAT_CONN_CAPACITY_BYTES_LOG 1157
/*! capacity: bytes written total */
-#define WT_STAT_CONN_CAPACITY_BYTES_WRITTEN 1152
+#define WT_STAT_CONN_CAPACITY_BYTES_WRITTEN 1158
/*! capacity: threshold to call fsync */
-#define WT_STAT_CONN_CAPACITY_THRESHOLD 1153
+#define WT_STAT_CONN_CAPACITY_THRESHOLD 1159
/*! capacity: time waiting due to total capacity (usecs) */
-#define WT_STAT_CONN_CAPACITY_TIME_TOTAL 1154
+#define WT_STAT_CONN_CAPACITY_TIME_TOTAL 1160
/*! capacity: time waiting during checkpoint (usecs) */
-#define WT_STAT_CONN_CAPACITY_TIME_CKPT 1155
+#define WT_STAT_CONN_CAPACITY_TIME_CKPT 1161
/*! capacity: time waiting during eviction (usecs) */
-#define WT_STAT_CONN_CAPACITY_TIME_EVICT 1156
+#define WT_STAT_CONN_CAPACITY_TIME_EVICT 1162
/*! capacity: time waiting during logging (usecs) */
-#define WT_STAT_CONN_CAPACITY_TIME_LOG 1157
+#define WT_STAT_CONN_CAPACITY_TIME_LOG 1163
/*! capacity: time waiting during read (usecs) */
-#define WT_STAT_CONN_CAPACITY_TIME_READ 1158
+#define WT_STAT_CONN_CAPACITY_TIME_READ 1164
/*! connection: auto adjusting condition resets */
-#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1159
+#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1165
/*! connection: auto adjusting condition wait calls */
-#define WT_STAT_CONN_COND_AUTO_WAIT 1160
+#define WT_STAT_CONN_COND_AUTO_WAIT 1166
/*! connection: detected system time went backwards */
-#define WT_STAT_CONN_TIME_TRAVEL 1161
+#define WT_STAT_CONN_TIME_TRAVEL 1167
/*! connection: files currently open */
-#define WT_STAT_CONN_FILE_OPEN 1162
+#define WT_STAT_CONN_FILE_OPEN 1168
/*! connection: memory allocations */
-#define WT_STAT_CONN_MEMORY_ALLOCATION 1163
+#define WT_STAT_CONN_MEMORY_ALLOCATION 1169
/*! connection: memory frees */
-#define WT_STAT_CONN_MEMORY_FREE 1164
+#define WT_STAT_CONN_MEMORY_FREE 1170
/*! connection: memory re-allocations */
-#define WT_STAT_CONN_MEMORY_GROW 1165
+#define WT_STAT_CONN_MEMORY_GROW 1171
/*! connection: pthread mutex condition wait calls */
-#define WT_STAT_CONN_COND_WAIT 1166
+#define WT_STAT_CONN_COND_WAIT 1172
/*! connection: pthread mutex shared lock read-lock calls */
-#define WT_STAT_CONN_RWLOCK_READ 1167
+#define WT_STAT_CONN_RWLOCK_READ 1173
/*! connection: pthread mutex shared lock write-lock calls */
-#define WT_STAT_CONN_RWLOCK_WRITE 1168
+#define WT_STAT_CONN_RWLOCK_WRITE 1174
/*! connection: total fsync I/Os */
-#define WT_STAT_CONN_FSYNC_IO 1169
+#define WT_STAT_CONN_FSYNC_IO 1175
/*! connection: total read I/Os */
-#define WT_STAT_CONN_READ_IO 1170
+#define WT_STAT_CONN_READ_IO 1176
/*! connection: total write I/Os */
-#define WT_STAT_CONN_WRITE_IO 1171
+#define WT_STAT_CONN_WRITE_IO 1177
/*! cursor: cached cursor count */
-#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1172
+#define WT_STAT_CONN_CURSOR_CACHED_COUNT 1178
/*! cursor: cursor bulk loaded cursor insert calls */
-#define WT_STAT_CONN_CURSOR_INSERT_BULK 1173
+#define WT_STAT_CONN_CURSOR_INSERT_BULK 1179
/*! cursor: cursor close calls that result in cache */
-#define WT_STAT_CONN_CURSOR_CACHE 1174
+#define WT_STAT_CONN_CURSOR_CACHE 1180
/*! cursor: cursor create calls */
-#define WT_STAT_CONN_CURSOR_CREATE 1175
+#define WT_STAT_CONN_CURSOR_CREATE 1181
/*! cursor: cursor insert calls */
-#define WT_STAT_CONN_CURSOR_INSERT 1176
+#define WT_STAT_CONN_CURSOR_INSERT 1182
/*! cursor: cursor insert key and value bytes */
-#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1177
+#define WT_STAT_CONN_CURSOR_INSERT_BYTES 1183
/*! cursor: cursor modify calls */
-#define WT_STAT_CONN_CURSOR_MODIFY 1178
+#define WT_STAT_CONN_CURSOR_MODIFY 1184
/*! cursor: cursor modify key and value bytes affected */
-#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1179
+#define WT_STAT_CONN_CURSOR_MODIFY_BYTES 1185
/*! cursor: cursor modify value bytes modified */
-#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1180
+#define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH 1186
/*! cursor: cursor next calls */
-#define WT_STAT_CONN_CURSOR_NEXT 1181
+#define WT_STAT_CONN_CURSOR_NEXT 1187
/*! cursor: cursor operation restarted */
-#define WT_STAT_CONN_CURSOR_RESTART 1182
+#define WT_STAT_CONN_CURSOR_RESTART 1188
/*! cursor: cursor prev calls */
-#define WT_STAT_CONN_CURSOR_PREV 1183
+#define WT_STAT_CONN_CURSOR_PREV 1189
/*! cursor: cursor remove calls */
-#define WT_STAT_CONN_CURSOR_REMOVE 1184
+#define WT_STAT_CONN_CURSOR_REMOVE 1190
/*! cursor: cursor remove key bytes removed */
-#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1185
+#define WT_STAT_CONN_CURSOR_REMOVE_BYTES 1191
/*! cursor: cursor reserve calls */
-#define WT_STAT_CONN_CURSOR_RESERVE 1186
+#define WT_STAT_CONN_CURSOR_RESERVE 1192
/*! cursor: cursor reset calls */
-#define WT_STAT_CONN_CURSOR_RESET 1187
+#define WT_STAT_CONN_CURSOR_RESET 1193
/*! cursor: cursor search calls */
-#define WT_STAT_CONN_CURSOR_SEARCH 1188
+#define WT_STAT_CONN_CURSOR_SEARCH 1194
/*! cursor: cursor search near calls */
-#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1189
+#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1195
/*! cursor: cursor sweep buckets */
-#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1190
+#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1196
/*! cursor: cursor sweep cursors closed */
-#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1191
+#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1197
/*! cursor: cursor sweep cursors examined */
-#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1192
+#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1198
/*! cursor: cursor sweeps */
-#define WT_STAT_CONN_CURSOR_SWEEP 1193
+#define WT_STAT_CONN_CURSOR_SWEEP 1199
/*! cursor: cursor truncate calls */
-#define WT_STAT_CONN_CURSOR_TRUNCATE 1194
+#define WT_STAT_CONN_CURSOR_TRUNCATE 1200
/*! cursor: cursor update calls */
-#define WT_STAT_CONN_CURSOR_UPDATE 1195
+#define WT_STAT_CONN_CURSOR_UPDATE 1201
/*! cursor: cursor update key and value bytes */
-#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1196
+#define WT_STAT_CONN_CURSOR_UPDATE_BYTES 1202
/*! cursor: cursor update value size change */
-#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1197
+#define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED 1203
/*! cursor: cursors reused from cache */
-#define WT_STAT_CONN_CURSOR_REOPEN 1198
+#define WT_STAT_CONN_CURSOR_REOPEN 1204
/*! cursor: open cursor count */
-#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1199
+#define WT_STAT_CONN_CURSOR_OPEN_COUNT 1205
/*! data-handle: connection data handle size */
-#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1200
+#define WT_STAT_CONN_DH_CONN_HANDLE_SIZE 1206
/*! data-handle: connection data handles currently active */
-#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1201
+#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1207
/*! data-handle: connection sweep candidate became referenced */
-#define WT_STAT_CONN_DH_SWEEP_REF 1202
+#define WT_STAT_CONN_DH_SWEEP_REF 1208
/*! data-handle: connection sweep dhandles closed */
-#define WT_STAT_CONN_DH_SWEEP_CLOSE 1203
+#define WT_STAT_CONN_DH_SWEEP_CLOSE 1209
/*! data-handle: connection sweep dhandles removed from hash list */
-#define WT_STAT_CONN_DH_SWEEP_REMOVE 1204
+#define WT_STAT_CONN_DH_SWEEP_REMOVE 1210
/*! data-handle: connection sweep time-of-death sets */
-#define WT_STAT_CONN_DH_SWEEP_TOD 1205
+#define WT_STAT_CONN_DH_SWEEP_TOD 1211
/*! data-handle: connection sweeps */
-#define WT_STAT_CONN_DH_SWEEPS 1206
+#define WT_STAT_CONN_DH_SWEEPS 1212
/*! data-handle: session dhandles swept */
-#define WT_STAT_CONN_DH_SESSION_HANDLES 1207
+#define WT_STAT_CONN_DH_SESSION_HANDLES 1213
/*! data-handle: session sweep attempts */
-#define WT_STAT_CONN_DH_SESSION_SWEEPS 1208
+#define WT_STAT_CONN_DH_SESSION_SWEEPS 1214
/*! history: history pages added for eviction during garbage collection */
-#define WT_STAT_CONN_HS_GC_PAGES_EVICT 1209
+#define WT_STAT_CONN_HS_GC_PAGES_EVICT 1215
/*! history: history pages removed for garbage collection */
-#define WT_STAT_CONN_HS_GC_PAGES_REMOVED 1210
+#define WT_STAT_CONN_HS_GC_PAGES_REMOVED 1216
/*! history: history pages visited for garbage collection */
-#define WT_STAT_CONN_HS_GC_PAGES_VISITED 1211
+#define WT_STAT_CONN_HS_GC_PAGES_VISITED 1217
/*! lock: checkpoint lock acquisitions */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1212
+#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1218
/*! lock: checkpoint lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1213
+#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1219
/*! lock: checkpoint lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1214
+#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1220
/*! lock: dhandle lock application thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1215
+#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1221
/*! lock: dhandle lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1216
+#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1222
/*! lock: dhandle read lock acquisitions */
-#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1217
+#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1223
/*! lock: dhandle write lock acquisitions */
-#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1218
+#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1224
/*!
* lock: durable timestamp queue lock application thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1219
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION 1225
/*!
* lock: durable timestamp queue lock internal thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1220
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL 1226
/*! lock: durable timestamp queue read lock acquisitions */
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1221
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT 1227
/*! lock: durable timestamp queue write lock acquisitions */
-#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1222
+#define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1228
/*! lock: metadata lock acquisitions */
-#define WT_STAT_CONN_LOCK_METADATA_COUNT 1223
+#define WT_STAT_CONN_LOCK_METADATA_COUNT 1229
/*! lock: metadata lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1224
+#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1230
/*! lock: metadata lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1225
+#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1231
/*!
* lock: read timestamp queue lock application thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1226
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1232
/*! lock: read timestamp queue lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1227
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1233
/*! lock: read timestamp queue read lock acquisitions */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1228
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1234
/*! lock: read timestamp queue write lock acquisitions */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1229
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1235
/*! lock: schema lock acquisitions */
-#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1230
+#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1236
/*! lock: schema lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1231
+#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1237
/*! lock: schema lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1232
+#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1238
/*!
* lock: table lock application thread time waiting for the table lock
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1233
+#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1239
/*!
* lock: table lock internal thread time waiting for the table lock
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1234
+#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1240
/*! lock: table read lock acquisitions */
-#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1235
+#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1241
/*! lock: table write lock acquisitions */
-#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1236
+#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1242
/*! lock: txn global lock application thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1237
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1243
/*! lock: txn global lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1238
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1244
/*! lock: txn global read lock acquisitions */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1239
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1245
/*! lock: txn global write lock acquisitions */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1240
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1246
/*! log: busy returns attempting to switch slots */
-#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1241
+#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1247
/*! log: force archive time sleeping (usecs) */
-#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1242
+#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1248
/*! log: log bytes of payload data */
-#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1243
+#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1249
/*! log: log bytes written */
-#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1244
+#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1250
/*! log: log files manually zero-filled */
-#define WT_STAT_CONN_LOG_ZERO_FILLS 1245
+#define WT_STAT_CONN_LOG_ZERO_FILLS 1251
/*! log: log flush operations */
-#define WT_STAT_CONN_LOG_FLUSH 1246
+#define WT_STAT_CONN_LOG_FLUSH 1252
/*! log: log force write operations */
-#define WT_STAT_CONN_LOG_FORCE_WRITE 1247
+#define WT_STAT_CONN_LOG_FORCE_WRITE 1253
/*! log: log force write operations skipped */
-#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1248
+#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1254
/*! log: log records compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1249
+#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1255
/*! log: log records not compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1250
+#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1256
/*! log: log records too small to compress */
-#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1251
+#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1257
/*! log: log release advances write LSN */
-#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1252
+#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1258
/*! log: log scan operations */
-#define WT_STAT_CONN_LOG_SCANS 1253
+#define WT_STAT_CONN_LOG_SCANS 1259
/*! log: log scan records requiring two reads */
-#define WT_STAT_CONN_LOG_SCAN_REREADS 1254
+#define WT_STAT_CONN_LOG_SCAN_REREADS 1260
/*! log: log server thread advances write LSN */
-#define WT_STAT_CONN_LOG_WRITE_LSN 1255
+#define WT_STAT_CONN_LOG_WRITE_LSN 1261
/*! log: log server thread write LSN walk skipped */
-#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1256
+#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1262
/*! log: log sync operations */
-#define WT_STAT_CONN_LOG_SYNC 1257
+#define WT_STAT_CONN_LOG_SYNC 1263
/*! log: log sync time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DURATION 1258
+#define WT_STAT_CONN_LOG_SYNC_DURATION 1264
/*! log: log sync_dir operations */
-#define WT_STAT_CONN_LOG_SYNC_DIR 1259
+#define WT_STAT_CONN_LOG_SYNC_DIR 1265
/*! log: log sync_dir time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1260
+#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1266
/*! log: log write operations */
-#define WT_STAT_CONN_LOG_WRITES 1261
+#define WT_STAT_CONN_LOG_WRITES 1267
/*! log: logging bytes consolidated */
-#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1262
+#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1268
/*! log: maximum log file size */
-#define WT_STAT_CONN_LOG_MAX_FILESIZE 1263
+#define WT_STAT_CONN_LOG_MAX_FILESIZE 1269
/*! log: number of pre-allocated log files to create */
-#define WT_STAT_CONN_LOG_PREALLOC_MAX 1264
+#define WT_STAT_CONN_LOG_PREALLOC_MAX 1270
/*! log: pre-allocated log files not ready and missed */
-#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1265
+#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1271
/*! log: pre-allocated log files prepared */
-#define WT_STAT_CONN_LOG_PREALLOC_FILES 1266
+#define WT_STAT_CONN_LOG_PREALLOC_FILES 1272
/*! log: pre-allocated log files used */
-#define WT_STAT_CONN_LOG_PREALLOC_USED 1267
+#define WT_STAT_CONN_LOG_PREALLOC_USED 1273
/*! log: records processed by log scan */
-#define WT_STAT_CONN_LOG_SCAN_RECORDS 1268
+#define WT_STAT_CONN_LOG_SCAN_RECORDS 1274
/*! log: slot close lost race */
-#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1269
+#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1275
/*! log: slot close unbuffered waits */
-#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1270
+#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1276
/*! log: slot closures */
-#define WT_STAT_CONN_LOG_SLOT_CLOSES 1271
+#define WT_STAT_CONN_LOG_SLOT_CLOSES 1277
/*! log: slot join atomic update races */
-#define WT_STAT_CONN_LOG_SLOT_RACES 1272
+#define WT_STAT_CONN_LOG_SLOT_RACES 1278
/*! log: slot join calls atomic updates raced */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1273
+#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1279
/*! log: slot join calls did not yield */
-#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1274
+#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1280
/*! log: slot join calls found active slot closed */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1275
+#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1281
/*! log: slot join calls slept */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1276
+#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1282
/*! log: slot join calls yielded */
-#define WT_STAT_CONN_LOG_SLOT_YIELD 1277
+#define WT_STAT_CONN_LOG_SLOT_YIELD 1283
/*! log: slot join found active slot closed */
-#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1278
+#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1284
/*! log: slot joins yield time (usecs) */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1279
+#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1285
/*! log: slot transitions unable to find free slot */
-#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1280
+#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1286
/*! log: slot unbuffered writes */
-#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1281
+#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1287
/*! log: total in-memory size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_MEM 1282
+#define WT_STAT_CONN_LOG_COMPRESS_MEM 1288
/*! log: total log buffer size */
-#define WT_STAT_CONN_LOG_BUFFER_SIZE 1283
+#define WT_STAT_CONN_LOG_BUFFER_SIZE 1289
/*! log: total size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_LEN 1284
+#define WT_STAT_CONN_LOG_COMPRESS_LEN 1290
/*! log: written slots coalesced */
-#define WT_STAT_CONN_LOG_SLOT_COALESCED 1285
+#define WT_STAT_CONN_LOG_SLOT_COALESCED 1291
/*! log: yields waiting for previous log file close */
-#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1286
+#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1292
/*! perf: file system read latency histogram (bucket 1) - 10-49ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1287
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1293
/*! perf: file system read latency histogram (bucket 2) - 50-99ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1288
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1294
/*! perf: file system read latency histogram (bucket 3) - 100-249ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1289
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1295
/*! perf: file system read latency histogram (bucket 4) - 250-499ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1290
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1296
/*! perf: file system read latency histogram (bucket 5) - 500-999ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1291
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1297
/*! perf: file system read latency histogram (bucket 6) - 1000ms+ */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1292
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1298
/*! perf: file system write latency histogram (bucket 1) - 10-49ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1293
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1299
/*! perf: file system write latency histogram (bucket 2) - 50-99ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1294
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1300
/*! perf: file system write latency histogram (bucket 3) - 100-249ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1295
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1301
/*! perf: file system write latency histogram (bucket 4) - 250-499ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1296
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1302
/*! perf: file system write latency histogram (bucket 5) - 500-999ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1297
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1303
/*! perf: file system write latency histogram (bucket 6) - 1000ms+ */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1298
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1304
/*! perf: operation read latency histogram (bucket 1) - 100-249us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1299
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1305
/*! perf: operation read latency histogram (bucket 2) - 250-499us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1300
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1306
/*! perf: operation read latency histogram (bucket 3) - 500-999us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1301
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1307
/*! perf: operation read latency histogram (bucket 4) - 1000-9999us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1302
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1308
/*! perf: operation read latency histogram (bucket 5) - 10000us+ */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1303
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1309
/*! perf: operation write latency histogram (bucket 1) - 100-249us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1304
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1310
/*! perf: operation write latency histogram (bucket 2) - 250-499us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1305
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1311
/*! perf: operation write latency histogram (bucket 3) - 500-999us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1306
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1312
/*! perf: operation write latency histogram (bucket 4) - 1000-9999us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1307
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1313
/*! perf: operation write latency histogram (bucket 5) - 10000us+ */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1308
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1314
/*! reconciliation: fast-path pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1309
+#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1315
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_CONN_REC_PAGES 1310
+#define WT_STAT_CONN_REC_PAGES 1316
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_CONN_REC_PAGES_EVICTION 1311
+#define WT_STAT_CONN_REC_PAGES_EVICTION 1317
/*! reconciliation: pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE 1312
+#define WT_STAT_CONN_REC_PAGE_DELETE 1318
/*! reconciliation: split bytes currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1313
+#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1319
/*! reconciliation: split objects currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1314
+#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1320
/*! session: open session count */
-#define WT_STAT_CONN_SESSION_OPEN 1315
+#define WT_STAT_CONN_SESSION_OPEN 1321
/*! session: session query timestamp calls */
-#define WT_STAT_CONN_SESSION_QUERY_TS 1316
+#define WT_STAT_CONN_SESSION_QUERY_TS 1322
/*! session: table alter failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1317
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1323
/*! session: table alter successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1318
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1324
/*! session: table alter unchanged and skipped */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1319
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1325
/*! session: table compact failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1320
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1326
/*! session: table compact successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1321
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1327
/*! session: table create failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1322
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1328
/*! session: table create successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1323
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1329
/*! session: table drop failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1324
+#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1330
/*! session: table drop successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1325
+#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1331
/*! session: table import failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1326
+#define WT_STAT_CONN_SESSION_TABLE_IMPORT_FAIL 1332
/*! session: table import successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1327
+#define WT_STAT_CONN_SESSION_TABLE_IMPORT_SUCCESS 1333
/*! session: table rebalance failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1328
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1334
/*! session: table rebalance successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1329
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1335
/*! session: table rename failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1330
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1336
/*! session: table rename successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1331
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1337
/*! session: table salvage failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1332
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1338
/*! session: table salvage successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1333
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1339
/*! session: table truncate failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1334
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1340
/*! session: table truncate successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1335
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1341
/*! session: table verify failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1336
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1342
/*! session: table verify successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1337
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1343
/*! thread-state: active filesystem fsync calls */
-#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1338
+#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1344
/*! thread-state: active filesystem read calls */
-#define WT_STAT_CONN_THREAD_READ_ACTIVE 1339
+#define WT_STAT_CONN_THREAD_READ_ACTIVE 1345
/*! thread-state: active filesystem write calls */
-#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1340
+#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1346
/*! thread-yield: application thread time evicting (usecs) */
-#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1341
+#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1347
/*! thread-yield: application thread time waiting for cache (usecs) */
-#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1342
+#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1348
/*!
* thread-yield: connection close blocked waiting for transaction state
* stabilization
*/
-#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1343
+#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1349
/*! thread-yield: connection close yielded for lsm manager shutdown */
-#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1344
+#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1350
/*! thread-yield: data handle lock yielded */
-#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1345
+#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1351
/*!
* thread-yield: get reference for page index and slot time sleeping
* (usecs)
*/
-#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1346
+#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1352
/*! thread-yield: log server sync yielded for log write */
-#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1347
+#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1353
/*! thread-yield: page access yielded due to prepare state change */
-#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1348
+#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1354
/*! thread-yield: page acquire busy blocked */
-#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1349
+#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1355
/*! thread-yield: page acquire eviction blocked */
-#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1350
+#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1356
/*! thread-yield: page acquire locked blocked */
-#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1351
+#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1357
/*! thread-yield: page acquire read blocked */
-#define WT_STAT_CONN_PAGE_READ_BLOCKED 1352
+#define WT_STAT_CONN_PAGE_READ_BLOCKED 1358
/*! thread-yield: page acquire time sleeping (usecs) */
-#define WT_STAT_CONN_PAGE_SLEEP 1353
+#define WT_STAT_CONN_PAGE_SLEEP 1359
/*!
* thread-yield: page delete rollback time sleeping for state change
* (usecs)
*/
-#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1354
+#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1360
/*! thread-yield: page reconciliation yielded due to child modification */
-#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1355
+#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1361
/*! transaction: Number of prepared updates */
-#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1356
+#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1362
/*! transaction: durable timestamp queue entries walked */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1357
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_WALKED 1363
/*! transaction: durable timestamp queue insert to empty */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1358
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_EMPTY 1364
/*! transaction: durable timestamp queue inserts to head */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1359
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_HEAD 1365
/*! transaction: durable timestamp queue inserts total */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1360
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_INSERTS 1366
/*! transaction: durable timestamp queue length */
-#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1361
+#define WT_STAT_CONN_TXN_DURABLE_QUEUE_LEN 1367
/*! transaction: prepared transactions */
-#define WT_STAT_CONN_TXN_PREPARE 1362
+#define WT_STAT_CONN_TXN_PREPARE 1368
/*! transaction: prepared transactions committed */
-#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1363
+#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1369
/*! transaction: prepared transactions currently active */
-#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1364
+#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1370
/*! transaction: prepared transactions rolled back */
-#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1365
+#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1371
/*! transaction: query timestamp calls */
-#define WT_STAT_CONN_TXN_QUERY_TS 1366
+#define WT_STAT_CONN_TXN_QUERY_TS 1372
/*! transaction: read timestamp queue entries walked */
-#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1367
+#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1373
/*! transaction: read timestamp queue insert to empty */
-#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1368
+#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1374
/*! transaction: read timestamp queue inserts to head */
-#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1369
+#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1375
/*! transaction: read timestamp queue inserts total */
-#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1370
+#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1376
/*! transaction: read timestamp queue length */
-#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1371
+#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1377
/*! transaction: rollback to stable calls */
-#define WT_STAT_CONN_TXN_RTS 1372
+#define WT_STAT_CONN_TXN_RTS 1378
/*! transaction: rollback to stable keys removed */
-#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1373
+#define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED 1379
/*! transaction: rollback to stable keys restored */
-#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1374
+#define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED 1380
/*! transaction: rollback to stable pages visited */
-#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1375
+#define WT_STAT_CONN_TXN_RTS_PAGES_VISITED 1381
/*! transaction: rollback to stable updates aborted */
-#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1376
+#define WT_STAT_CONN_TXN_RTS_UPD_ABORTED 1382
/*! transaction: rollback to stable updates removed from history store */
-#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1377
+#define WT_STAT_CONN_TXN_RTS_HS_REMOVED 1383
/*! transaction: set timestamp calls */
-#define WT_STAT_CONN_TXN_SET_TS 1378
+#define WT_STAT_CONN_TXN_SET_TS 1384
/*! transaction: set timestamp durable calls */
-#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1379
+#define WT_STAT_CONN_TXN_SET_TS_DURABLE 1385
/*! transaction: set timestamp durable updates */
-#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1380
+#define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD 1386
/*! transaction: set timestamp oldest calls */
-#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1381
+#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1387
/*! transaction: set timestamp oldest updates */
-#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1382
+#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1388
/*! transaction: set timestamp stable calls */
-#define WT_STAT_CONN_TXN_SET_TS_STABLE 1383
+#define WT_STAT_CONN_TXN_SET_TS_STABLE 1389
/*! transaction: set timestamp stable updates */
-#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1384
+#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1390
/*! transaction: transaction begins */
-#define WT_STAT_CONN_TXN_BEGIN 1385
+#define WT_STAT_CONN_TXN_BEGIN 1391
/*! transaction: transaction checkpoint currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1386
+#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1392
/*! transaction: transaction checkpoint generation */
-#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1387
+#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1393
/*!
* transaction: transaction checkpoint history store file duration
* (usecs)
*/
-#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1388
+#define WT_STAT_CONN_TXN_HS_CKPT_DURATION 1394
/*! transaction: transaction checkpoint max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1389
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1395
/*! transaction: transaction checkpoint min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1390
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1396
/*! transaction: transaction checkpoint most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1391
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1397
/*! transaction: transaction checkpoint prepare currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1392
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING 1398
/*! transaction: transaction checkpoint prepare max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1393
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX 1399
/*! transaction: transaction checkpoint prepare min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1394
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN 1400
/*! transaction: transaction checkpoint prepare most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1395
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT 1401
/*! transaction: transaction checkpoint prepare total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1396
+#define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL 1402
/*! transaction: transaction checkpoint scrub dirty target */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1397
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1403
/*! transaction: transaction checkpoint scrub time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1398
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1404
/*! transaction: transaction checkpoint total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1399
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1405
/*! transaction: transaction checkpoints */
-#define WT_STAT_CONN_TXN_CHECKPOINT 1400
+#define WT_STAT_CONN_TXN_CHECKPOINT 1406
/*!
* transaction: transaction checkpoints skipped because database was
* clean
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1401
+#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1407
/*! transaction: transaction failures due to history store */
-#define WT_STAT_CONN_TXN_FAIL_CACHE 1402
+#define WT_STAT_CONN_TXN_FAIL_CACHE 1408
/*!
* transaction: transaction fsync calls for checkpoint after allocating
* the transaction ID
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1403
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1409
/*!
* transaction: transaction fsync duration for checkpoint after
* allocating the transaction ID (usecs)
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1404
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1410
/*! transaction: transaction range of IDs currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_RANGE 1405
+#define WT_STAT_CONN_TXN_PINNED_RANGE 1411
/*! transaction: transaction range of IDs currently pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1406
+#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1412
/*! transaction: transaction range of timestamps currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1407
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1413
/*! transaction: transaction range of timestamps pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1408
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1414
/*!
* transaction: transaction range of timestamps pinned by the oldest
* active read timestamp
*/
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1409
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER 1415
/*!
* transaction: transaction range of timestamps pinned by the oldest
* timestamp
*/
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1410
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1416
/*! transaction: transaction read timestamp of the oldest active reader */
-#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1411
+#define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ 1417
/*! transaction: transaction sync calls */
-#define WT_STAT_CONN_TXN_SYNC 1412
+#define WT_STAT_CONN_TXN_SYNC 1418
/*! transaction: transactions committed */
-#define WT_STAT_CONN_TXN_COMMIT 1413
+#define WT_STAT_CONN_TXN_COMMIT 1419
/*! transaction: transactions rolled back */
-#define WT_STAT_CONN_TXN_ROLLBACK 1414
+#define WT_STAT_CONN_TXN_ROLLBACK 1420
/*! transaction: update conflicts */
-#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1415
+#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1421
/*!
* @}
diff --git a/src/third_party/wiredtiger/src/meta/meta_turtle.c b/src/third_party/wiredtiger/src/meta/meta_turtle.c
index e75994644a8..6b673a658e7 100644
--- a/src/third_party/wiredtiger/src/meta/meta_turtle.c
+++ b/src/third_party/wiredtiger/src/meta/meta_turtle.c
@@ -139,6 +139,38 @@ err:
}
/*
+ * __turtle_validate_version --
+ * Retrieve version numbers from the turtle file and validate them against our WiredTiger
+ * version.
+ */
+static int
+__turtle_validate_version(WT_SESSION_IMPL *session)
+{
+ WT_DECL_RET;
+ uint32_t major, minor;
+ char *version_string;
+
+ WT_WITH_TURTLE_LOCK(
+ session, ret = __wt_turtle_read(session, WT_METADATA_VERSION, &version_string));
+
+ if (ret != 0)
+ WT_ERR_MSG(session, ret, "Unable to read version string from turtle file");
+
+ if ((ret = sscanf(version_string, "major=%u,minor=%u", &major, &minor)) != 2)
+ WT_ERR_MSG(session, ret, "Unable to parse turtle file version string");
+
+ ret = 0;
+
+ if (major < WT_MIN_STARTUP_VERSION_MAJOR ||
+ (major == WT_MIN_STARTUP_VERSION_MAJOR && minor < WT_MIN_STARTUP_VERSION_MINOR))
+ WT_ERR_MSG(session, WT_ERROR, "WiredTiger version incompatible with current binary");
+
+err:
+ __wt_free(session, version_string);
+ return (ret);
+}
+
+/*
* __wt_turtle_exists --
* Return if the turtle file exists on startup.
*/
@@ -186,9 +218,9 @@ __wt_turtle_init(WT_SESSION_IMPL *session)
WT_DECL_RET;
char *metaconf, *unused_value;
bool exist_backup, exist_incr, exist_isrc, exist_turtle;
- bool load, loadTurtle;
+ bool load, loadTurtle, validate_turtle;
- load = loadTurtle = false;
+ load = loadTurtle = validate_turtle = false;
/*
* Discard any turtle setup file left-over from previous runs. This doesn't matter for
@@ -226,7 +258,13 @@ __wt_turtle_init(WT_SESSION_IMPL *session)
if (ret != 0) {
WT_RET(__wt_remove_if_exists(session, WT_METADATA_TURTLE, false));
loadTurtle = true;
- }
+ } else
+ /*
+ * Set a flag to specify that we should validate whether we can start up on the turtle
+ * file version seen. Return an error if we can't. Only check if we either didn't run
+ * salvage or if salvage didn't fail to read it.
+ */
+ validate_turtle = true;
/*
* We need to detect the difference between a source database that may have crashed with an
@@ -248,7 +286,8 @@ __wt_turtle_init(WT_SESSION_IMPL *session)
WT_RET(__wt_remove_if_exists(session, WT_METAFILE, false));
WT_RET(__wt_remove_if_exists(session, WT_METADATA_TURTLE, false));
load = true;
- }
+ } else if (validate_turtle)
+ WT_RET(__turtle_validate_version(session));
} else
load = true;
if (load) {
diff --git a/src/third_party/wiredtiger/src/os_posix/os_fallocate.c b/src/third_party/wiredtiger/src/os_posix/os_fallocate.c
index 80db174e62c..004d27c063c 100644
--- a/src/third_party/wiredtiger/src/os_posix/os_fallocate.c
+++ b/src/third_party/wiredtiger/src/os_posix/os_fallocate.c
@@ -14,6 +14,40 @@
#endif
/*
+ * WT_CALL_FUNCTION --
+ * Call the underlying fallocate function, wrapped in a macro so there's only a single copy of
+ * the mmap support code.
+ */
+#if defined(HAVE_FALLOCATE) || (defined(__linux__) && defined(SYS_fallocate)) || \
+ defined(HAVE_POSIX_FALLOCATE)
+#define WT_CALL_FUNCTION(op) \
+ do { \
+ WT_DECL_RET; \
+ WT_FILE_HANDLE_POSIX *pfh; \
+ WT_SESSION_IMPL *session; \
+ bool remap; \
+ \
+ session = (WT_SESSION_IMPL *)wt_session; \
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle; \
+ \
+ remap = (offset != pfh->mmap_size); \
+ if (remap) \
+ __wt_prepare_remap_resize_file(file_handle, wt_session); \
+ \
+ WT_SYSCALL_RETRY(op, ret); \
+ if (remap) { \
+ if (ret == 0) \
+ __wt_remap_resize_file(file_handle, wt_session); \
+ else { \
+ __wt_release_without_remap(file_handle); \
+ WT_RET_MSG(session, ret, "%s: fallocate:", file_handle->name); \
+ } \
+ } \
+ return (0); \
+ } while (0)
+#endif
+
+/*
* __posix_std_fallocate --
* Linux fallocate call.
*/
@@ -21,15 +55,7 @@ static int
__posix_std_fallocate(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_off_t offset)
{
#if defined(HAVE_FALLOCATE)
- WT_DECL_RET;
- WT_FILE_HANDLE_POSIX *pfh;
-
- WT_UNUSED(wt_session);
-
- pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
-
- WT_SYSCALL_RETRY(fallocate(pfh->fd, 0, (wt_off_t)0, offset), ret);
- return (ret);
+ WT_CALL_FUNCTION(fallocate(pfh->fd, 0, (wt_off_t)0, offset));
#else
WT_UNUSED(file_handle);
WT_UNUSED(offset);
@@ -46,20 +72,7 @@ static int
__posix_sys_fallocate(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_off_t offset)
{
#if defined(__linux__) && defined(SYS_fallocate)
- WT_DECL_RET;
- WT_FILE_HANDLE_POSIX *pfh;
-
- WT_UNUSED(wt_session);
-
- pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
-
- /*
- * Try the system call for fallocate even if the C library wrapper was not found. The system
- * call actually exists in the kernel for some Linux versions (RHEL 5.5), but not in the version
- * of the C library. This allows it to work everywhere the kernel supports it.
- */
- WT_SYSCALL_RETRY(syscall(SYS_fallocate, pfh->fd, 0, (wt_off_t)0, offset), ret);
- return (ret);
+ WT_CALL_FUNCTION(syscall(SYS_fallocate, pfh->fd, 0, (wt_off_t)0, offset));
#else
WT_UNUSED(file_handle);
WT_UNUSED(offset);
@@ -76,15 +89,7 @@ static int
__posix_posix_fallocate(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_off_t offset)
{
#if defined(HAVE_POSIX_FALLOCATE)
- WT_DECL_RET;
- WT_FILE_HANDLE_POSIX *pfh;
-
- WT_UNUSED(wt_session);
-
- pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
-
- WT_SYSCALL_RETRY(posix_fallocate(pfh->fd, (wt_off_t)0, offset), ret);
- return (ret);
+ WT_CALL_FUNCTION(posix_fallocate(pfh->fd, (wt_off_t)0, offset));
#else
WT_UNUSED(file_handle);
WT_UNUSED(offset);
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 2d0986ffab4..ba3a1803f5a 100644
--- a/src/third_party/wiredtiger/src/os_posix/os_fs.c
+++ b/src/third_party/wiredtiger/src/os_posix/os_fs.c
@@ -344,6 +344,11 @@ __posix_file_close(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session)
session = (WT_SESSION_IMPL *)wt_session;
pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+ __wt_verbose(session, WT_VERB_FILEOPS, "%s, file-close: fd=%d\n", file_handle->name, pfh->fd);
+
+ if (pfh->mmap_file_mappable && pfh->mmap_buf != NULL)
+ __wt_unmap_file(file_handle, wt_session);
+
/* Close the file handle. */
if (pfh->fd != -1) {
WT_SYSCALL(close(pfh->fd), ret);
@@ -406,6 +411,11 @@ __posix_file_read(
session = (WT_SESSION_IMPL *)wt_session;
pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+ __wt_verbose(session, WT_VERB_READ, "read: %s, fd=%d, offset=%" PRId64
+ ","
+ "len=%" WT_SIZET_FMT "\n",
+ file_handle->name, pfh->fd, offset, len);
+
/* Assert direct I/O is aligned and a multiple of the alignment. */
WT_ASSERT(
session, !pfh->direct_io || S2C(session)->buffer_alignment == 0 ||
@@ -420,10 +430,59 @@ __posix_file_read(
"%s: handle-read: pread: failed to read %" WT_SIZET_FMT " bytes at offset %" PRIuMAX,
file_handle->name, chunk, (uintmax_t)offset);
}
+ WT_STAT_CONN_INCRV(session, block_byte_read_syscall, len);
return (0);
}
/*
+ * __posix_file_read_mmap --
+ * Get the buffer from the mapped region.
+ */
+static int
+__posix_file_read_mmap(
+ WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_off_t offset, size_t len, void *buf)
+{
+ WT_FILE_HANDLE_POSIX *pfh;
+ WT_SESSION_IMPL *session;
+ bool mmap_success;
+
+ session = (WT_SESSION_IMPL *)wt_session;
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+
+ if (!pfh->mmap_file_mappable || pfh->mmap_resizing)
+ return (__posix_file_read(file_handle, wt_session, offset, len, buf));
+
+ __wt_verbose(session, WT_VERB_READ,
+ "read-mmap: %s, fd=%d, offset=%" PRId64
+ ","
+ "len=%" WT_SIZET_FMT ", mapped buffer: %p, mapped size = %" PRId64 "\n",
+ file_handle->name, pfh->fd, offset, len, (void *)pfh->mmap_buf, pfh->mmap_size);
+
+ /* Indicate that we might be using the mapped area */
+ (void)__wt_atomic_addv32(&pfh->mmap_usecount, 1);
+
+ /*
+ * If the I/O falls inside the mapped buffer, and the buffer is not being resized, we will use
+ * the mapped buffer.
+ */
+ mmap_success = false;
+ if (pfh->mmap_buf != NULL && pfh->mmap_size >= offset + (wt_off_t)len && !pfh->mmap_resizing) {
+ memcpy(buf, (void *)(pfh->mmap_buf + offset), len);
+ mmap_success = true;
+ WT_STAT_CONN_INCRV(session, block_byte_read_mmap, len);
+ }
+
+ /* Signal that we are done using the mapped buffer. */
+ (void)__wt_atomic_subv32(&pfh->mmap_usecount, 1);
+
+ if (mmap_success)
+ return (0);
+
+ /* We couldn't use mmap for some reason, so use the system call. */
+ return (__posix_file_read(file_handle, wt_session, offset, len, buf));
+}
+
+/*
* __posix_file_size --
* Get the size of a file in bytes, by file handle.
*/
@@ -497,14 +556,30 @@ __posix_file_truncate(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_of
WT_DECL_RET;
WT_FILE_HANDLE_POSIX *pfh;
WT_SESSION_IMPL *session;
+ bool remap;
session = (WT_SESSION_IMPL *)wt_session;
pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+ __wt_verbose(session, WT_VERB_FILEOPS, "%s, file-truncate: size=%" PRId64
+ ","
+ "mapped size=%" PRId64 "\n",
+ file_handle->name, len, pfh->mmap_size);
+
+ remap = (len != pfh->mmap_size);
+ if (remap)
+ __wt_prepare_remap_resize_file(file_handle, wt_session);
+
WT_SYSCALL_RETRY(ftruncate(pfh->fd, len), ret);
- if (ret == 0)
- return (0);
- WT_RET_MSG(session, ret, "%s: handle-truncate: ftruncate", file_handle->name);
+ if (remap) {
+ if (ret == 0)
+ __wt_remap_resize_file(file_handle, wt_session);
+ else {
+ __wt_release_without_remap(file_handle);
+ WT_RET_MSG(session, ret, "%s: handle-truncate: ftruncate", file_handle->name);
+ }
+ }
+ return (0);
}
#endif
@@ -525,6 +600,11 @@ __posix_file_write(
session = (WT_SESSION_IMPL *)wt_session;
pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+ __wt_verbose(session, WT_VERB_WRITE, "write: %s, fd=%d, offset=%" PRId64
+ ","
+ "len=%" WT_SIZET_FMT "\n",
+ file_handle->name, pfh->fd, offset, len);
+
/* Assert direct I/O is aligned and a multiple of the alignment. */
WT_ASSERT(
session, !pfh->direct_io || S2C(session)->buffer_alignment == 0 ||
@@ -540,6 +620,71 @@ __posix_file_write(
" bytes at offset %" PRIuMAX,
file_handle->name, chunk, (uintmax_t)offset);
}
+ WT_STAT_CONN_INCRV(session, block_byte_write_syscall, len);
+ return (0);
+}
+
+/*
+ * __posix_file_write_mmap --
+ * Write the buffer into the mapped region.
+ */
+static int
+__posix_file_write_mmap(
+ WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_off_t offset, size_t len, const void *buf)
+{
+ static int remap_opportunities;
+ WT_FILE_HANDLE_POSIX *pfh;
+ WT_SESSION_IMPL *session;
+ bool mmap_success;
+
+ session = (WT_SESSION_IMPL *)wt_session;
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+
+ __wt_verbose(session, WT_VERB_WRITE,
+ "write-mmap: %s, fd=%d, offset=%" PRId64
+ ","
+ "len=%" WT_SIZET_FMT ", mapped buffer: %p, mapped size = %" PRId64 ".\n",
+ file_handle->name, pfh->fd, offset, len, (void *)pfh->mmap_buf, pfh->mmap_size);
+
+ if (!pfh->mmap_file_mappable || pfh->mmap_resizing)
+ return (__posix_file_write(file_handle, wt_session, offset, len, buf));
+
+ /* Indicate that we might be using the mapped area */
+ (void)__wt_atomic_addv32(&pfh->mmap_usecount, 1);
+
+ /*
+ * If the I/O falls inside the mapped buffer, and the buffer is not being resized, we will use
+ * the mapped buffer.
+ */
+ mmap_success = false;
+ if (pfh->mmap_buf != NULL && pfh->mmap_size >= offset + (wt_off_t)len && !pfh->mmap_resizing) {
+ memcpy((void *)(pfh->mmap_buf + offset), buf, len);
+ mmap_success = true;
+ WT_STAT_CONN_INCRV(session, block_byte_write_mmap, len);
+ }
+
+ /* Signal that we are done using the mapped buffer. */
+ (void)__wt_atomic_subv32(&pfh->mmap_usecount, 1);
+
+ if (mmap_success)
+ return (0);
+
+ /* We couldn't use mmap for some reason, so use the system call. */
+ WT_RET(__posix_file_write(file_handle, wt_session, offset, len, buf));
+
+/*
+ * If we wrote the file via a system call, we might have extended its size. If the file is mapped,
+ * remap it with the new size. If we are actively extending the file, don't remap it on every write
+ * to avoid overhead.
+ */
+#define WT_REMAP_SKIP 10
+ if (pfh->mmap_file_mappable && !pfh->mmap_resizing && pfh->mmap_size < offset + (wt_off_t)len)
+ /* If we are actively extending the file, don't remap it on every write. */
+ if ((remap_opportunities++) % WT_REMAP_SKIP == 0) {
+ __wt_prepare_remap_resize_file(file_handle, wt_session);
+ __wt_remap_resize_file(file_handle, wt_session);
+ WT_STAT_CONN_INCRV(session, block_remap_file_write, 1);
+ }
return (0);
}
@@ -587,6 +732,7 @@ __posix_open_file(WT_FILE_SYSTEM *file_system, WT_SESSION *wt_session, const cha
WT_UNUSED(file_system);
+ file_handle = NULL;
*file_handlep = NULL;
session = (WT_SESSION_IMPL *)wt_session;
@@ -701,6 +847,19 @@ directory_open:
file_handle = (WT_FILE_HANDLE *)pfh;
WT_ERR(__wt_strdup(session, name, &file_handle->name));
+ if (conn->mmap_all) {
+ /*
+ * We are going to use mmap for I/O. So let's mmap the file on opening. If mmap fails, we
+ * will just mark the file as not mappable (inside the mapping function) and will use system
+ * calls for I/O on this file. We will not crash the database if mmap fails.
+ */
+ if (file_type == WT_FS_OPEN_FILE_TYPE_DATA || file_type == WT_FS_OPEN_FILE_TYPE_LOG) {
+ pfh->mmap_file_mappable = true;
+ pfh->mmap_prot = LF_ISSET(WT_FS_OPEN_READONLY) ? PROT_READ : PROT_READ | PROT_WRITE;
+ __wt_map_file(file_handle, wt_session);
+ }
+ }
+
file_handle->close = __posix_file_close;
#if defined(HAVE_POSIX_FADVISE)
/*
@@ -724,7 +883,12 @@ directory_open:
#endif
file_handle->fh_unmap = __wt_posix_unmap;
#endif
- file_handle->fh_read = __posix_file_read;
+
+ if (pfh->mmap_file_mappable)
+ file_handle->fh_read = __posix_file_read_mmap;
+ else
+ file_handle->fh_read = __posix_file_read;
+
file_handle->fh_size = __posix_file_size;
file_handle->fh_sync = __posix_file_sync;
#ifdef HAVE_SYNC_FILE_RANGE
@@ -733,7 +897,11 @@ directory_open:
#ifdef HAVE_FTRUNCATE
file_handle->fh_truncate = __posix_file_truncate;
#endif
- file_handle->fh_write = __posix_file_write;
+
+ if (pfh->mmap_file_mappable)
+ file_handle->fh_write = __posix_file_write_mmap;
+ else
+ file_handle->fh_write = __posix_file_write;
*file_handlep = file_handle;
@@ -789,3 +957,203 @@ __wt_os_posix(WT_SESSION_IMPL *session)
return (0);
}
+
+/*
+ * This LWN article (https://lwn.net/Articles/731706/) describes a potential problem when mmap is
+ * used over a direct-access (DAX) file system. If a new block is created and then the file is
+ * memory-mapped and the client writes to that block via mmap directly into storage (via DAX),
+ * the file system may not know that the data was written, so it may not flush the metadata
+ * prior to data being written. Therefore, the block may be reallocated or lost upon crash.
+ *
+ * WiredTiger currently disallows using the mmap option with the direct I/O option. We are relying
+ * on the user correctly specifying the direct I/O option if they mount a file system as DAX. If
+ * we did not wish to rely on the user supplying the correct flags, we have two options:
+ *
+ * (1) Use MAP_SYNC flag available on some versions of Linux. The downside is being Linux-specific
+ * and not extensively tested (this is a recent flag).
+ *
+ * (2) Always fsync when we unmap the file. In our implementation, if a session extends the file by
+ * writing a new block beyond the current file size, we always unmap the file and then re-map it
+ * before allowing any reads or writes via mmap into the new block. If we sync the file upon
+ * unmapping, we will be certain that the metadata is persistent.
+ */
+
+/*
+ * __wt_map_file --
+ * Map the virtual address region backed by a file into our address space. This is a "best
+ * effort" attempt. If mmap fails for any reason, we silently mark the file as not mappable and
+ * use system calls for it from then on. We do not report the error to the caller: the failure
+ * to mmap is not a show stopper, it is simply a lost performance-enhancement opportunity.
+ */
+void
+__wt_map_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session)
+{
+ WT_FILE_HANDLE_POSIX *pfh;
+ WT_SESSION_IMPL *session;
+ wt_off_t file_size;
+ void *previous_address;
+
+ session = (WT_SESSION_IMPL *)wt_session;
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+
+ WT_ASSERT(session, pfh->mmap_file_mappable);
+
+ if (__posix_file_size((WT_FILE_HANDLE *)pfh, wt_session, &file_size) != 0) {
+ __wt_err(session, __wt_errno(), "%s: __posix_file_size", file_handle->name);
+ pfh->mmap_file_mappable = false;
+ return;
+ }
+
+ if (file_size <= 0) {
+ if (pfh->mmap_buf != NULL)
+ __wt_unmap_file(file_handle, wt_session);
+ return;
+ }
+
+ /* If the buffer was previously mapped, try to remap it to the same address */
+ previous_address = pfh->mmap_buf;
+ if ((pfh->mmap_buf = (uint8_t *)mmap(previous_address, (size_t)file_size, pfh->mmap_prot,
+ MAP_SHARED | MAP_FILE, pfh->fd, 0)) == MAP_FAILED) {
+ pfh->mmap_size = 0;
+ pfh->mmap_buf = NULL;
+ pfh->mmap_file_mappable = false;
+ __wt_err(
+ session, errno, "Could not mmap file %s. Will use system calls.", file_handle->name);
+ return;
+ }
+
+ pfh->mmap_size = file_size;
+
+ __wt_verbose(session, WT_VERB_FILEOPS, "%s: file-mmap: fd=%d, size=%" PRId64
+ ", "
+ "mapped buffer=%p\n",
+ file_handle->name, pfh->fd, pfh->mmap_size, (void *)pfh->mmap_buf);
+}
+
+/*
+ * Here is the synchronization protocol to prevent race conditions when a session is remapping the
+ * file while others might be reading or writing it:
+ *
+ * Every time someone reads or writes from the mapped region, they increment the "use" count via
+ * cas. If someone wants to change the file size, they set the "stop" flag. If a session sees
+ * the stop flag, it does not read via mmap, but resorts to the regular syscall. The session
+ * that set the stop flag spin-waits until the "use" count goes to zero. Then it changes the
+ * file size and remaps the region without synchronization. Once all that is done, it resets the
+ * "stop" flag.
+ */
+
+/*
+ * __wt_prepare_remap_resize_file --
+ * Wait until all sessions using the mapped region for I/O are done, so it is safe to remap the
+ * file when it changes size.
+ */
+void
+__wt_prepare_remap_resize_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session)
+{
+ WT_FILE_HANDLE_POSIX *pfh;
+ WT_SESSION_IMPL *session;
+ uint64_t sleep_usec, yield_count;
+
+ session = (WT_SESSION_IMPL *)wt_session;
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+
+ sleep_usec = 10;
+ yield_count = 0;
+
+ if (!pfh->mmap_file_mappable)
+ return;
+
+ __wt_verbose(session, WT_VERB_FILEOPS, "%s, prepare-remap-file: buffer=%p\n", file_handle->name,
+ (void *)pfh->mmap_buf);
+
+wait:
+ /* Wait until it looks like no one is resizing the region */
+ while (pfh->mmap_resizing == 1)
+ __wt_spin_backoff(&yield_count, &sleep_usec);
+
+ if (__wt_atomic_casv32(&pfh->mmap_resizing, 0, 1) == false)
+ goto wait;
+
+ /*
+ * Wait for any sessions using the region for I/O to finish. Now that we have set the resizing
+ * flag, new sessions will not use the region, defaulting to system calls instead.
+ */
+ while (pfh->mmap_usecount > 0)
+ __wt_spin_backoff(&yield_count, &sleep_usec);
+}
+
+/*
+ * __wt_release_without_remap --
+ * Signal that we are releasing the mapped buffer we wanted to resize, but do not actually remap
+ * the file. If we set the resizing flag earlier, but the operation that tried to resize the
+ * file did not succeed, we will simply reset the flag without resizing.
+ */
+void
+__wt_release_without_remap(WT_FILE_HANDLE *file_handle)
+{
+
+ WT_FILE_HANDLE_POSIX *pfh;
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+
+ if (!pfh->mmap_file_mappable)
+ return;
+
+ /* Signal that we are done resizing the buffer */
+ (void)__wt_atomic_subv32(&pfh->mmap_resizing, 1);
+}
+
+/*
+ * __wt_remap_resize_file --
+ * After the file size has changed, unmap the file. Then remap it with the new size.
+ */
+void
+__wt_remap_resize_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session)
+{
+ WT_FILE_HANDLE_POSIX *pfh;
+ WT_SESSION_IMPL *session;
+
+ session = (WT_SESSION_IMPL *)wt_session;
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+
+ if (!pfh->mmap_file_mappable)
+ return;
+
+ __wt_verbose(session, WT_VERB_FILEOPS, "%s, remap-file: buffer=%p\n", file_handle->name,
+ (void *)pfh->mmap_buf);
+
+ if (pfh->mmap_buf != NULL)
+ __wt_unmap_file(file_handle, wt_session);
+
+ __wt_map_file(file_handle, wt_session);
+ WT_STAT_CONN_INCRV(session, block_remap_file_resize, 1);
+
+ /* Signal that we are done resizing the buffer */
+ (void)__wt_atomic_subv32(&pfh->mmap_resizing, 1);
+}
+
+/*
+ * __wt_unmap_file --
+ * Unmap the file.
+ */
+void
+__wt_unmap_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session)
+{
+ WT_DECL_RET;
+ WT_FILE_HANDLE_POSIX *pfh;
+ WT_SESSION_IMPL *session;
+
+ session = (WT_SESSION_IMPL *)wt_session;
+ pfh = (WT_FILE_HANDLE_POSIX *)file_handle;
+
+ __wt_verbose(session, WT_VERB_FILEOPS, "%s, file-unmap: buffer=%p, size=%" PRId64 "\n",
+ file_handle->name, (void *)pfh->mmap_buf, pfh->mmap_size);
+
+ WT_ASSERT(session, pfh->mmap_file_mappable);
+
+ ret = munmap(pfh->mmap_buf, (size_t)pfh->mmap_size);
+ pfh->mmap_buf = NULL;
+ pfh->mmap_size = 0;
+
+ if (ret != 0)
+ __wt_err(session, ret, "could not unmap file %s", file_handle->name);
+}
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c
index 8c065a5fc87..9d44e893d6d 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c
@@ -127,6 +127,10 @@ __rec_append_orig_value(
err:
__wt_scr_free(session, &tmp);
+ /* Free append when tombstone allocation fails */
+ if (ret != 0) {
+ __wt_free_update_list(session, &append);
+ }
return (ret);
}
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c
index eb78d49c924..d06692c71a2 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_write.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c
@@ -518,7 +518,7 @@ __rec_init(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags, WT_SALVAGE_COO
* checkpoints into account.
*/
if (WT_IS_METADATA(session->dhandle)) {
- WT_ORDERED_READ(ckpt_txn, txn_global->checkpoint_id);
+ WT_ORDERED_READ(ckpt_txn, txn_global->checkpoint_state.id);
if (ckpt_txn != WT_TXN_NONE && WT_TXNID_LT(ckpt_txn, r->last_running))
r->last_running = ckpt_txn;
}
diff --git a/src/third_party/wiredtiger/src/schema/schema_util.c b/src/third_party/wiredtiger/src/schema/schema_util.c
index 25ef013648c..c6e750bea9e 100644
--- a/src/third_party/wiredtiger/src/schema/schema_util.c
+++ b/src/third_party/wiredtiger/src/schema/schema_util.c
@@ -31,7 +31,7 @@ __schema_backup_check_int(WT_SESSION_IMPL *session, const char *name)
}
for (i = 0; backup_list[i] != NULL; ++i) {
if (strcmp(backup_list[i], name) == 0)
- return __wt_set_return(session, EBUSY);
+ return (__wt_set_return(session, EBUSY));
}
return (0);
diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c
index dd9210ceecb..6bd6b74de24 100644
--- a/src/third_party/wiredtiger/src/support/stat.c
+++ b/src/third_party/wiredtiger/src/support/stat.c
@@ -635,8 +635,14 @@ static const char *const __stats_connection_desc[] = {
"async: total compact calls", "async: total insert calls", "async: total remove calls",
"async: total search calls", "async: total update calls", "block-manager: blocks pre-loaded",
"block-manager: blocks read", "block-manager: blocks written", "block-manager: bytes read",
+ "block-manager: bytes read via memory map API", "block-manager: bytes read via system call API",
"block-manager: bytes written", "block-manager: bytes written for checkpoint",
- "block-manager: mapped blocks read", "block-manager: mapped bytes read",
+ "block-manager: bytes written via memory map API",
+ "block-manager: bytes written via system call API", "block-manager: mapped blocks read",
+ "block-manager: mapped bytes read",
+ "block-manager: number of times the file was remapped because it changed size via fallocate or "
+ "truncate",
+ "block-manager: number of times the region was remapped via write",
"cache: application threads page read from disk to cache count",
"cache: application threads page read from disk to cache time (usecs)",
"cache: application threads page write from cache to disk count",
@@ -973,10 +979,16 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
stats->block_read = 0;
stats->block_write = 0;
stats->block_byte_read = 0;
+ stats->block_byte_read_mmap = 0;
+ stats->block_byte_read_syscall = 0;
stats->block_byte_write = 0;
stats->block_byte_write_checkpoint = 0;
+ stats->block_byte_write_mmap = 0;
+ stats->block_byte_write_syscall = 0;
stats->block_map_read = 0;
stats->block_byte_map_read = 0;
+ stats->block_remap_file_resize = 0;
+ stats->block_remap_file_write = 0;
stats->cache_read_app_count = 0;
stats->cache_read_app_time = 0;
stats->cache_write_app_count = 0;
@@ -1405,10 +1417,16 @@ __wt_stat_connection_aggregate(WT_CONNECTION_STATS **from, WT_CONNECTION_STATS *
to->block_read += WT_STAT_READ(from, block_read);
to->block_write += WT_STAT_READ(from, block_write);
to->block_byte_read += WT_STAT_READ(from, block_byte_read);
+ to->block_byte_read_mmap += WT_STAT_READ(from, block_byte_read_mmap);
+ to->block_byte_read_syscall += WT_STAT_READ(from, block_byte_read_syscall);
to->block_byte_write += WT_STAT_READ(from, block_byte_write);
to->block_byte_write_checkpoint += WT_STAT_READ(from, block_byte_write_checkpoint);
+ to->block_byte_write_mmap += WT_STAT_READ(from, block_byte_write_mmap);
+ to->block_byte_write_syscall += WT_STAT_READ(from, block_byte_write_syscall);
to->block_map_read += WT_STAT_READ(from, block_map_read);
to->block_byte_map_read += WT_STAT_READ(from, block_byte_map_read);
+ to->block_remap_file_resize += WT_STAT_READ(from, block_remap_file_resize);
+ to->block_remap_file_write += WT_STAT_READ(from, block_remap_file_write);
to->cache_read_app_count += WT_STAT_READ(from, cache_read_app_count);
to->cache_read_app_time += WT_STAT_READ(from, cache_read_app_time);
to->cache_write_app_count += WT_STAT_READ(from, cache_write_app_count);
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 11e72474b3a..28f8dcac8ba 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
@@ -465,7 +465,7 @@ __rollback_abort_row_reconciled_page(
* let the reconciliation happens again on the page. Otherwise, the eviction may pick the
* already reconciled page to write to disk with newer updates.
*/
- __wt_page_only_modify_set(session, page);
+ __wt_page_modify_set(session, page);
} else if (mod->rec_result == WT_PM_REC_MULTIBLOCK) {
for (multi = mod->mod_multi, multi_entry = 0; multi_entry < mod->mod_multi_entries;
++multi, ++multi_entry)
@@ -479,7 +479,7 @@ __rollback_abort_row_reconciled_page(
* eviction may pick the already reconciled page to write to disk with newer
* updates.
*/
- __wt_page_only_modify_set(session, page);
+ __wt_page_modify_set(session, page);
}
}
diff --git a/src/third_party/wiredtiger/src/utilities/util_dump.c b/src/third_party/wiredtiger/src/utilities/util_dump.c
index 5bf06a01be3..e1aacbd3408 100755
--- a/src/third_party/wiredtiger/src/utilities/util_dump.c
+++ b/src/third_party/wiredtiger/src/utilities/util_dump.c
@@ -326,7 +326,7 @@ dump_projection(WT_SESSION *session, const char *config, WT_CURSOR *cursor, char
len = strlen(config) + strlen(cursor->value_format) + strlen(cursor->uri) + 20;
if ((newconfig = malloc(len)) == NULL)
- return util_err(session, errno, NULL);
+ return (util_err(session, errno, NULL));
*newconfigp = newconfig;
wt_api = session->connection->get_extension_api(session->connection);
if ((ret = wt_api->config_parser_open(wt_api, session, config, strlen(config), &parser)) != 0)
diff --git a/src/third_party/wiredtiger/test/csuite/Makefile.am b/src/third_party/wiredtiger/test/csuite/Makefile.am
index 94b8dc2bab6..89c02c290ad 100644
--- a/src/third_party/wiredtiger/test/csuite/Makefile.am
+++ b/src/third_party/wiredtiger/test/csuite/Makefile.am
@@ -57,7 +57,8 @@ all_TESTS += test_wt2246_col_append
test_wt2323_join_visibility_SOURCES = wt2323_join_visibility/main.c
noinst_PROGRAMS += test_wt2323_join_visibility
-all_TESTS += test_wt2323_join_visibility
+# Temporarily disabled
+# all_TESTS += test_wt2323_join_visibility
test_wt2535_insert_race_SOURCES = wt2535_insert_race/main.c
noinst_PROGRAMS += test_wt2535_insert_race
@@ -134,8 +135,7 @@ all_TESTS += test_wt4156_metadata_salvage
test_wt4333_handle_locks_SOURCES = wt4333_handle_locks/main.c
noinst_PROGRAMS += test_wt4333_handle_locks
-# Temporarily disabled
-# all_TESTS += test_wt4333_handle_locks
+all_TESTS += test_wt4333_handle_locks
test_wt4699_json_SOURCES = wt4699_json/main.c
noinst_PROGRAMS += test_wt4699_json
diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml
index 1db2b29cb94..f95d567105c 100755
--- a/src/third_party/wiredtiger/test/evergreen.yml
+++ b/src/third_party/wiredtiger/test/evergreen.yml
@@ -1113,20 +1113,21 @@ tasks:
${test_env_vars|} $(pwd)/test/csuite/test_wt2246_col_append 2>&1
- - name: csuite-wt2323-join-visibility-test
- tags: ["pull_request"]
- depends_on:
- - name: compile
- commands:
- - func: "fetch artifacts"
- - command: shell.exec
- params:
- working_dir: "wiredtiger/build_posix"
- script: |
- set -o errexit
- set -o verbose
+ # Temporarily disabled
+ # - name: csuite-wt2323-join-visibility-test
+ # tags: ["pull_request"]
+ # depends_on:
+ # - name: compile
+ # commands:
+ # - func: "fetch artifacts"
+ # - command: shell.exec
+ # params:
+ # working_dir: "wiredtiger/build_posix"
+ # script: |
+ # set -o errexit
+ # set -o verbose
- ${test_env_vars|} $(pwd)/test/csuite/test_wt2323_join_visibility 2>&1
+ # ${test_env_vars|} $(pwd)/test/csuite/test_wt2323_join_visibility 2>&1
- name: csuite-wt2535-insert-race-test
tags: ["pull_request"]
@@ -1203,20 +1204,20 @@ tasks:
${test_env_vars|} $(pwd)/test/csuite/test_wt3338_partial_update 2>&1
- # - name: csuite-wt4333-handle-locks-test
- # tags: ["pull_request"]
- # depends_on:
- # - name: compile
- # commands:
- # - func: "fetch artifacts"
- # - command: shell.exec
- # params:
- # working_dir: "wiredtiger/build_posix"
- # script: |
- # set -o errexit
- # set -o verbose
+ - name: csuite-wt4333-handle-locks-test
+ tags: ["pull_request"]
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/build_posix"
+ script: |
+ set -o errexit
+ set -o verbose
- # ${test_env_vars|} $(pwd)/test/csuite/test_wt4333_handle_locks 2>&1
+ ${test_env_vars|} $(pwd)/test/csuite/test_wt4333_handle_locks 2>&1
# End of csuite test tasks
diff --git a/src/third_party/wiredtiger/test/format/backup.c b/src/third_party/wiredtiger/test/format/backup.c
index 5954c41ba22..46b6e7b879c 100644
--- a/src/third_party/wiredtiger/test/format/backup.c
+++ b/src/third_party/wiredtiger/test/format/backup.c
@@ -164,15 +164,15 @@ again:
* There is something in the prev list not in the current list. Remove it, and continue
* - don't advance the current list.
*/
- testutil_check(
- __wt_snprintf(filename, sizeof(filename), "BACKUP/%s", prev->names[prevpos]));
+ testutil_check(__wt_snprintf(
+ filename, sizeof(filename), "%s/BACKUP/%s", g.home, prev->names[prevpos]));
#if 0
fprintf(stderr, "Removing file from backup: %s\n", filename);
#endif
- remove(filename);
- testutil_check(
- __wt_snprintf(filename, sizeof(filename), "BACKUP_COPY/%s", prev->names[prevpos]));
- remove(filename);
+ error_sys_check(unlink(filename));
+ testutil_check(__wt_snprintf(
+ filename, sizeof(filename), "%s/BACKUP_COPY/%s", g.home, prev->names[prevpos]));
+ error_sys_check(unlink(filename));
} else {
/*
* There is something in the current list not in the prev list. Walk past it in the
@@ -331,7 +331,7 @@ backup(void *arg)
u_int incremental, period;
const char *config, *key;
char cfg[512];
- bool block_full, full;
+ bool full, incr_full;
(void)(arg);
@@ -344,7 +344,7 @@ backup(void *arg)
* Perform a full backup at somewhere under 10 seconds (that way there's at least one), then at
* larger intervals, optionally do incremental backups between full backups.
*/
- block_full = full = true;
+ full = incr_full = true;
incremental = 0;
active_files_init(&active[0]);
active_files_init(&active[1]);
@@ -372,15 +372,15 @@ backup(void *arg)
* If we're doing a full backup as the start of the incremental backup, only send in an
* identifier for this one.
*/
- if (block_full) {
+ if (incr_full) {
active_files_free(&active[0]);
active_files_free(&active[1]);
active_now = &active[g.backup_id % 2];
active_prev = NULL;
testutil_check(__wt_snprintf(
cfg, sizeof(cfg), "incremental=(enabled,this_id=ID%" PRIu32 ")", g.backup_id++));
- block_full = false;
full = true;
+ incr_full = false;
} else {
/*
* 75% of the time, use the most recent source id. 25% of the time, use the id
@@ -408,23 +408,31 @@ backup(void *arg)
"incremental=(enabled,src_id=ID%u,this_id=ID%" PRIu32 ")", src_id,
g.backup_id++));
/* Restart a full incremental every once in a while. */
- block_full = mmrand(NULL, 1, 8) == 1;
full = false;
+ incr_full = mmrand(NULL, 1, 8) == 1;
}
config = cfg;
/* Free up the old active file list we're going to overwrite. */
active_files_free(active_now);
- } else if (g.c_backup_incr_flag == INCREMENTAL_LOG) {
- testutil_check(__wt_snprintf(cfg, sizeof(cfg), "target=(\"log:\")"));
- config = cfg;
- full = false;
+ } else if (g.c_logging && g.c_backup_incr_flag == INCREMENTAL_LOG) {
+ if (incr_full) {
+ config = NULL;
+ full = true;
+ incr_full = false;
+ } else {
+ testutil_check(__wt_snprintf(cfg, sizeof(cfg), "target=(\"log:\")"));
+ config = cfg;
+ full = false;
+ /* Restart a full incremental every once in a while. */
+ incr_full = mmrand(NULL, 1, 8) == 1;
+ }
} else {
config = NULL;
full = true;
}
/* If we're taking a full backup, create the backup directories. */
- if (full)
+ if (full || incremental == 0)
testutil_checkfmt(system(g.home_backup_init), "%s", "backup directory creation failed");
/*
@@ -472,7 +480,7 @@ backup(void *arg)
if (--incremental == 0) {
check_copy();
/* We ran recovery in the backup directory, so next time it must be a full backup. */
- block_full = full = true;
+ incr_full = full = true;
}
}
diff --git a/src/third_party/wiredtiger/test/format/config.c b/src/third_party/wiredtiger/test/format/config.c
index e367b09ae2f..77ee13ac735 100644
--- a/src/third_party/wiredtiger/test/format/config.c
+++ b/src/third_party/wiredtiger/test/format/config.c
@@ -942,6 +942,9 @@ config_reset(void)
{
CONFIG *cp;
+ if (!config_is_perm("isolation"))
+ g.c_isolation_flag = 0;
+
/* Clear temporary allocated configuration data. */
for (cp = c; cp->name != NULL; ++cp) {
F_CLR(cp, C_TEMP);
diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h
index 7eec635ec48..9c46472ab8c 100644
--- a/src/third_party/wiredtiger/test/format/config.h
+++ b/src/third_party/wiredtiger/test/format/config.h
@@ -203,9 +203,12 @@ static CONFIG c[] = {{"abort", "if timed run should drop core", /* 0% */
{"merge_max", "the maximum number of chunks to include in a merge operation", 0x0, 4, 20, 100,
&g.c_merge_max, NULL},
- {"mmap", "configure for mmap operations", /* 90% */
+ {"mmap", "configure for mmap operations (readonly)", /* 90% */
C_BOOL, 90, 0, 0, &g.c_mmap, NULL},
+ {"mmap_all", "configure for mmap operations (read and write)", /* 5% */
+ C_BOOL, 5, 0, 0, &g.c_mmap_all, NULL},
+
{"modify_pct", "percent operations that are value modifications", C_IGNORE, 0, 0, 100,
&g.c_modify_pct, NULL},
diff --git a/src/third_party/wiredtiger/test/format/format.h b/src/third_party/wiredtiger/test/format/format.h
index d846fc6f80f..e3aae5b1336 100644
--- a/src/third_party/wiredtiger/test/format/format.h
+++ b/src/third_party/wiredtiger/test/format/format.h
@@ -167,6 +167,7 @@ typedef struct {
uint32_t c_memory_page_max;
uint32_t c_merge_max;
uint32_t c_mmap;
+ uint32_t c_mmap_all;
uint32_t c_modify_pct;
uint32_t c_ops;
uint32_t c_prefix_compression;
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c
index f783dcb2e63..a01210b881a 100644
--- a/src/third_party/wiredtiger/test/format/wts.c
+++ b/src/third_party/wiredtiger/test/format/wts.c
@@ -198,7 +198,7 @@ wts_open(const char *home, bool set_api, WT_CONNECTION **connp)
CONFIG_APPEND(p, ",buffer_alignment=512");
#endif
- CONFIG_APPEND(p, ",mmap=%d", g.c_mmap ? 1 : 0);
+ CONFIG_APPEND(p, ",mmap=%d,mmap_all=%d", g.c_mmap ? 1 : 0, g.c_mmap_all ? 1 : 0);
if (g.c_direct_io)
CONFIG_APPEND(p, ",direct_io=(data)");
diff --git a/src/third_party/wiredtiger/test/suite/test_compat01.py b/src/third_party/wiredtiger/test/suite/test_compat01.py
index a3099b7ef9e..2d959dad23c 100644
--- a/src/third_party/wiredtiger/test/suite/test_compat01.py
+++ b/src/third_party/wiredtiger/test/suite/test_compat01.py
@@ -46,13 +46,15 @@ class test_compat01(wttest.WiredTigerTestCase, suite_subprocess):
# Log version 1 does not have the prevlsn record.
# Log version 2 introduced that record.
# Log version 3 continues to have that record.
+ # Log version 4 continues to have that record.
min_logv = 2
- latest_logv = 3
+ latest_logv = 4
# The API uses only the major and minor numbers but accepts with
# and without the patch number. Test both.
start_compat = [
- ('def', dict(compat1='none', logv1=3)),
+ ('def', dict(compat1='none', logv1=4)),
+ ('100', dict(compat1='10.0', logv1=4)),
('32', dict(compat1='3.2', logv1=3)),
('31', dict(compat1="3.1", logv1=3)),
('30', dict(compat1="3.0", logv1=2)),
@@ -62,7 +64,8 @@ class test_compat01(wttest.WiredTigerTestCase, suite_subprocess):
('old_patch', dict(compat1="1.8.1", logv1=1)),
]
restart_compat = [
- ('def2', dict(compat2='none', logv2=3)),
+ ('def2', dict(compat2='none', logv2=4)),
+ ('100_2', dict(compat2='10.0', logv2=4)),
('32_2', dict(compat2='3.2', logv2=3)),
('31_2', dict(compat2="3.1", logv2=3)),
('30_2', dict(compat2="3.0", logv2=2)),
diff --git a/src/third_party/wiredtiger/test/suite/test_compat02.py b/src/third_party/wiredtiger/test/suite/test_compat02.py
index 93e225239a6..1a39448ac65 100644
--- a/src/third_party/wiredtiger/test/suite/test_compat02.py
+++ b/src/third_party/wiredtiger/test/suite/test_compat02.py
@@ -46,6 +46,7 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess):
# Log version 1 does not have the prevlsn record.
# Log version 2 introduced that record.
# Log version 3 continues to have that record.
+ # Log version 4 continues to have that record.
min_logv = 2
# Test detecting a not-yet-existing log version. This should
@@ -58,7 +59,8 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess):
# required minimum just for testing of parsing.
compat_create = [
- ('def', dict(create_rel='none', log_create=3)),
+ ('def', dict(create_rel='none', log_create=4)),
+ ('100', dict(create_rel="10.0", log_create=4)),
('32', dict(create_rel="3.2", log_create=3)),
('31', dict(create_rel="3.1", log_create=3)),
('30', dict(create_rel="3.0", log_create=2)),
@@ -66,7 +68,8 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess):
]
compat_release = [
- ('def_rel', dict(rel='none', log_rel=3)),
+ ('def_rel', dict(rel='none', log_rel=4)),
+ ('100_rel', dict(rel="10.0", log_rel=4)),
('32_rel', dict(rel="3.2", log_rel=3)),
('31_rel', dict(rel="3.1", log_rel=3)),
('30_rel', dict(rel="3.0", log_rel=2)),
@@ -82,7 +85,8 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess):
# This rule exemption applies to the minimum verison check as well.
compat_max = [
('future_max', dict(max_req=future_rel, log_max=future_logv)),
- ('def_max', dict(max_req='none', log_max=3)),
+ ('def_max', dict(max_req='none', log_max=4)),
+ ('100_max', dict(max_req="10.0", log_max=4)),
('32_max', dict(max_req="3.2", log_max=3)),
('30_max', dict(max_req="3.0", log_max=2)),
('26_max', dict(max_req="2.6", log_max=1)),
@@ -92,7 +96,8 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess):
# Only the minimum version should exist below for each log version.
compat_min = [
('future_min', dict(min_req=future_rel, log_min=future_logv)),
- ('def_min', dict(min_req='none', log_min=3)),
+ ('def_min', dict(min_req='none', log_min=4)),
+ ('100_min', dict(min_req="10.0", log_min=4)),
('31_min', dict(min_req="3.1", log_min=3)),
('30_min', dict(min_req="3.0", log_min=2)),
('26_min', dict(min_req="2.6", log_min=1)),
diff --git a/src/third_party/wiredtiger/test/suite/test_compat03.py b/src/third_party/wiredtiger/test/suite/test_compat03.py
index e48066d65ed..36d07a25a37 100644
--- a/src/third_party/wiredtiger/test/suite/test_compat03.py
+++ b/src/third_party/wiredtiger/test/suite/test_compat03.py
@@ -46,6 +46,7 @@ class test_compat03(wttest.WiredTigerTestCase, suite_subprocess):
# Log version 1 does not have the prevlsn record.
# Log version 2 introduced that record.
# Log version 3 continues to have that record.
+ # Log version 4 continues to have that record.
min_logv = 2
# Test detecting a not-yet-existing log version. This should
@@ -57,8 +58,9 @@ class test_compat03(wttest.WiredTigerTestCase, suite_subprocess):
# and without the patch number. Test one on release and the
# required minimum just for testing of parsing.
compat_release = [
- ('def_rel', dict(rel='none', log_rel=3)),
('future_rel', dict(rel=future_rel, log_rel=future_logv)),
+ ('def_rel', dict(rel='none', log_rel=4)),
+ ('100_rel', dict(rel='10.0', log_rel=4)),
('32_rel', dict(rel="3.2", log_rel=3)),
('31_rel', dict(rel="3.1", log_rel=3)),
('30_rel', dict(rel="3.0", log_rel=2)),
@@ -73,8 +75,9 @@ class test_compat03(wttest.WiredTigerTestCase, suite_subprocess):
# number as the patch number will get removed in the conn_reconfig.c
# This rule exemption applies to the minimum verison check as well.
compat_max = [
- ('def_max', dict(max_req='none', log_max=3)),
('future_max', dict(max_req=future_rel, log_max=future_logv)),
+ ('def_max', dict(max_req='none', log_max=4)),
+ ('100_max', dict(max_req='10.0', log_max=4)),
('32_max', dict(max_req="3.2", log_max=3)),
('30_max', dict(max_req="3.0", log_max=2)),
('26_max', dict(max_req="2.6", log_max=1)),
@@ -83,8 +86,9 @@ class test_compat03(wttest.WiredTigerTestCase, suite_subprocess):
# Only the minimum version should exist below for each log version.
compat_min = [
- ('def_min', dict(min_req='none', log_min=3)),
('future_min', dict(min_req=future_rel, log_min=future_logv)),
+ ('def_min', dict(min_req='none', log_min=4)),
+ ('100_min', dict(min_req='10.0', log_min=4)),
('31_min', dict(min_req="3.1", log_min=3)),
('30_min', dict(min_req="3.0", log_min=2)),
('26_min', dict(min_req="2.6", log_min=1)),
diff --git a/src/third_party/wiredtiger/test/suite/test_compat04.py b/src/third_party/wiredtiger/test/suite/test_compat04.py
index 10e692ca5b1..ecd54458850 100644
--- a/src/third_party/wiredtiger/test/suite/test_compat04.py
+++ b/src/third_party/wiredtiger/test/suite/test_compat04.py
@@ -46,6 +46,7 @@ class test_compat04(wttest.WiredTigerTestCase, suite_subprocess):
# Log version 1 does not have the prevlsn record.
# Log version 2 introduced that record.
# Log version 3 continues to have that record.
+ # Log version 4 continues to have that record.
min_logv = 2
# The outline of this test is that we create the database at the
@@ -55,13 +56,15 @@ class test_compat04(wttest.WiredTigerTestCase, suite_subprocess):
# should be successful for all directions.
#
create_release = [
- ('def_rel', dict(create_rel='none', log_crrel=3)),
+ ('def_rel', dict(create_rel='none', log_crrel=4)),
+ ('100_rel', dict(create_rel='10.0', log_crrel=4)),
('32_rel', dict(create_rel='3.2', log_crrel=3)),
('31_rel', dict(create_rel="3.1", log_crrel=3)),
('30_rel', dict(create_rel="3.0", log_crrel=2)),
('26_rel', dict(create_rel="2.6", log_crrel=1)),
]
reconfig_release = [
+ ('100_rel', dict(rel="10.0", log_rel=4)),
('32_rel', dict(rel="3.2", log_rel=3)),
('31_rel', dict(rel="3.1", log_rel=3)),
('30_rel', dict(rel="3.0", log_rel=2)),
diff --git a/src/third_party/wiredtiger/test/suite/test_txn19.py b/src/third_party/wiredtiger/test/suite/test_txn19.py
index 417321bc97f..702515612d8 100755
--- a/src/third_party/wiredtiger/test/suite/test_txn19.py
+++ b/src/third_party/wiredtiger/test/suite/test_txn19.py
@@ -33,7 +33,7 @@
import fnmatch, os, shutil, time
from wtscenario import make_scenarios
from suite_subprocess import suite_subprocess
-import unittest, wiredtiger, wttest
+import wiredtiger, wttest
# This test uses an artificially small log file limit, and creates
# large records so two fit into a log file. This allows us to test
@@ -392,10 +392,8 @@ class test_txn19_meta(wttest.WiredTigerTestCase, suite_subprocess):
openable = [
"removal:WiredTiger.basecfg",
"removal:WiredTiger.turtle",
- "removal:WiredTigerHS.wt",
"truncate:WiredTiger",
"truncate:WiredTiger.basecfg",
- "truncate:WiredTigerHS.wt",
"truncate-middle:WiredTiger",
"truncate-middle:WiredTiger.basecfg",
"truncate-middle:WiredTiger.turtle",
@@ -403,14 +401,12 @@ class test_txn19_meta(wttest.WiredTigerTestCase, suite_subprocess):
"truncate-middle:WiredTigerHS.wt",
"zero:WiredTiger",
"zero:WiredTiger.basecfg",
- "zero:WiredTigerHS.wt",
"zero-end:WiredTiger",
"zero-end:WiredTiger.basecfg",
"zero-end:WiredTiger.turtle",
"zero-end:WiredTiger.wt",
"zero-end:WiredTigerHS.wt",
"garbage-begin:WiredTiger",
- "garbage-begin:WiredTigerHS.wt",
"garbage-middle:WiredTiger",
"garbage-middle:WiredTiger.basecfg",
"garbage-middle:WiredTiger.turtle",
@@ -427,10 +423,14 @@ class test_txn19_meta(wttest.WiredTigerTestCase, suite_subprocess):
not_salvageable = [
"removal:WiredTiger.turtle",
"removal:WiredTiger.wt",
+ "removal:WiredTigerHS.wt",
"truncate:WiredTiger.wt",
+ "truncate:WiredTigerHS.wt",
"zero:WiredTiger.wt",
+ "zero:WiredTigerHS.wt",
"garbage-begin:WiredTiger.basecfg",
"garbage-begin:WiredTiger.wt",
+ "garbage-begin:WiredTigerHS.wt",
"garbage-end:WiredTiger.basecfg",
]
@@ -476,7 +476,20 @@ class test_txn19_meta(wttest.WiredTigerTestCase, suite_subprocess):
key = self.kind + ':' + self.filename
return key not in self.not_salvageable
- @unittest.skip("Temporarily disabled")
+ def run_wt_and_check(self, dir, errfile, outfile, expect_fail):
+ self.runWt(['-h', dir, '-C', self.base_config, '-R', 'list'],
+ errfilename=errfile, outfilename=outfile, failure=expect_fail,
+ closeconn=False)
+
+ if expect_fail:
+ errmsg = 'WT_TRY_SALVAGE: database corruption detected'
+ if self.filename == 'WiredTigerHS.wt':
+ if self.kind == 'removal':
+ errmsg = 'handle-open'
+ elif self.kind == 'truncate':
+ errmsg = 'file size=0, alloc size=4096'
+ self.check_file_contains_one_of(errfile, [errmsg])
+
def test_corrupt_meta(self):
errfile = 'list.err'
outfile = 'list.out'
@@ -512,15 +525,7 @@ class test_txn19_meta(wttest.WiredTigerTestCase, suite_subprocess):
# us to observe the failure or success safely.
# Use -R to force recover=on, which is the default for
# wiredtiger_open, (wt utilities normally have recover=error)
-
- expect_fail = not self.is_openable()
- self.runWt(['-h', newdir, '-C', self.base_config, '-R', 'list'],
- errfilename=errfile, outfilename=outfile, failure=expect_fail,
- closeconn=False)
-
- if expect_fail:
- self.check_file_contains_one_of(errfile,
- ['WT_TRY_SALVAGE: database corruption detected'])
+ self.run_wt_and_check(newdir, errfile, outfile, not self.is_openable())
for salvagedir in [ newdir, newdir2 ]:
# Removing the 'WiredTiger.turtle' file has weird behavior:
@@ -542,10 +547,13 @@ class test_txn19_meta(wttest.WiredTigerTestCase, suite_subprocess):
# an error during the wiredtiger_open. But the nature of the
# messages produced during the error is variable by which case
# it is, and even variable from system to system.
- with self.expectedStdoutPattern('.'):
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.reopen_conn(salvagedir, salvage_config),
- '/.*/')
+ if self.filename == "WiredTigerHS.wt":
+ self.run_wt_and_check(salvagedir, salvagedir + '_' + errfile, salvagedir + '_' + outfile, True)
+ else:
+ with self.expectedStdoutPattern('.'):
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.reopen_conn(salvagedir, salvage_config),
+ '/.*/')
if __name__ == '__main__':
wttest.run()