From e317b88bb811da53f73ddb992417ae05ea8fe451 Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Fri, 8 Jun 2018 14:08:00 +1000 Subject: Import wiredtiger: d16557c82ca66ff220238299d0f7c9a182d1720e from branch mongodb-4.0 ref: c3eafe83e8..d16557c82c for: 4.1.1 WT-4076 format failure with cache stuck full of internal pages WT-4094 Understand variable throughput when running YCSB 50/50 workload WT-4098 Add new compatibility_max configuration option WT-4105 Optimize cache usage for update workload with history pinned WT-4110 test_timestamp_abort failed with missing records --- src/third_party/wiredtiger/dist/api_data.py | 4 + src/third_party/wiredtiger/dist/stat_data.py | 2 + src/third_party/wiredtiger/import.data | 2 +- src/third_party/wiredtiger/src/btree/bt_cursor.c | 55 ++- src/third_party/wiredtiger/src/btree/bt_read.c | 8 +- src/third_party/wiredtiger/src/cache/cache_las.c | 15 +- src/third_party/wiredtiger/src/config/config_def.c | 83 ++-- src/third_party/wiredtiger/src/conn/conn_log.c | 22 +- .../wiredtiger/src/conn/conn_reconfig.c | 97 +++- src/third_party/wiredtiger/src/evict/evict_page.c | 20 +- src/third_party/wiredtiger/src/include/btmem.h | 13 +- src/third_party/wiredtiger/src/include/btree.i | 20 + .../wiredtiger/src/include/connection.h | 9 +- src/third_party/wiredtiger/src/include/log.h | 2 - src/third_party/wiredtiger/src/include/stat.h | 2 + .../wiredtiger/src/include/wiredtiger.in | 499 +++++++++++---------- src/third_party/wiredtiger/src/log/log.c | 17 +- .../wiredtiger/src/reconcile/rec_write.c | 101 ++--- src/third_party/wiredtiger/src/support/stat.c | 8 + src/third_party/wiredtiger/src/txn/txn_ckpt.c | 21 +- src/third_party/wiredtiger/test/csuite/Makefile.am | 4 + .../test/csuite/wt4105_large_doc_small_upd/main.c | 165 +++++++ .../wiredtiger/test/suite/test_compat02.py | 81 ++-- .../wiredtiger/test/suite/test_compat03.py | 135 ++++++ 24 files changed, 929 insertions(+), 456 deletions(-) create mode 100644 src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c create mode 100644 src/third_party/wiredtiger/test/suite/test_compat03.py (limited to 'src/third_party') diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py index 679682b9adc..7d8a58c83bb 100644 --- a/src/third_party/wiredtiger/dist/api_data.py +++ b/src/third_party/wiredtiger/dist/api_data.py @@ -646,6 +646,10 @@ wiredtiger_open_compatibility_configuration = [ of the call.''', type='category', subconfig= compatibility_configuration_common + [ + Config('require_max', '', r''' + required maximum compatibility version of existing data files. + Must be greater than or equal to any release version set in the + \c release setting. Has no effect if creating the database.'''), Config('require_min', '', r''' required minimum compatibility version of existing data files. Must be less than or equal to any release version set in the diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index 2e8b1756913..32927b56625 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -274,7 +274,9 @@ connection_stats = [ CacheStat('cache_read_deleted', 'pages read into cache after truncate'), CacheStat('cache_read_deleted_prepared', 'pages read into cache after truncate in prepare state'), CacheStat('cache_read_lookaside', 'pages read into cache requiring lookaside entries'), + CacheStat('cache_read_lookaside_checkpoint', 'pages read into cache requiring lookaside for checkpoint'), CacheStat('cache_read_lookaside_delay', 'pages read into cache with skipped lookaside entries needed later'), + CacheStat('cache_read_lookaside_delay_checkpoint', 'pages read into cache with skipped lookaside entries needed later by checkpoint'), CacheStat('cache_read_lookaside_skipped', 'pages read into cache skipping older lookaside entries'), CacheStat('cache_read_overflow', 'overflow pages read into cache'), CacheStat('cache_write', 'pages written from cache'), diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index a2204e845f7..7a2886a3fe1 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -1,5 +1,5 @@ { - "commit": "c3eafe83e8e48632d8b221a86ded6b3d949da979", + "commit": "d16557c82ca66ff220238299d0f7c9a182d1720e", "github": "wiredtiger/wiredtiger.git", "vendor": "wiredtiger", "branch": "mongodb-4.0" diff --git a/src/third_party/wiredtiger/src/btree/bt_cursor.c b/src/third_party/wiredtiger/src/btree/bt_cursor.c index 341ad09d1c9..5ddddc5ff6e 100644 --- a/src/third_party/wiredtiger/src/btree/bt_cursor.c +++ b/src/third_party/wiredtiger/src/btree/bt_cursor.c @@ -1339,19 +1339,21 @@ done: switch (modify_type) { /* * __cursor_chain_exceeded -- - * Return if the update chain has exceeded the limit. Deleted or standard - * updates are anticipated to be sufficient to base the modify (although that's - * not guaranteed, they may not be visible or might abort before we read them). - * Also, this is not a hard limit, threads can race modifying updates. + * Return if the update chain has exceeded the limit. */ static bool __cursor_chain_exceeded(WT_CURSOR_BTREE *cbt) { + WT_CURSOR *cursor; WT_PAGE *page; + WT_SESSION_IMPL *session; WT_UPDATE *upd; + size_t upd_size; int i; + cursor = &cbt->iface; page = cbt->ref->page; + session = (WT_SESSION_IMPL *)cursor->session; upd = NULL; if (cbt->ins != NULL) @@ -1360,10 +1362,35 @@ __cursor_chain_exceeded(WT_CURSOR_BTREE *cbt) page->modify != NULL && page->modify->mod_row_update != NULL) upd = page->modify->mod_row_update[cbt->slot]; - for (i = 0; upd != NULL; ++i, upd = upd->next) { - if (WT_UPDATE_DATA_VALUE(upd)) - return (false); - if (i >= WT_MAX_MODIFY_UPDATE) + /* + * Step through the modify operations at the beginning of the chain. + * + * Deleted or standard updates are anticipated to be sufficient to base + * the modify (although that's not guaranteed: they may not be visible + * or might abort before we read them). Also, this is not a hard + * limit, threads can race modifying updates. + * + * If the total size in bytes of the updates exceeds some factor of the + * underlying value size (which we know because the cursor is + * positioned), create a new full copy of the value. This limits the + * cache pressure from creating full copies to that factor: with the + * default factor of 1, the total size in memory of a set of modify + * updates is limited to double the size of the modifies. + * + * Otherwise, limit the length of the update chain to a fixed size to + * bound the cost of rebuilding the value during reads. When history + * has to be maintained, creating extra copies of large documents + * multiplies cache pressure because the old ones cannot be freed, so + * allow the modify chain to grow. + */ + for (i = 0, upd_size = 0; + upd != NULL && upd->type == WT_UPDATE_MODIFY; + ++i, upd = upd->next) { + upd_size += WT_UPDATE_MEMSIZE(upd); + if (upd_size >= WT_MODIFY_MEM_FACTOR * cursor->value.size) + return (true); + if (__wt_txn_upd_visible_all(session, upd) && + i >= WT_MAX_MODIFY_UPDATE) return (true); } return (false); @@ -1393,6 +1420,10 @@ __wt_btcur_modify(WT_CURSOR_BTREE *cbt, WT_MODIFY *entries, int nentries) /* Save the cursor state. */ __cursor_state_save(cursor, &state); + if (session->txn.isolation == WT_ISO_READ_UNCOMMITTED) + WT_ERR_MSG(session, ENOTSUP, + "not supported in read-uncommitted transactions"); + /* * Get the current value and apply the modification to it, for a few * reasons: first, we set the updated value so the application can @@ -1404,11 +1435,9 @@ __wt_btcur_modify(WT_CURSOR_BTREE *cbt, WT_MODIFY *entries, int nentries) * fifth reason, verify we're not in a read-uncommitted transaction, * that implies a value that might disappear out from under us. */ - if (session->txn.isolation == WT_ISO_READ_UNCOMMITTED) - WT_ERR_MSG(session, ENOTSUP, - "not supported in read-uncommitted transactions"); - - WT_ERR(__wt_btcur_search(cbt)); + if (!F_ISSET(cursor, WT_CURSTD_KEY_INT) || + !F_ISSET(cursor, WT_CURSTD_VALUE_INT)) + WT_ERR(__wt_btcur_search(cbt)); orig = cursor->value.size; WT_ERR(__wt_modify_apply_api(session, cursor, entries, nentries)); new = cursor->value.size; diff --git a/src/third_party/wiredtiger/src/btree/bt_read.c b/src/third_party/wiredtiger/src/btree/bt_read.c index 0f6fac1c469..9e530be4f0e 100644 --- a/src/third_party/wiredtiger/src/btree/bt_read.c +++ b/src/third_party/wiredtiger/src/btree/bt_read.c @@ -144,6 +144,8 @@ __las_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref) __las_page_instantiate_verbose(session, las_pageid); WT_STAT_CONN_INCR(session, cache_read_lookaside); WT_STAT_DATA_INCR(session, cache_read_lookaside); + if (WT_SESSION_IS_CHECKPOINT(session)) + WT_STAT_CONN_INCR(session, cache_read_lookaside_checkpoint); __wt_btcur_init(session, &cbt); __wt_btcur_open(&cbt); @@ -501,8 +503,12 @@ skip_read: /* FALLTHROUGH */ case WT_REF_LIMBO: /* Instantiate updates from the database's lookaside table. */ - if (previous_state == WT_REF_LIMBO) + if (previous_state == WT_REF_LIMBO) { WT_STAT_CONN_INCR(session, cache_read_lookaside_delay); + if (WT_SESSION_IS_CHECKPOINT(session)) + WT_STAT_CONN_INCR(session, + cache_read_lookaside_delay_checkpoint); + } WT_ERR(__las_page_instantiate(session, ref)); ref->page_las->eviction_to_lookaside = false; diff --git a/src/third_party/wiredtiger/src/cache/cache_las.c b/src/third_party/wiredtiger/src/cache/cache_las.c index d34371f486b..64fe93806e9 100644 --- a/src/third_party/wiredtiger/src/cache/cache_las.c +++ b/src/third_party/wiredtiger/src/cache/cache_las.c @@ -421,7 +421,20 @@ __wt_las_page_skip_locked(WT_SESSION_IMPL *session, WT_REF *ref) if (!F_ISSET(txn, WT_TXN_HAS_SNAPSHOT)) return (false); - if (WT_TXNID_LE(txn->snap_min, ref->page_las->las_max_txn)) + /* + * If page image has the newest version of data and includes data newer + * than the reader's snapshot then we should read the history. + */ + if (ref->page_las->las_skew_newest && + WT_TXNID_LE(txn->snap_min, ref->page_las->las_max_txn)) + return (false); + + /* + * If page image has the oldest version of data and some of the history + * overlaps with the reader's snapshot then we should read the history. + */ + if (!ref->page_las->las_skew_newest && + WT_TXNID_LE(ref->page_las->las_min_txn, txn->snap_max)) return (false); if (!F_ISSET(txn, WT_TXN_HAS_TS_READ) && ref->page_las->las_skew_newest) diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c index 2db88d103ec..7dee7a5e756 100644 --- a/src/third_party/wiredtiger/src/config/config_def.c +++ b/src/third_party/wiredtiger/src/config/config_def.c @@ -751,6 +751,7 @@ static const WT_CONFIG_CHECK confchk_table_meta[] = { static const WT_CONFIG_CHECK confchk_wiredtiger_open_compatibility_subconfigs[] = { { "release", "string", NULL, NULL, NULL, 0 }, + { "require_max", "string", NULL, NULL, NULL, 0 }, { "require_min", "string", NULL, NULL, NULL, 0 }, { NULL, NULL, NULL, NULL, NULL, 0 } }; @@ -813,7 +814,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = { { "checkpoint_sync", "boolean", NULL, NULL, NULL, 0 }, { "compatibility", "category", NULL, NULL, - confchk_wiredtiger_open_compatibility_subconfigs, 2 }, + confchk_wiredtiger_open_compatibility_subconfigs, 3 }, { "config_base", "boolean", NULL, NULL, NULL, 0 }, { "create", "boolean", NULL, NULL, NULL, 0 }, { "direct_io", "list", @@ -916,7 +917,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = { { "checkpoint_sync", "boolean", NULL, NULL, NULL, 0 }, { "compatibility", "category", NULL, NULL, - confchk_wiredtiger_open_compatibility_subconfigs, 2 }, + confchk_wiredtiger_open_compatibility_subconfigs, 3 }, { "config_base", "boolean", NULL, NULL, NULL, 0 }, { "create", "boolean", NULL, NULL, NULL, 0 }, { "direct_io", "list", @@ -1020,7 +1021,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = { { "checkpoint_sync", "boolean", NULL, NULL, NULL, 0 }, { "compatibility", "category", NULL, NULL, - confchk_wiredtiger_open_compatibility_subconfigs, 2 }, + confchk_wiredtiger_open_compatibility_subconfigs, 3 }, { "direct_io", "list", NULL, "choices=[\"checkpoint\",\"data\",\"log\"]", NULL, 0 }, @@ -1118,7 +1119,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = { { "checkpoint_sync", "boolean", NULL, NULL, NULL, 0 }, { "compatibility", "category", NULL, NULL, - confchk_wiredtiger_open_compatibility_subconfigs, 2 }, + confchk_wiredtiger_open_compatibility_subconfigs, 3 }, { "direct_io", "list", NULL, "choices=[\"checkpoint\",\"data\",\"log\"]", NULL, 0 }, @@ -1490,21 +1491,22 @@ static const WT_CONFIG_ENTRY config_entries[] = { "async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1" ",builtin_extension_config=,cache_cursors=true,cache_overhead=8," "cache_size=100MB,checkpoint=(log_size=0,wait=0)," - "checkpoint_sync=true,compatibility=(release=,require_min=)," - "config_base=true,create=false,direct_io=,encryption=(keyid=," - "name=,secretkey=),error_prefix=,eviction=(threads_max=8," - "threads_min=1),eviction_checkpoint_target=5," - "eviction_dirty_target=5,eviction_dirty_trigger=20," - "eviction_target=80,eviction_trigger=95,exclusive=false," - "extensions=,file_extend=,file_manager=(close_handle_minimum=250," - "close_idle_time=30,close_scan_interval=10),hazard_max=1000," - "in_memory=false,log=(archive=true,compressor=,enabled=false," - "file_max=100MB,path=\".\",prealloc=true,recover=on," - "zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4)," - "lsm_merge=true,mmap=true,multiprocess=false," - "operation_tracking=(enabled=false,path=\".\"),readonly=false," - "session_max=100,session_scratch_max=2MB,session_table_cache=true" - ",shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB)," + "checkpoint_sync=true,compatibility=(release=,require_max=," + "require_min=),config_base=true,create=false,direct_io=," + "encryption=(keyid=,name=,secretkey=),error_prefix=," + "eviction=(threads_max=8,threads_min=1)," + "eviction_checkpoint_target=5,eviction_dirty_target=5," + "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" + ",exclusive=false,extensions=,file_extend=," + "file_manager=(close_handle_minimum=250,close_idle_time=30," + "close_scan_interval=10),hazard_max=1000,in_memory=false," + "log=(archive=true,compressor=,enabled=false,file_max=100MB," + "path=\".\",prealloc=true,recover=on,zero_fill=false)," + "lsm_manager=(merge=true,worker_thread_max=4),lsm_merge=true," + "mmap=true,multiprocess=false,operation_tracking=(enabled=false," + "path=\".\"),readonly=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," @@ -1516,21 +1518,22 @@ static const WT_CONFIG_ENTRY config_entries[] = { "async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1" ",builtin_extension_config=,cache_cursors=true,cache_overhead=8," "cache_size=100MB,checkpoint=(log_size=0,wait=0)," - "checkpoint_sync=true,compatibility=(release=,require_min=)," - "config_base=true,create=false,direct_io=,encryption=(keyid=," - "name=,secretkey=),error_prefix=,eviction=(threads_max=8," - "threads_min=1),eviction_checkpoint_target=5," - "eviction_dirty_target=5,eviction_dirty_trigger=20," - "eviction_target=80,eviction_trigger=95,exclusive=false," - "extensions=,file_extend=,file_manager=(close_handle_minimum=250," - "close_idle_time=30,close_scan_interval=10),hazard_max=1000," - "in_memory=false,log=(archive=true,compressor=,enabled=false," - "file_max=100MB,path=\".\",prealloc=true,recover=on," - "zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4)," - "lsm_merge=true,mmap=true,multiprocess=false," - "operation_tracking=(enabled=false,path=\".\"),readonly=false," - "session_max=100,session_scratch_max=2MB,session_table_cache=true" - ",shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB)," + "checkpoint_sync=true,compatibility=(release=,require_max=," + "require_min=),config_base=true,create=false,direct_io=," + "encryption=(keyid=,name=,secretkey=),error_prefix=," + "eviction=(threads_max=8,threads_min=1)," + "eviction_checkpoint_target=5,eviction_dirty_target=5," + "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" + ",exclusive=false,extensions=,file_extend=," + "file_manager=(close_handle_minimum=250,close_idle_time=30," + "close_scan_interval=10),hazard_max=1000,in_memory=false," + "log=(archive=true,compressor=,enabled=false,file_max=100MB," + "path=\".\",prealloc=true,recover=on,zero_fill=false)," + "lsm_manager=(merge=true,worker_thread_max=4),lsm_merge=true," + "mmap=true,multiprocess=false,operation_tracking=(enabled=false," + "path=\".\"),readonly=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," @@ -1542,9 +1545,9 @@ static const WT_CONFIG_ENTRY config_entries[] = { "async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1" ",builtin_extension_config=,cache_cursors=true,cache_overhead=8," "cache_size=100MB,checkpoint=(log_size=0,wait=0)," - "checkpoint_sync=true,compatibility=(release=,require_min=)," - "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=," - "eviction=(threads_max=8,threads_min=1)," + "checkpoint_sync=true,compatibility=(release=,require_max=," + "require_min=),direct_io=,encryption=(keyid=,name=,secretkey=)," + "error_prefix=,eviction=(threads_max=8,threads_min=1)," "eviction_checkpoint_target=5,eviction_dirty_target=5," "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" ",extensions=,file_extend=,file_manager=(close_handle_minimum=250" @@ -1566,9 +1569,9 @@ static const WT_CONFIG_ENTRY config_entries[] = { "async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1" ",builtin_extension_config=,cache_cursors=true,cache_overhead=8," "cache_size=100MB,checkpoint=(log_size=0,wait=0)," - "checkpoint_sync=true,compatibility=(release=,require_min=)," - "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=," - "eviction=(threads_max=8,threads_min=1)," + "checkpoint_sync=true,compatibility=(release=,require_max=," + "require_min=),direct_io=,encryption=(keyid=,name=,secretkey=)," + "error_prefix=,eviction=(threads_max=8,threads_min=1)," "eviction_checkpoint_target=5,eviction_dirty_target=5," "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95" ",extensions=,file_extend=,file_manager=(close_handle_minimum=250" diff --git a/src/third_party/wiredtiger/src/conn/conn_log.c b/src/third_party/wiredtiger/src/conn/conn_log.c index ab43c9f75da..0599d491ccb 100644 --- a/src/third_party/wiredtiger/src/conn/conn_log.c +++ b/src/third_party/wiredtiger/src/conn/conn_log.c @@ -125,15 +125,23 @@ __logmgr_version(WT_SESSION_IMPL *session, bool reconfig) } /* - * Set up the minimum log version required if needed. + * Set up the maximum and minimum log version required if needed. */ - if (conn->compat_req_major != WT_CONN_COMPAT_NONE) { - if (conn->compat_req_major < WT_LOG_V2_MAJOR) - conn->log_req_version = 1; - else if (conn->compat_req_minor == WT_LOG_V2_MINOR) - conn->log_req_version = 2; + 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 - conn->log_req_version = WT_LOG_VERSION; + 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 + conn->log_req_min = WT_LOG_VERSION; } /* diff --git a/src/third_party/wiredtiger/src/conn/conn_reconfig.c b/src/third_party/wiredtiger/src/conn/conn_reconfig.c index 45c5754baf0..ae774ae58c0 100644 --- a/src/third_party/wiredtiger/src/conn/conn_reconfig.c +++ b/src/third_party/wiredtiger/src/conn/conn_reconfig.c @@ -50,12 +50,17 @@ __wt_conn_compat_config( WT_CONFIG_ITEM cval; WT_CONNECTION_IMPL *conn; WT_DECL_RET; - uint16_t min_major, min_minor, rel_major, rel_minor; + uint16_t max_major, max_minor, min_major, min_minor; + uint16_t rel_major, rel_minor; char *value; bool txn_active; conn = S2C(session); value = NULL; + max_major = WT_CONN_COMPAT_NONE; + max_minor = WT_CONN_COMPAT_NONE; + min_major = WT_CONN_COMPAT_NONE; + min_minor = WT_CONN_COMPAT_NONE; WT_RET(__wt_config_gets(session, cfg, "compatibility.release", &cval)); if (cval.len == 0) { @@ -85,26 +90,43 @@ __wt_conn_compat_config( goto done; /* - * The minimum required version for existing files is only available - * on opening the connection, not reconfigure. + * The maximum and minimum required version for existing files + * is only available on opening the connection, not reconfigure. */ WT_RET(__wt_config_gets(session, cfg, "compatibility.require_min", &cval)); - if (cval.len == 0) { - min_major = WT_CONN_COMPAT_NONE; - min_minor = WT_CONN_COMPAT_NONE; - } else + if (cval.len != 0) WT_RET(__conn_compat_parse( session, &cval, &min_major, &min_minor)); + WT_RET(__wt_config_gets(session, + cfg, "compatibility.require_max", &cval)); + if (cval.len != 0) + WT_RET(__conn_compat_parse( + session, &cval, &max_major, &max_minor)); + + /* + * The maximum required must be greater than or equal to the + * compatibility release we're using now. This is on an open and we're + * checking the two against each other. We'll check against what was + * saved on a restart later. + */ + if (!reconfig && max_major != WT_CONN_COMPAT_NONE && + (max_major < rel_major || + (max_major == rel_major && max_minor < rel_minor))) + WT_RET_MSG(session, ENOTSUP, + "required max of %" PRIu16 ".%" PRIu16 + "cannot be smaller than compatibility release %" + PRIu16 ".%" PRIu16, + max_major, max_minor, rel_major, rel_minor); + /* * The minimum required must be less than or equal to the compatibility - * release if one was set. This is on an open and we're checking the + * release we're using now. This is on an open and we're checking the * two against each other. We'll check against what was saved on a * restart later. */ - if (!reconfig && F_ISSET(conn, WT_CONN_COMPATIBILITY) && - min_major != WT_CONN_COMPAT_NONE && + if (!reconfig && min_major != WT_CONN_COMPAT_NONE && (min_major > rel_major || (min_major == rel_major && min_minor > rel_minor))) WT_RET_MSG(session, ENOTSUP, @@ -113,19 +135,34 @@ __wt_conn_compat_config( PRIu16 ".%" PRIu16, min_major, min_minor, rel_major, rel_minor); + /* + * On a reconfigure, check the new release version against any + * required maximum version set on open. + */ + if (reconfig && conn->req_max_major != WT_CONN_COMPAT_NONE && + (conn->req_max_major < rel_major || + (conn->req_max_major == rel_major && + conn->req_max_minor < rel_minor))) + WT_RET_MSG(session, ENOTSUP, + "required max of %" PRIu16 ".%" PRIu16 + "cannot be smaller than requested compatibility release %" + PRIu16 ".%" PRIu16, + conn->req_max_major, conn->req_max_minor, + rel_major, rel_minor); + /* * On a reconfigure, check the new release version against any * required minimum version set on open. */ - if (reconfig && conn->compat_req_major != WT_CONN_COMPAT_NONE && - (conn->compat_req_major > rel_major || - (conn->compat_req_major == rel_major && - conn->compat_req_minor > rel_minor))) + if (reconfig && conn->req_min_major != WT_CONN_COMPAT_NONE && + (conn->req_min_major > rel_major || + (conn->req_min_major == rel_major && + conn->req_min_minor > rel_minor))) WT_RET_MSG(session, ENOTSUP, "required min of %" PRIu16 ".%" PRIu16 "cannot be larger than requested compatibility release %" PRIu16 ".%" PRIu16, - conn->compat_req_major, conn->compat_req_minor, + conn->req_min_major, conn->req_min_minor, rel_major, rel_minor); conn->compat_major = rel_major; @@ -141,10 +178,13 @@ __wt_conn_compat_config( WT_RET(__wt_metadata_turtle_rewrite(session)); /* - * The required minimum cannot be set via reconfigure and it is - * meaningless on a newly created database. We're done in those cases. + * The required maximum and minimum cannot be set via reconfigure and + * they are meaningless on a newly created database. We're done in + * those cases. */ - if (reconfig || conn->is_new || min_major == WT_CONN_COMPAT_NONE) + if (reconfig || conn->is_new || + (min_major == WT_CONN_COMPAT_NONE && + max_major == WT_CONN_COMPAT_NONE)) goto done; /* @@ -158,8 +198,17 @@ __wt_conn_compat_config( rel_major = (uint16_t)cval.val; WT_ERR(__wt_config_getones(session, value, "minor", &cval)); rel_minor = (uint16_t)cval.val; - if (min_major > rel_major || - (min_major == rel_major && min_minor > rel_minor)) + if (max_major != WT_CONN_COMPAT_NONE && + (max_major < rel_major || + (max_major == rel_major && max_minor < rel_minor))) + WT_ERR_MSG(session, ENOTSUP, + "required max of %" PRIu16 ".%" PRIu16 + "cannot be larger than saved release %" + PRIu16 ".%" PRIu16, + max_major, max_minor, rel_major, rel_minor); + if (min_major != WT_CONN_COMPAT_NONE && + (min_major > rel_major || + (min_major == rel_major && min_minor > rel_minor))) WT_ERR_MSG(session, ENOTSUP, "required min of %" PRIu16 ".%" PRIu16 "cannot be larger than saved release %" @@ -170,9 +219,11 @@ __wt_conn_compat_config( else WT_ERR(ret); - conn->compat_req_major = min_major; - conn->compat_req_minor = min_minor; -done: +done: conn->req_max_major = max_major; + conn->req_max_minor = max_minor; + conn->req_min_major = min_major; + conn->req_min_minor = min_minor; + err: if (value != NULL) __wt_free(session, value); diff --git a/src/third_party/wiredtiger/src/evict/evict_page.c b/src/third_party/wiredtiger/src/evict/evict_page.c index 93add0596a4..0daccdf5b1c 100644 --- a/src/third_party/wiredtiger/src/evict/evict_page.c +++ b/src/third_party/wiredtiger/src/evict/evict_page.c @@ -300,14 +300,16 @@ __evict_page_clean_update(WT_SESSION_IMPL *session, WT_REF *ref, bool closing) /* * Discard the page and update the reference structure. If evicting a - * WT_REF_LIMBO page, transition back to WT_REF_LOOKASIDE. Otherwise, - * a page with a disk address is an on-disk page, and a page without - * a disk address is a re-instantiated deleted page (for example, by - * searching), that was never subsequently written. + * WT_REF_LIMBO page with active history, transition back to + * WT_REF_LOOKASIDE. Otherwise, a page with a disk address is an + * on-disk page, and a page without a disk address is a re-instantiated + * deleted page (for example, by searching), that was never + * subsequently written. */ __wt_ref_out(session, ref); if (!closing && ref->page_las != NULL && - ref->page_las->eviction_to_lookaside) { + ref->page_las->eviction_to_lookaside && + __wt_page_las_active(session, ref)) { ref->page_las->eviction_to_lookaside = false; WT_PUBLISH(ref->state, WT_REF_LOOKASIDE); } else if (ref->addr == NULL) { @@ -453,6 +455,14 @@ __evict_child_check(WT_SESSION_IMPL *session, WT_REF *parent) if (__wt_page_del_active(session, child, true)) return (EBUSY); break; + case WT_REF_LOOKASIDE: + /* + * If the lookaside history is obsolete, the reference + * can be ignored. + */ + if (__wt_page_las_active(session, child)) + return (EBUSY); + break; default: return (EBUSY); } diff --git a/src/third_party/wiredtiger/src/include/btmem.h b/src/third_party/wiredtiger/src/include/btmem.h index 9752737ef41..33e382feba2 100644 --- a/src/third_party/wiredtiger/src/include/btmem.h +++ b/src/third_party/wiredtiger/src/include/btmem.h @@ -235,6 +235,7 @@ struct __wt_ovfl_reuse { struct __wt_page_lookaside { uint64_t las_pageid; /* Page ID in lookaside */ uint64_t las_max_txn; /* Max transaction ID in lookaside */ + uint64_t las_min_txn; /* Min transaction ID in lookaside */ WT_DECL_TIMESTAMP(min_timestamp)/* Min timestamp in lookaside */ /* Max timestamp on page */ WT_DECL_TIMESTAMP(onpage_timestamp) @@ -1070,11 +1071,19 @@ struct __wt_update { /* * WT_MAX_MODIFY_UPDATE -- - * Limit update chains to a small value to avoid penalizing reads and - * permit truncation. + * Limit update chains value to avoid penalizing reads and + * permit truncation. Having a smaller value will penalize the cases + * when history has to be maintained, resulting in multiplying cache + * pressure. */ #define WT_MAX_MODIFY_UPDATE 10 +/* + * WT_MODIFY_MEM_FACTOR -- + * Limit update chains to a factor of the base document size. + */ +#define WT_MODIFY_MEM_FACTOR 1 + /* * WT_INSERT -- * diff --git a/src/third_party/wiredtiger/src/include/btree.i b/src/third_party/wiredtiger/src/include/btree.i index a706ff8aa5c..81c166eb0e4 100644 --- a/src/third_party/wiredtiger/src/include/btree.i +++ b/src/third_party/wiredtiger/src/include/btree.i @@ -1179,6 +1179,26 @@ __wt_page_del_active( page_del->txnid, WT_TIMESTAMP_NULL(&page_del->timestamp))); } +/* + * __wt_page_las_active -- + * Return if lookaside data for a page is still required. + */ +static inline bool +__wt_page_las_active(WT_SESSION_IMPL *session, WT_REF *ref) +{ + WT_PAGE_LOOKASIDE *page_las; + + if ((page_las = ref->page_las) == NULL) + return (false); + if (page_las->invalid || !ref->page_las->las_skew_newest) + return (true); + if (__wt_txn_visible_all(session, page_las->las_max_txn, + WT_TIMESTAMP_NULL(&page_las->onpage_timestamp))) + return (false); + + return (true); +} + /* * __wt_btree_can_evict_dirty -- * Check whether eviction of dirty pages or splits are permitted in the diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h index 77632646843..d0bebe8da5d 100644 --- a/src/third_party/wiredtiger/src/include/connection.h +++ b/src/third_party/wiredtiger/src/include/connection.h @@ -178,8 +178,10 @@ struct __wt_connection_impl { uint16_t compat_major; /* Compatibility major version */ uint16_t compat_minor; /* Compatibility minor version */ #define WT_CONN_COMPAT_NONE UINT16_MAX - uint16_t compat_req_major; /* Compatibility required major */ - uint16_t compat_req_minor; /* Compatibility required minor */ + uint16_t req_max_major; /* Compatibility maximum major */ + uint16_t req_max_minor; /* Compatibility maximum minor */ + uint16_t req_min_major; /* Compatibility minimum major */ + uint16_t req_min_minor; /* Compatibility minimum minor */ WT_EXTENSION_API extension_api; /* Extension API */ @@ -341,7 +343,8 @@ struct __wt_connection_impl { wt_off_t log_file_max; /* Log file max size */ const char *log_path; /* Logging path format */ uint32_t log_prealloc; /* Log file pre-allocation */ - uint16_t log_req_version;/* Required log version */ + uint16_t log_req_max; /* Max required log version */ + uint16_t log_req_min; /* Min required log version */ uint32_t txn_logsync; /* Log sync configuration */ WT_SESSION_IMPL *meta_ckpt_session;/* Metadata checkpoint session */ diff --git a/src/third_party/wiredtiger/src/include/log.h b/src/third_party/wiredtiger/src/include/log.h index 3bbba1311d1..0605c458673 100644 --- a/src/third_party/wiredtiger/src/include/log.h +++ b/src/third_party/wiredtiger/src/include/log.h @@ -368,8 +368,6 @@ struct __wt_log_desc { /* * WiredTiger release version where log format version changed. - * We only have to check the major version for now. It is minor - * version 0 once release numbers move on. */ #define WT_LOG_V2_MAJOR 3 #define WT_LOG_V2_MINOR 0 diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index 1aa00902359..a4e28e59826 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -422,8 +422,10 @@ struct __wt_connection_stats { int64_t cache_read_deleted; int64_t cache_read_deleted_prepared; int64_t cache_read_lookaside; + int64_t cache_read_lookaside_checkpoint; int64_t cache_read_lookaside_skipped; int64_t cache_read_lookaside_delay; + int64_t cache_read_lookaside_delay_checkpoint; int64_t cache_pages_requested; int64_t cache_eviction_pages_seen; int64_t cache_eviction_fail; diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index f814aadbd9c..9e0b5d4f02c 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -2740,6 +2740,10 @@ struct __wt_connection { * below.} * @config{    release, compatibility release * version string., a string; default empty.} + * @config{    require_max, required maximum compatibility + * version of existing data files. Must be greater than or equal to any release + * version set in the \c release setting. Has no effect if creating the + * database., a string; default empty.} * @config{    require_min, required minimum compatibility * version of existing data files. Must be less than or equal to any release * version set in the \c release setting. Has no effect if creating the @@ -5114,551 +5118,558 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED 1107 /*! cache: pages read into cache requiring lookaside entries */ #define WT_STAT_CONN_CACHE_READ_LOOKASIDE 1108 +/*! cache: pages read into cache requiring lookaside for checkpoint */ +#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_CHECKPOINT 1109 /*! cache: pages read into cache skipping older lookaside entries */ -#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_SKIPPED 1109 +#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_SKIPPED 1110 /*! * cache: pages read into cache with skipped lookaside entries needed * later */ -#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_DELAY 1110 +#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_DELAY 1111 +/*! + * cache: pages read into cache with skipped lookaside entries needed + * later by checkpoint + */ +#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_DELAY_CHECKPOINT 1112 /*! cache: pages requested from the cache */ -#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1111 +#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1113 /*! cache: pages seen by eviction walk */ -#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1112 +#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1114 /*! cache: pages selected for eviction unable to be evicted */ -#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1113 +#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1115 /*! cache: pages walked for eviction */ -#define WT_STAT_CONN_CACHE_EVICTION_WALK 1114 +#define WT_STAT_CONN_CACHE_EVICTION_WALK 1116 /*! cache: pages written from cache */ -#define WT_STAT_CONN_CACHE_WRITE 1115 +#define WT_STAT_CONN_CACHE_WRITE 1117 /*! cache: pages written requiring in-memory restoration */ -#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1116 +#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1118 /*! cache: percentage overhead */ -#define WT_STAT_CONN_CACHE_OVERHEAD 1117 +#define WT_STAT_CONN_CACHE_OVERHEAD 1119 /*! cache: tracked bytes belonging to internal pages in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1118 +#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1120 /*! cache: tracked bytes belonging to leaf pages in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_LEAF 1119 +#define WT_STAT_CONN_CACHE_BYTES_LEAF 1121 /*! cache: tracked dirty bytes in the cache */ -#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1120 +#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1122 /*! cache: tracked dirty pages in the cache */ -#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1121 +#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1123 /*! cache: unmodified pages evicted */ -#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1122 +#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1124 /*! connection: auto adjusting condition resets */ -#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1123 +#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1125 /*! connection: auto adjusting condition wait calls */ -#define WT_STAT_CONN_COND_AUTO_WAIT 1124 +#define WT_STAT_CONN_COND_AUTO_WAIT 1126 /*! connection: detected system time went backwards */ -#define WT_STAT_CONN_TIME_TRAVEL 1125 +#define WT_STAT_CONN_TIME_TRAVEL 1127 /*! connection: files currently open */ -#define WT_STAT_CONN_FILE_OPEN 1126 +#define WT_STAT_CONN_FILE_OPEN 1128 /*! connection: memory allocations */ -#define WT_STAT_CONN_MEMORY_ALLOCATION 1127 +#define WT_STAT_CONN_MEMORY_ALLOCATION 1129 /*! connection: memory frees */ -#define WT_STAT_CONN_MEMORY_FREE 1128 +#define WT_STAT_CONN_MEMORY_FREE 1130 /*! connection: memory re-allocations */ -#define WT_STAT_CONN_MEMORY_GROW 1129 +#define WT_STAT_CONN_MEMORY_GROW 1131 /*! connection: pthread mutex condition wait calls */ -#define WT_STAT_CONN_COND_WAIT 1130 +#define WT_STAT_CONN_COND_WAIT 1132 /*! connection: pthread mutex shared lock read-lock calls */ -#define WT_STAT_CONN_RWLOCK_READ 1131 +#define WT_STAT_CONN_RWLOCK_READ 1133 /*! connection: pthread mutex shared lock write-lock calls */ -#define WT_STAT_CONN_RWLOCK_WRITE 1132 +#define WT_STAT_CONN_RWLOCK_WRITE 1134 /*! connection: total fsync I/Os */ -#define WT_STAT_CONN_FSYNC_IO 1133 +#define WT_STAT_CONN_FSYNC_IO 1135 /*! connection: total read I/Os */ -#define WT_STAT_CONN_READ_IO 1134 +#define WT_STAT_CONN_READ_IO 1136 /*! connection: total write I/Os */ -#define WT_STAT_CONN_WRITE_IO 1135 +#define WT_STAT_CONN_WRITE_IO 1137 /*! cursor: cursor create calls */ -#define WT_STAT_CONN_CURSOR_CREATE 1136 +#define WT_STAT_CONN_CURSOR_CREATE 1138 /*! cursor: cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT 1137 +#define WT_STAT_CONN_CURSOR_INSERT 1139 /*! cursor: cursor modify calls */ -#define WT_STAT_CONN_CURSOR_MODIFY 1138 +#define WT_STAT_CONN_CURSOR_MODIFY 1140 /*! cursor: cursor next calls */ -#define WT_STAT_CONN_CURSOR_NEXT 1139 +#define WT_STAT_CONN_CURSOR_NEXT 1141 /*! cursor: cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV 1140 +#define WT_STAT_CONN_CURSOR_PREV 1142 /*! cursor: cursor remove calls */ -#define WT_STAT_CONN_CURSOR_REMOVE 1141 +#define WT_STAT_CONN_CURSOR_REMOVE 1143 /*! cursor: cursor reserve calls */ -#define WT_STAT_CONN_CURSOR_RESERVE 1142 +#define WT_STAT_CONN_CURSOR_RESERVE 1144 /*! cursor: cursor reset calls */ -#define WT_STAT_CONN_CURSOR_RESET 1143 +#define WT_STAT_CONN_CURSOR_RESET 1145 /*! cursor: cursor restarted searches */ -#define WT_STAT_CONN_CURSOR_RESTART 1144 +#define WT_STAT_CONN_CURSOR_RESTART 1146 /*! cursor: cursor search calls */ -#define WT_STAT_CONN_CURSOR_SEARCH 1145 +#define WT_STAT_CONN_CURSOR_SEARCH 1147 /*! cursor: cursor search near calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1146 +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1148 /*! cursor: cursor sweep buckets */ -#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1147 +#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1149 /*! cursor: cursor sweep cursors closed */ -#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1148 +#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1150 /*! cursor: cursor sweep cursors examined */ -#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1149 +#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1151 /*! cursor: cursor sweeps */ -#define WT_STAT_CONN_CURSOR_SWEEP 1150 +#define WT_STAT_CONN_CURSOR_SWEEP 1152 /*! cursor: cursor update calls */ -#define WT_STAT_CONN_CURSOR_UPDATE 1151 +#define WT_STAT_CONN_CURSOR_UPDATE 1153 /*! cursor: cursors cached on close */ -#define WT_STAT_CONN_CURSOR_CACHE 1152 +#define WT_STAT_CONN_CURSOR_CACHE 1154 /*! cursor: cursors reused from cache */ -#define WT_STAT_CONN_CURSOR_REOPEN 1153 +#define WT_STAT_CONN_CURSOR_REOPEN 1155 /*! cursor: truncate calls */ -#define WT_STAT_CONN_CURSOR_TRUNCATE 1154 +#define WT_STAT_CONN_CURSOR_TRUNCATE 1156 /*! data-handle: connection data handles currently active */ -#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1155 +#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1157 /*! data-handle: connection sweep candidate became referenced */ -#define WT_STAT_CONN_DH_SWEEP_REF 1156 +#define WT_STAT_CONN_DH_SWEEP_REF 1158 /*! data-handle: connection sweep dhandles closed */ -#define WT_STAT_CONN_DH_SWEEP_CLOSE 1157 +#define WT_STAT_CONN_DH_SWEEP_CLOSE 1159 /*! data-handle: connection sweep dhandles removed from hash list */ -#define WT_STAT_CONN_DH_SWEEP_REMOVE 1158 +#define WT_STAT_CONN_DH_SWEEP_REMOVE 1160 /*! data-handle: connection sweep time-of-death sets */ -#define WT_STAT_CONN_DH_SWEEP_TOD 1159 +#define WT_STAT_CONN_DH_SWEEP_TOD 1161 /*! data-handle: connection sweeps */ -#define WT_STAT_CONN_DH_SWEEPS 1160 +#define WT_STAT_CONN_DH_SWEEPS 1162 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1161 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1163 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1162 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1164 /*! lock: checkpoint lock acquisitions */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1163 +#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1165 /*! lock: checkpoint lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1164 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1166 /*! lock: checkpoint lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1165 +#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1167 /*! * lock: commit timestamp queue lock application thread time waiting for * the dhandle lock (usecs) */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_APPLICATION 1166 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_APPLICATION 1168 /*! * lock: commit timestamp queue lock internal thread time waiting for the * dhandle lock (usecs) */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_INTERNAL 1167 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_INTERNAL 1169 /*! lock: commit timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_READ_COUNT 1168 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_READ_COUNT 1170 /*! lock: commit timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WRITE_COUNT 1169 +#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WRITE_COUNT 1171 /*! * lock: dhandle lock application thread time waiting for the dhandle * lock (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1170 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1172 /*! * lock: dhandle lock internal thread time waiting for the dhandle lock * (usecs) */ -#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1171 +#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1173 /*! lock: dhandle read lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1172 +#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1174 /*! lock: dhandle write lock acquisitions */ -#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1173 +#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1175 /*! lock: metadata lock acquisitions */ -#define WT_STAT_CONN_LOCK_METADATA_COUNT 1174 +#define WT_STAT_CONN_LOCK_METADATA_COUNT 1176 /*! lock: metadata lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1175 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1177 /*! lock: metadata lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1176 +#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1178 /*! * lock: read timestamp queue lock application thread time waiting for * the dhandle lock (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1177 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1179 /*! * lock: read timestamp queue lock internal thread time waiting for the * dhandle lock (usecs) */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1178 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1180 /*! lock: read timestamp queue read lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1179 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1181 /*! lock: read timestamp queue write lock acquisitions */ -#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1180 +#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1182 /*! lock: schema lock acquisitions */ -#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1181 +#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1183 /*! lock: schema lock application thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1182 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1184 /*! lock: schema lock internal thread wait time (usecs) */ -#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1183 +#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1185 /*! * lock: table lock application thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1184 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1186 /*! * lock: table lock internal thread time waiting for the table lock * (usecs) */ -#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1185 +#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1187 /*! lock: table read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1186 +#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1188 /*! lock: table write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1187 +#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1189 /*! * lock: txn global lock application thread time waiting for the dhandle * lock (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1188 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1190 /*! * lock: txn global lock internal thread time waiting for the dhandle * lock (usecs) */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1189 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1191 /*! lock: txn global read lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1190 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1192 /*! lock: txn global write lock acquisitions */ -#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1191 +#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1193 /*! log: busy returns attempting to switch slots */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1192 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1194 /*! log: force checkpoint calls slept */ -#define WT_STAT_CONN_LOG_FORCE_CKPT_SLEEP 1193 +#define WT_STAT_CONN_LOG_FORCE_CKPT_SLEEP 1195 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1194 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1196 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1195 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1197 /*! log: log files manually zero-filled */ -#define WT_STAT_CONN_LOG_ZERO_FILLS 1196 +#define WT_STAT_CONN_LOG_ZERO_FILLS 1198 /*! log: log flush operations */ -#define WT_STAT_CONN_LOG_FLUSH 1197 +#define WT_STAT_CONN_LOG_FLUSH 1199 /*! log: log force write operations */ -#define WT_STAT_CONN_LOG_FORCE_WRITE 1198 +#define WT_STAT_CONN_LOG_FORCE_WRITE 1200 /*! log: log force write operations skipped */ -#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1199 +#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1201 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1200 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1202 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1201 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1203 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1202 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1204 /*! log: log release advances write LSN */ -#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1203 +#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1205 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1204 +#define WT_STAT_CONN_LOG_SCANS 1206 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1205 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1207 /*! log: log server thread advances write LSN */ -#define WT_STAT_CONN_LOG_WRITE_LSN 1206 +#define WT_STAT_CONN_LOG_WRITE_LSN 1208 /*! log: log server thread write LSN walk skipped */ -#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1207 +#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1209 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1208 +#define WT_STAT_CONN_LOG_SYNC 1210 /*! log: log sync time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DURATION 1209 +#define WT_STAT_CONN_LOG_SYNC_DURATION 1211 /*! log: log sync_dir operations */ -#define WT_STAT_CONN_LOG_SYNC_DIR 1210 +#define WT_STAT_CONN_LOG_SYNC_DIR 1212 /*! log: log sync_dir time duration (usecs) */ -#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1211 +#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1213 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1212 +#define WT_STAT_CONN_LOG_WRITES 1214 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1213 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1215 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1214 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1216 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1215 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1217 /*! log: pre-allocated log files not ready and missed */ -#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1216 +#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1218 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1217 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1219 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1218 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1220 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1219 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1221 /*! log: slot close lost race */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1220 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1222 /*! log: slot close unbuffered waits */ -#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1221 +#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1223 /*! log: slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1222 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1224 /*! log: slot join atomic update races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1223 +#define WT_STAT_CONN_LOG_SLOT_RACES 1225 /*! log: slot join calls atomic updates raced */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1224 +#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1226 /*! log: slot join calls did not yield */ -#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1225 +#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1227 /*! log: slot join calls found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1226 +#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1228 /*! log: slot join calls slept */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1227 +#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1229 /*! log: slot join calls yielded */ -#define WT_STAT_CONN_LOG_SLOT_YIELD 1228 +#define WT_STAT_CONN_LOG_SLOT_YIELD 1230 /*! log: slot join found active slot closed */ -#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1229 +#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1231 /*! log: slot joins yield time (usecs) */ -#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1230 +#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1232 /*! log: slot transitions unable to find free slot */ -#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1231 +#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1233 /*! log: slot unbuffered writes */ -#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1232 +#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1234 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1233 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1235 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1234 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1236 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1235 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1237 /*! log: written slots coalesced */ -#define WT_STAT_CONN_LOG_SLOT_COALESCED 1236 +#define WT_STAT_CONN_LOG_SLOT_COALESCED 1238 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1237 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1239 /*! perf: file system read latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1238 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1240 /*! perf: file system read latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1239 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1241 /*! perf: file system read latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1240 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1242 /*! perf: file system read latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1241 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1243 /*! perf: file system read latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1242 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1244 /*! perf: file system read latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1243 +#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1245 /*! perf: file system write latency histogram (bucket 1) - 10-49ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1244 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1246 /*! perf: file system write latency histogram (bucket 2) - 50-99ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1245 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1247 /*! perf: file system write latency histogram (bucket 3) - 100-249ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1246 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1248 /*! perf: file system write latency histogram (bucket 4) - 250-499ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1247 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1249 /*! perf: file system write latency histogram (bucket 5) - 500-999ms */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1248 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1250 /*! perf: file system write latency histogram (bucket 6) - 1000ms+ */ -#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1249 +#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1251 /*! perf: operation read latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1250 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1252 /*! perf: operation read latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1251 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1253 /*! perf: operation read latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1252 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1254 /*! perf: operation read latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1253 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1255 /*! perf: operation read latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1254 +#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1256 /*! perf: operation write latency histogram (bucket 1) - 100-249us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1255 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1257 /*! perf: operation write latency histogram (bucket 2) - 250-499us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1256 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1258 /*! perf: operation write latency histogram (bucket 3) - 500-999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1257 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1259 /*! perf: operation write latency histogram (bucket 4) - 1000-9999us */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1258 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1260 /*! perf: operation write latency histogram (bucket 5) - 10000us+ */ -#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1259 +#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1261 /*! reconciliation: fast-path pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1260 +#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1262 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1261 +#define WT_STAT_CONN_REC_PAGES 1263 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1262 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1264 /*! reconciliation: pages deleted */ -#define WT_STAT_CONN_REC_PAGE_DELETE 1263 +#define WT_STAT_CONN_REC_PAGE_DELETE 1265 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1264 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1266 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1265 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1267 /*! session: open cursor count */ -#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1266 +#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1268 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1267 +#define WT_STAT_CONN_SESSION_OPEN 1269 /*! session: table alter failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1268 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1270 /*! session: table alter successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1269 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1271 /*! session: table alter unchanged and skipped */ -#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1270 +#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1272 /*! session: table compact failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1271 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1273 /*! session: table compact successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1272 +#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1274 /*! session: table create failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1273 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1275 /*! session: table create successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1274 +#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1276 /*! session: table drop failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1275 +#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1277 /*! session: table drop successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1276 +#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1278 /*! session: table rebalance failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1277 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1279 /*! session: table rebalance successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1278 +#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1280 /*! session: table rename failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1279 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1281 /*! session: table rename successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1280 +#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1282 /*! session: table salvage failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1281 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1283 /*! session: table salvage successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1282 +#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1284 /*! session: table truncate failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1283 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1285 /*! session: table truncate successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1284 +#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1286 /*! session: table verify failed calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1285 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1287 /*! session: table verify successful calls */ -#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1286 +#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1288 /*! thread-state: active filesystem fsync calls */ -#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1287 +#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1289 /*! thread-state: active filesystem read calls */ -#define WT_STAT_CONN_THREAD_READ_ACTIVE 1288 +#define WT_STAT_CONN_THREAD_READ_ACTIVE 1290 /*! thread-state: active filesystem write calls */ -#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1289 +#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1291 /*! thread-yield: application thread time evicting (usecs) */ -#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1290 +#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1292 /*! thread-yield: application thread time waiting for cache (usecs) */ -#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1291 +#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1293 /*! * thread-yield: connection close blocked waiting for transaction state * stabilization */ -#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1292 +#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1294 /*! thread-yield: connection close yielded for lsm manager shutdown */ -#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1293 +#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1295 /*! thread-yield: data handle lock yielded */ -#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1294 +#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1296 /*! * thread-yield: get reference for page index and slot time sleeping * (usecs) */ -#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1295 +#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1297 /*! thread-yield: log server sync yielded for log write */ -#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1296 +#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1298 /*! thread-yield: page access yielded due to prepare state change */ -#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1297 +#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1299 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1298 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1300 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1299 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1301 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1300 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1302 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1301 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1303 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1302 +#define WT_STAT_CONN_PAGE_SLEEP 1304 /*! * thread-yield: page delete rollback time sleeping for state change * (usecs) */ -#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1303 +#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1305 /*! thread-yield: page reconciliation yielded due to child modification */ -#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1304 +#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1306 /*! transaction: commit timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_EMPTY 1305 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_EMPTY 1307 /*! transaction: commit timestamp queue inserts to tail */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_TAIL 1306 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_TAIL 1308 /*! transaction: commit timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_INSERTS 1307 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_INSERTS 1309 /*! transaction: commit timestamp queue length */ -#define WT_STAT_CONN_TXN_COMMIT_QUEUE_LEN 1308 +#define WT_STAT_CONN_TXN_COMMIT_QUEUE_LEN 1310 /*! transaction: number of named snapshots created */ -#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1309 +#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1311 /*! transaction: number of named snapshots dropped */ -#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1310 +#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1312 /*! transaction: prepared transactions */ -#define WT_STAT_CONN_TXN_PREPARE 1311 +#define WT_STAT_CONN_TXN_PREPARE 1313 /*! transaction: prepared transactions committed */ -#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1312 +#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1314 /*! transaction: prepared transactions currently active */ -#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1313 +#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1315 /*! transaction: prepared transactions rolled back */ -#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1314 +#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1316 /*! transaction: query timestamp calls */ -#define WT_STAT_CONN_TXN_QUERY_TS 1315 +#define WT_STAT_CONN_TXN_QUERY_TS 1317 /*! transaction: read timestamp queue insert to empty */ -#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1316 +#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1318 /*! transaction: read timestamp queue inserts to head */ -#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1317 +#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1319 /*! transaction: read timestamp queue inserts total */ -#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1318 +#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1320 /*! transaction: read timestamp queue length */ -#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1319 +#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1321 /*! transaction: rollback to stable calls */ -#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE 1320 +#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE 1322 /*! transaction: rollback to stable updates aborted */ -#define WT_STAT_CONN_TXN_ROLLBACK_UPD_ABORTED 1321 +#define WT_STAT_CONN_TXN_ROLLBACK_UPD_ABORTED 1323 /*! transaction: rollback to stable updates removed from lookaside */ -#define WT_STAT_CONN_TXN_ROLLBACK_LAS_REMOVED 1322 +#define WT_STAT_CONN_TXN_ROLLBACK_LAS_REMOVED 1324 /*! transaction: set timestamp calls */ -#define WT_STAT_CONN_TXN_SET_TS 1323 +#define WT_STAT_CONN_TXN_SET_TS 1325 /*! transaction: set timestamp commit calls */ -#define WT_STAT_CONN_TXN_SET_TS_COMMIT 1324 +#define WT_STAT_CONN_TXN_SET_TS_COMMIT 1326 /*! transaction: set timestamp commit updates */ -#define WT_STAT_CONN_TXN_SET_TS_COMMIT_UPD 1325 +#define WT_STAT_CONN_TXN_SET_TS_COMMIT_UPD 1327 /*! transaction: set timestamp oldest calls */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1326 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1328 /*! transaction: set timestamp oldest updates */ -#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1327 +#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1329 /*! transaction: set timestamp stable calls */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE 1328 +#define WT_STAT_CONN_TXN_SET_TS_STABLE 1330 /*! transaction: set timestamp stable updates */ -#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1329 +#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1331 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1330 +#define WT_STAT_CONN_TXN_BEGIN 1332 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1331 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1333 /*! transaction: transaction checkpoint generation */ -#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1332 +#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1334 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1333 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1335 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1334 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1336 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1335 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1337 /*! transaction: transaction checkpoint scrub dirty target */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1336 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1338 /*! transaction: transaction checkpoint scrub time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1337 +#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1339 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1338 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1340 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1339 +#define WT_STAT_CONN_TXN_CHECKPOINT 1341 /*! * transaction: transaction checkpoints skipped because database was * clean */ -#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1340 +#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1342 /*! transaction: transaction failures due to cache overflow */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1341 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1343 /*! * transaction: transaction fsync calls for checkpoint after allocating * the transaction ID */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1342 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1344 /*! * transaction: transaction fsync duration for checkpoint after * allocating the transaction ID (usecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1343 +#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1345 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1344 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1346 /*! transaction: transaction range of IDs currently pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1345 +#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1347 /*! * transaction: transaction range of IDs currently pinned by named * snapshots */ -#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1346 +#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1348 /*! transaction: transaction range of timestamps currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1347 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1349 /*! * transaction: transaction range of timestamps pinned by the oldest * timestamp */ -#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1348 +#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1350 /*! transaction: transaction sync calls */ -#define WT_STAT_CONN_TXN_SYNC 1349 +#define WT_STAT_CONN_TXN_SYNC 1351 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1350 +#define WT_STAT_CONN_TXN_COMMIT 1352 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1351 +#define WT_STAT_CONN_TXN_ROLLBACK 1353 /*! transaction: update conflicts */ -#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1352 +#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1354 /*! * @} diff --git a/src/third_party/wiredtiger/src/log/log.c b/src/third_party/wiredtiger/src/log/log.c index fb39257fe4c..8dfd0c0d153 100644 --- a/src/third_party/wiredtiger/src/log/log.c +++ b/src/third_party/wiredtiger/src/log/log.c @@ -975,15 +975,24 @@ __log_open_verify(WT_SESSION_IMPL *session, uint32_t id, WT_FH **fhp, WT_LOG_VERSION, desc->version); /* - * We error if the log version is less than the required minimum. + * We error if the log version is less than the required minimum + * or larger than the required maximum. */ - if (conn->compat_req_major != WT_CONN_COMPAT_NONE && - desc->version < conn->log_req_version) + if (conn->req_max_major != WT_CONN_COMPAT_NONE && + desc->version > conn->log_req_max) + WT_ERR_MSG(session, WT_ERROR, + "unsupported WiredTiger file version: this build" + " requires a maximum version of %" PRIu16 "," + " and the file is version %" PRIu16, + conn->log_req_max, desc->version); + + if (conn->req_min_major != WT_CONN_COMPAT_NONE && + desc->version < conn->log_req_min) WT_ERR_MSG(session, WT_ERROR, "unsupported WiredTiger file version: this build" " requires a minimum version of %" PRIu16 "," " and the file is version %" PRIu16, - conn->log_req_version, desc->version); + conn->log_req_min, desc->version); /* * Set up the return values if the magic number is valid. diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c index 2d5dd5b61b7..eb3b0038525 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_write.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c @@ -47,6 +47,7 @@ typedef struct { /* Track the page's min/maximum transactions. */ uint64_t max_txn; + uint64_t min_txn_unstable; WT_DECL_TIMESTAMP(max_timestamp) WT_DECL_TIMESTAMP(max_onpage_timestamp) WT_DECL_TIMESTAMP(min_saved_timestamp) @@ -567,42 +568,6 @@ __wt_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, return (__wt_page_parent_modify_set(session, ref, true)); } -/* - * __rec_las_checkpoint_test -- - * Return if the lookaside table is going to collide with a checkpoint. - */ -static inline bool -__rec_las_checkpoint_test(WT_SESSION_IMPL *session, WT_RECONCILE *r) -{ - WT_BTREE *btree; - - btree = S2BT(session); - - /* - * Running checkpoints can collide with the lookaside table because - * reconciliation using the lookaside table writes the key's last - * committed value, which might not be the value checkpoint would write. - * If reconciliation was configured for lookaside table eviction, this - * file participates in checkpoints, and any of the tree or system - * transactional generation numbers don't match, there's a possible - * collision. - * - * It's a complicated test, but the alternative is to have checkpoint - * drain lookaside table reconciliations, and this isn't a problem for - * most workloads. - */ - if (!F_ISSET(r, WT_REC_LOOKASIDE)) - return (false); - if (F_ISSET(btree, WT_BTREE_NO_CHECKPOINT)) - return (false); - if (r->orig_btree_checkpoint_gen == btree->checkpoint_gen && - r->orig_txn_checkpoint_gen == - __wt_gen(session, WT_GEN_CHECKPOINT) && - r->orig_btree_checkpoint_gen == r->orig_txn_checkpoint_gen) - return (false); - return (true); -} - /* * __rec_write_check_complete -- * Check that reconciliation should complete. @@ -611,6 +576,8 @@ static int __rec_write_check_complete( WT_SESSION_IMPL *session, WT_RECONCILE *r, int tret, bool *lookaside_retryp) { + WT_UNUSED(session); + /* * Tests in this function are lookaside tests and tests to decide if * rewriting a page in memory is worth doing. In-memory configurations @@ -621,13 +588,6 @@ __rec_write_check_complete( if (F_ISSET(r, WT_REC_IN_MEMORY)) return (0); - /* - * If we have used the lookaside table, check for a lookaside table and - * checkpoint collision. - */ - if (r->cache_write_lookaside && __rec_las_checkpoint_test(session, r)) - return (EBUSY); - /* * Fall back to lookaside eviction during checkpoints if a page can't * be evicted. @@ -970,17 +930,22 @@ __rec_init(WT_SESSION_IMPL *session, * we choose will be stable. However, if checkpointing with a * timestamp (indicated by a stable_timestamp being set), and the * timestamp hasn't changed since the last time this page was - * reconciled, skew oldest instead. + * reconciled, skew oldest instead. If a checkpoint is already running, + * the oldest version is more likely to be what it needs. */ if (__wt_btree_immediately_durable(session)) las_skew_oldest = false; else { WT_ORDERED_READ(las_skew_oldest, txn_global->has_stable_timestamp); - if (las_skew_oldest) - las_skew_oldest = ref->page_las != NULL && + if (las_skew_oldest) { + las_skew_oldest = (ref->page_las != NULL && !__wt_txn_visible_all(session, WT_TXN_NONE, - WT_TIMESTAMP_NULL(&ref->page_las->min_timestamp)); + WT_TIMESTAMP_NULL( + &ref->page_las->min_timestamp))) || + btree->checkpoint_gen != + __wt_gen(session, WT_GEN_CHECKPOINT); + } } r->las_skew_newest = LF_ISSET(WT_REC_LOOKASIDE) && LF_ISSET(WT_REC_VISIBLE_ALL) && !las_skew_oldest; @@ -1010,19 +975,11 @@ __rec_init(WT_SESSION_IMPL *session, if (page->type == WT_PAGE_COL_FIX) LF_CLR(WT_REC_LOOKASIDE); - /* - * Check for a lookaside table and checkpoint collision, and if we find - * one, turn off the lookaside file (we've gone to all the effort of - * getting exclusive access to the page, might as well try and evict - * it). - */ - if (LF_ISSET(WT_REC_LOOKASIDE) && __rec_las_checkpoint_test(session, r)) - LF_CLR(WT_REC_LOOKASIDE); - r->flags = flags; /* Track the page's min/maximum transaction */ r->max_txn = WT_TXN_NONE; + r->min_txn_unstable = WT_TXN_ABORTED; __wt_timestamp_set_zero(&r->max_timestamp); __wt_timestamp_set_zero(&r->max_onpage_timestamp); __wt_timestamp_set_inf(&r->min_saved_timestamp); @@ -1307,7 +1264,7 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_UPDATE *first_txn_upd, *first_upd, *upd; wt_timestamp_t *timestampp; size_t upd_memsize; - uint64_t max_txn, txnid; + uint64_t max_txn, min_txn_unstable, txnid; bool all_visible, skipped_birthmark, uncommitted; #ifdef HAVE_TIMESTAMPS @@ -1323,6 +1280,7 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r, first_txn_upd = NULL; upd_memsize = 0; max_txn = WT_TXN_NONE; + min_txn_unstable = WT_TXN_ABORTED; skipped_birthmark = uncommitted = false; /* @@ -1422,6 +1380,13 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r, if (upd->type == WT_UPDATE_BIRTHMARK) skipped_birthmark = true; + /* + * Track minimum transaction ID for unstable updates. + */ + if (txnid != WT_TXN_NONE && + WT_TXNID_LT(txnid, min_txn_unstable)) + min_txn_unstable = txnid; + continue; } @@ -1469,6 +1434,13 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r, if (WT_TXNID_LT(r->max_txn, max_txn)) r->max_txn = max_txn; + /* + * Track the oldest unstable transaction in the page. It is used to + * decide whether to or not to read the history during a page read. + */ + if (WT_TXNID_LT(min_txn_unstable, r->min_txn_unstable)) + r->min_txn_unstable = min_txn_unstable; + #ifdef HAVE_TIMESTAMPS /* Update the maximum timestamp. */ if (first_ts_upd != NULL && @@ -1814,17 +1786,21 @@ __rec_child_modify(WT_SESSION_IMPL *session, break; case WT_REF_LIMBO: + WT_ASSERT(session, !F_ISSET(r, WT_REC_EVICT)); + /* FALLTHROUGH */ case WT_REF_LOOKASIDE: /* - * On disk, with lookaside updates. + * On disk or in cache with lookaside updates. * - * We should never be here during eviction, active + * We should never be here during eviction: active * child pages in an evicted page's subtree fails the * eviction attempt. */ - WT_ASSERT(session, !F_ISSET(r, WT_REC_EVICT)); - if (F_ISSET(r, WT_REC_EVICT)) + if (F_ISSET(r, WT_REC_EVICT) && + __wt_page_las_active(session, ref)) { + WT_ASSERT(session, false); return (EBUSY); + } /* * A page evicted with lookaside entries may not have @@ -1836,7 +1812,6 @@ __rec_child_modify(WT_SESSION_IMPL *session, *statep = WT_CHILD_IGNORE; WT_CHILD_RELEASE(session, *hazardp, ref); } - goto done; case WT_REF_MEM: @@ -3456,7 +3431,9 @@ done: if (F_ISSET(r, WT_REC_LOOKASIDE)) { /* Track the oldest lookaside timestamp seen so far. */ multi->page_las.las_skew_newest = r->las_skew_newest; multi->page_las.las_max_txn = r->max_txn; + multi->page_las.las_min_txn = r->min_txn_unstable; WT_ASSERT(session, r->max_txn != WT_TXN_NONE); + WT_ASSERT(session, r->min_txn_unstable != WT_TXN_NONE); #ifdef HAVE_TIMESTAMPS __wt_timestamp_set(&multi->page_las.min_timestamp, &r->min_saved_timestamp); diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index 74f4a0b0523..4edafcbb8ce 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -856,8 +856,10 @@ static const char * const __stats_connection_desc[] = { "cache: pages read into cache after truncate", "cache: pages read into cache after truncate in prepare state", "cache: pages read into cache requiring lookaside entries", + "cache: pages read into cache requiring lookaside for checkpoint", "cache: pages read into cache skipping older lookaside entries", "cache: pages read into cache with skipped lookaside entries needed later", + "cache: pages read into cache with skipped lookaside entries needed later by checkpoint", "cache: pages requested from the cache", "cache: pages seen by eviction walk", "cache: pages selected for eviction unable to be evicted", @@ -1251,8 +1253,10 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cache_read_deleted = 0; stats->cache_read_deleted_prepared = 0; stats->cache_read_lookaside = 0; + stats->cache_read_lookaside_checkpoint = 0; stats->cache_read_lookaside_skipped = 0; stats->cache_read_lookaside_delay = 0; + stats->cache_read_lookaside_delay_checkpoint = 0; stats->cache_pages_requested = 0; stats->cache_eviction_pages_seen = 0; stats->cache_eviction_fail = 0; @@ -1683,10 +1687,14 @@ __wt_stat_connection_aggregate( to->cache_read_deleted_prepared += WT_STAT_READ(from, cache_read_deleted_prepared); to->cache_read_lookaside += WT_STAT_READ(from, cache_read_lookaside); + to->cache_read_lookaside_checkpoint += + WT_STAT_READ(from, cache_read_lookaside_checkpoint); to->cache_read_lookaside_skipped += WT_STAT_READ(from, cache_read_lookaside_skipped); to->cache_read_lookaside_delay += WT_STAT_READ(from, cache_read_lookaside_delay); + to->cache_read_lookaside_delay_checkpoint += + WT_STAT_READ(from, cache_read_lookaside_delay_checkpoint); to->cache_pages_requested += WT_STAT_READ(from, cache_pages_requested); to->cache_eviction_pages_seen += diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c index 3c12b647ca8..dd5eb99750b 100644 --- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c +++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c @@ -631,7 +631,7 @@ __checkpoint_prepare( WT_TXN_GLOBAL *txn_global; WT_TXN_STATE *txn_state; const char *txn_cfg[] = { WT_CONFIG_BASE(session, - WT_SESSION_begin_transaction), "isolation=snapshot", NULL, NULL }; + WT_SESSION_begin_transaction), "isolation=snapshot", NULL }; bool use_timestamp; conn = S2C(session); @@ -735,12 +735,8 @@ __checkpoint_prepare( } else if (!F_ISSET(conn, WT_CONN_RECOVERING)) __wt_timestamp_set(&txn_global->meta_ckpt_timestamp, &txn_global->recovery_timestamp); - } else { - __wt_timestamp_set_zero(&txn->read_timestamp); - if (!F_ISSET(conn, WT_CONN_RECOVERING)) - __wt_timestamp_set_zero( - &txn_global->meta_ckpt_timestamp); - } + } else if (!F_ISSET(conn, WT_CONN_RECOVERING)) + __wt_timestamp_set_zero(&txn_global->meta_ckpt_timestamp); #else WT_UNUSED(use_timestamp); #endif @@ -748,9 +744,18 @@ __checkpoint_prepare( __wt_writeunlock(session, &txn_global->rwlock); #ifdef HAVE_TIMESTAMPS - if (F_ISSET(txn, WT_TXN_HAS_TS_READ)) + if (F_ISSET(txn, WT_TXN_HAS_TS_READ)) { __wt_verbose_timestamp(session, &txn->read_timestamp, "Checkpoint requested at stable timestamp"); + + /* + * The snapshot we established when the transaction started may + * be too early to match the timestamp we just read. + * + * Get a new one. + */ + __wt_txn_get_snapshot(session); + } #endif /* diff --git a/src/third_party/wiredtiger/test/csuite/Makefile.am b/src/third_party/wiredtiger/test/csuite/Makefile.am index 5a16a419aba..1981b3e6831 100644 --- a/src/third_party/wiredtiger/test/csuite/Makefile.am +++ b/src/third_party/wiredtiger/test/csuite/Makefile.am @@ -103,6 +103,10 @@ test_rwlock_SOURCES = rwlock/main.c noinst_PROGRAMS += test_rwlock all_TESTS += test_rwlock +test_wt4105_large_doc_small_upd_SOURCES = wt4105_large_doc_small_upd/main.c +noinst_PROGRAMS += test_wt4105_large_doc_small_upd +all_TESTS += test_wt4105_large_doc_small_upd + # Run this during a "make check" smoke test. TESTS = $(all_TESTS) LOG_COMPILER = $(TEST_WRAPPER) diff --git a/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c b/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c new file mode 100644 index 00000000000..75ee0ade1cb --- /dev/null +++ b/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c @@ -0,0 +1,165 @@ +/*- + * Public Domain 2014-2018 MongoDB, Inc. + * Public Domain 2008-2014 WiredTiger, Inc. + * + * This is free and unencumbered software released into the public domain. + * + * Anyone is free to copy, modify, publish, use, compile, sell, or + * distribute this software, either in source code form or as a compiled + * binary, for any purpose, commercial or non-commercial, and by any + * means. + * + * In jurisdictions that recognize copyright laws, the author or authors + * of this software dedicate any and all copyright interest in the + * software to the public domain. We make this dedication for the benefit + * of the public at large and to the detriment of our heirs and + * successors. We intend this dedication to be an overt act of + * relinquishment in perpetuity of all present and future rights to this + * software under copyright law. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +#include "test_util.h" + +#include + +static const char * const uri = "table:large"; + +#define DATASIZE (1024 * 1024) +#define MODIFY_COUNT (1024) +#define NUM_DOCS 2 + +static void on_alarm(int) WT_GCC_FUNC_DECL_ATTRIBUTE((noreturn)); +static void +on_alarm(int signo) +{ + (void)signo; /* Unused parameter */ + fprintf(stderr, "cursor->modify timed out \n"); + abort(); + + /* NOTREACHED */ +} + +static int ignore_errors; + +static int +handle_error(WT_EVENT_HANDLER *handler, + WT_SESSION *session, int error, const char *message) +{ + (void)(handler); + + /* Skip the error messages we're expecting to see. */ + if (ignore_errors > 0 && + (strstr(message, "requires key be set") != NULL || + strstr(message, "requires value be set") != NULL)) { + --ignore_errors; + return (0); + } + + (void)fprintf(stderr, "%s: %s\n", + message, session->strerror(session, error)); + return (0); +} + +static WT_EVENT_HANDLER event_handler = { + handle_error, + NULL, + NULL, + NULL +}; + +int +main(int argc, char *argv[]) +{ + TEST_OPTS *opts, _opts; + WT_CURSOR *c; + WT_ITEM value; + WT_MODIFY modify_entry; + WT_SESSION *session, *session2; + + char *large_doc; + uint64_t i, j, offset; + + opts = &_opts; + memset(opts, 0, sizeof(*opts)); + testutil_check(testutil_parse_opts(argc, argv, opts)); + testutil_make_work_dir(opts->home); + + testutil_check(wiredtiger_open(opts->home, &event_handler, + "create," + "cache_size=1G," + "statistics_log=(json,wait=1)", &opts->conn)); + + testutil_check( + opts->conn->open_session(opts->conn, NULL, NULL, &session)); + testutil_check(session->create(session, uri, + "key_format=Q,value_format=u," + "leaf_item_max=64M,leaf_page_max=32k,memory_page_max=1M")); + + testutil_check( + session->open_cursor(session, uri, NULL, NULL, &c)); + + /* Value is initialized with 'v' and has not significance to it. */ + large_doc = (char *)malloc(DATASIZE); + memset(large_doc, 'v', DATASIZE); + value.data = large_doc; + value.size = DATASIZE; + + /* Insert records. */ + for (i = 0; i < NUM_DOCS; i++) { + c->set_key(c, i); + c->set_value(c, &value); + testutil_check(c->insert(c)); + } + + testutil_check(c->close(c)); + if (opts->verbose) + printf("%d documents inserted\n", NUM_DOCS); + + /* Setup Transaction to pin the cache */ + testutil_check( + session->begin_transaction(session, "isolation=snapshot")); + + /* Set an alarm so we can debug hangs. */ + (void)signal(SIGALRM, on_alarm); + + /* Start another session to perform small updates. */ + testutil_check( + opts->conn->open_session(opts->conn, NULL, NULL, &session2)); + testutil_check( + session->open_cursor(session2, uri, NULL, NULL, &c)); + + j = offset = 0; + while (++j < MODIFY_COUNT) { + for (i = 0; i < NUM_DOCS; i++) { + /* Position the cursor. */ + c->set_key(c, i); + modify_entry.data.data = + "abcdefghijklmnopqrstuvwxyz"; + modify_entry.data.size = strlen(modify_entry.data.data); + modify_entry.offset = offset; + modify_entry.size = modify_entry.data.size; + (void)alarm(1); + testutil_check(c->modify(c, &modify_entry, 1)); + (void)alarm(0); + } + /* + * Modify operations are done similar to append sequence. + * This has no bearing on the test outcome. + */ + offset += modify_entry.data.size; + offset = offset < DATASIZE ? offset : 0; + if (opts->verbose) + printf("modify count %" PRIu64"\n", j * NUM_DOCS); + } + + testutil_cleanup(opts); + + return (EXIT_SUCCESS); +} diff --git a/src/third_party/wiredtiger/test/suite/test_compat02.py b/src/third_party/wiredtiger/test/suite/test_compat02.py index 6bf1fc28c05..15d6a58e84f 100644 --- a/src/third_party/wiredtiger/test/suite/test_compat02.py +++ b/src/third_party/wiredtiger/test/suite/test_compat02.py @@ -70,18 +70,27 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess): ('26_rel', dict(rel="2.6", log_rel=1)), ('26_patch_rel', dict(rel="2.6.1", log_rel=1)), ] - compat_required = [ - ('future_req', dict(req=future_rel, log_req=future_logv)), - ('31_req', dict(req="3.1", log_req=3)), - ('30_req', dict(req="3.0", log_req=2)), - ('26_req', dict(req="2.6", log_req=1)), - ('26_patch_req', dict(req="2.6.1", log_req=1)), + compat_max = [ + ('future_max', dict(max_req=future_rel, log_max=future_logv)), + ('def_max', dict(max_req='none', log_max=3)), + ('31_max', dict(max_req="3.1", log_max=3)), + ('30_max', dict(max_req="3.0", log_max=2)), + ('26_max', dict(max_req="2.6", log_max=1)), + ('26_patch_max', dict(max_req="2.6.1", log_max=1)), + ] + compat_min = [ + ('future_min', dict(min_req=future_rel, log_min=future_logv)), + ('def_min', dict(min_req='none', log_min=3)), + ('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)), + ('26_patch_min', dict(min_req="2.6.1", log_min=1)), ] base_config = [ ('basecfg_true', dict(basecfg='true')), ('basecfg_false', dict(basecfg='false')), ] - scenarios = make_scenarios(compat_create, compat_release, compat_required, base_config) + scenarios = make_scenarios(compat_create, compat_release, compat_min, compat_max, base_config) def conn_config(self): # Set archive false on the home directory. @@ -113,9 +122,10 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess): # useful. Test for success or failure based on the relative versions # configured. compat_str = '' - if (self.req != 'none'): - #compat_str = 'verbose=(temporary),compatibility=(require_min="%s"),' % self.req - compat_str += 'compatibility=(require_min="%s"),' % self.req + if (self.max_req != 'none'): + compat_str += 'compatibility=(require_max="%s"),' % self.max_req + if (self.min_req != 'none'): + compat_str += 'compatibility=(require_min="%s"),' % self.min_req if (self.rel != 'none'): compat_str += 'compatibility=(release="%s"),' % self.rel self.conn.close() @@ -123,38 +133,29 @@ class test_compat02(wttest.WiredTigerTestCase, suite_subprocess): restart_config = log_str + compat_str self.pr("Restart conn " + restart_config) # - # Open a connection with a minimum required database and a - # release compatibility setting. + # We have a lot of error cases. There are too many and they are + # dependent on the order of the library code so don't check specific + # error messages. So just determine if an error should occur and + # make sure it does. # - msgunsup = "/unsupported major version/" - msglog = "/this build requires a minimum version/" - msgcompat = "/cannot be larger than compatibility release/" - msgsave = "/cannot be larger than saved release/" - if (self.log_req >= self.future_logv): - self.pr("EXPECT: " + msgunsup) - self.assertRaisesWithMessage(wiredtiger.WiredTigerError, - lambda: self.wiredtiger_open('.', restart_config), msgunsup) - elif (self.rel != 'none' and self.log_req > self.log_rel): - self.pr("EXPECT: " + msgcompat) - # If required minimum is larger than the compatibility - # setting we expect an error. - self.assertRaisesWithMessage(wiredtiger.WiredTigerError, - lambda: self.wiredtiger_open('.', restart_config), msgcompat) - elif (self.log_req > self.log_create and self.create_rel != 'none'): - self.pr("EXPECT: " + msgsave) - # If required minimum is larger than the setting we created the - # database with, we expect an error. - self.assertRaisesWithMessage(wiredtiger.WiredTigerError, - lambda: self.wiredtiger_open('.', restart_config), msgsave) - elif (self.log_req > self.log_create): - self.pr("EXPECT: " + msglog) - # If required minimum is larger than the setting we created the - # database with, we expect an error. - self.assertRaisesWithMessage(wiredtiger.WiredTigerError, - lambda: self.wiredtiger_open('.', restart_config), msglog) + if ((self.log_min >= self.future_logv) or + (self.log_max >= self.future_logv) or + (self.max_req != 'none' and self.log_max < self.log_rel) or + (self.min_req != 'none' and self.log_min > self.log_rel) or + (self.max_req != 'none' and self.min_req != 'none' and self.log_max < self.log_min) or + (self.max_req != 'none' and self.log_max < self.log_create) or + (self.min_req != 'none' and self.log_min > self.log_create)): + expect_err = True + else: + expect_err = False + + if (expect_err == True): + self.pr("EXPECT ERROR") + with self.expectedStderrPattern(''): + self.assertRaisesException(wiredtiger.WiredTigerError, + lambda: self.wiredtiger_open('.', restart_config)) else: - # We expect success - self.pr("EXPECT: SUCCESS") + self.pr("EXPECT SUCCESS") conn = self.wiredtiger_open('.', restart_config) conn.close() diff --git a/src/third_party/wiredtiger/test/suite/test_compat03.py b/src/third_party/wiredtiger/test/suite/test_compat03.py new file mode 100644 index 00000000000..e6b8ead50a6 --- /dev/null +++ b/src/third_party/wiredtiger/test/suite/test_compat03.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python +# +# Public Domain 2014-2018 MongoDB, Inc. +# Public Domain 2008-2014 WiredTiger, Inc. +# +# This is free and unencumbered software released into the public domain. +# +# Anyone is free to copy, modify, publish, use, compile, sell, or +# distribute this software, either in source code form or as a compiled +# binary, for any purpose, commercial or non-commercial, and by any +# means. +# +# In jurisdictions that recognize copyright laws, the author or authors +# of this software dedicate any and all copyright interest in the +# software to the public domain. We make this dedication for the benefit +# of the public at large and to the detriment of our heirs and +# successors. We intend this dedication to be an overt act of +# relinquishment in perpetuity of all present and future rights to this +# software under copyright law. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# test_compat03.py +# Check compatibility API + +import fnmatch, os +import wiredtiger, wttest +from suite_subprocess import suite_subprocess +from wtdataset import SimpleDataSet, simple_key +from wtscenario import make_scenarios + +class test_compat03(wttest.WiredTigerTestCase, suite_subprocess): + # Add enough entries and use a small log size to generate more than + # one log file. + entries = 2000 + logmax = "100K" + tablename = 'test_compat03' + uri = 'table:' + tablename + # Declare the log versions that do and do not have prevlsn. + # Log version 1 does not have the prevlsn record. + # Log version 2 introduced that record. + # Log version 3 continues to have that record. + min_logv = 2 + + # Test detecting a not-yet-existing log version. This should + # hold us for a couple years. + future_logv = 5 + future_rel = "5.0" + + # The API uses only the major and minor numbers but accepts with + # 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)), + ('31_rel', dict(rel="3.1", log_rel=3)), + ('30_rel', dict(rel="3.0", log_rel=2)), + ('26_rel', dict(rel="2.6", log_rel=1)), + ('26_patch_rel', dict(rel="2.6.1", log_rel=1)), + ] + compat_max = [ + ('def_max', dict(max_req='none', log_max=3)), + ('future_max', dict(max_req=future_rel, log_max=future_logv)), + ('31_max', dict(max_req="3.1", log_max=3)), + ('30_max', dict(max_req="3.0", log_max=2)), + ('26_max', dict(max_req="2.6", log_max=1)), + ('26_patch_max', dict(max_req="2.6.1", log_max=1)), + ] + compat_min = [ + ('def_min', dict(min_req='none', log_min=3)), + ('future_min', dict(min_req=future_rel, log_min=future_logv)), + ('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)), + ('26_patch_min', dict(min_req="2.6.1", log_min=1)), + ] + base_config = [ + ('basecfg_true', dict(basecfg='true')), + ('basecfg_false', dict(basecfg='false')), + ] + scenarios = make_scenarios(compat_release, compat_max, compat_min, base_config) + + # This test creates scenarios that lead to errors. This is different + # than compat02 because it is testing errors (or success) using the + # compatibility settings on the initial database creation. + def test_compat03(self): + testdir = 'TEST' + os.mkdir(testdir) + config_str = 'create,config_base=%s,' % self.basecfg + log_str = 'log=(archive=false,enabled,file_max=%s),' % self.logmax + compat_str = '' + if (self.rel != 'none'): + compat_str += 'compatibility=(release="%s"),' % self.rel + if (self.max_req != 'none'): + compat_str += 'compatibility=(require_max="%s"),' % self.max_req + if (self.min_req != 'none'): + compat_str += 'compatibility=(require_min="%s"),' % self.min_req + config_str += log_str + compat_str + self.pr("Conn config:" + config_str) + + # + # We have a lot of error cases. There are too many and they are + # dependent on the order of the library code so don't check specific + # error messages. So just determine if an error should occur and + # make sure it does. + # + if ((self.log_min >= self.future_logv) or + (self.log_max >= self.future_logv) or + (self.log_rel >= self.future_logv) or + (self.max_req != 'none' and self.log_max < self.log_rel) or + (self.min_req != 'none' and self.log_min > self.log_rel) or + (self.max_req != 'none' and self.min_req != 'none' and self.log_max < self.log_min)): + expect_err = True + else: + expect_err = False + + if (expect_err == True): + self.pr("EXPECT ERROR") + with self.expectedStderrPattern(''): + self.assertRaisesException(wiredtiger.WiredTigerError, + lambda: self.wiredtiger_open(testdir, config_str)) + else: + self.pr("EXPECT SUCCESS") + conn = self.wiredtiger_open(testdir, config_str) + conn.close() + +if __name__ == '__main__': + wttest.run() -- cgit v1.2.1