summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-06-22 16:44:09 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-22 07:03:49 +0000
commit10e8af0774e24dce015b7bc216691ad17a3d2532 (patch)
tree58cb381861b77d1b6a9759d4d4fd40481ce56653
parentc89c6eca4583203ff7bd8076f1c55cb00b0332b9 (diff)
downloadmongo-10e8af0774e24dce015b7bc216691ad17a3d2532.tar.gz
Import wiredtiger: 5199f7f394d6192475b83e211575be196afa1523 from branch mongodb-4.4
ref: 3b4a927265..5199f7f394 for: 4.4.0-rc11 WT-6407 Fix searching history store accidentally across table boundary WT-6452 Update eviction test config to avoid rollback errors WT-6455 Fix the incorrect connection level debug flag value WT-6461 Add verbose logging for tombstones restored from history store
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/history/hs.c8
-rw-r--r--src/third_party/wiredtiger/src/include/connection.h3
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c5
-rw-r--r--src/third_party/wiredtiger/test/csuite/schema_abort/main.c11
-rw-r--r--src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c2
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_gc01.py3
7 files changed, 26 insertions, 8 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 94fa358c34f..b8ecb80867b 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-4.4",
- "commit": "3b4a927265fc81dc4ab8895c5451a7ec9582c1d3"
+ "commit": "5199f7f394d6192475b83e211575be196afa1523"
}
diff --git a/src/third_party/wiredtiger/src/history/hs.c b/src/third_party/wiredtiger/src/history/hs.c
index ee75972f44f..e94270eb37c 100644
--- a/src/third_party/wiredtiger/src/history/hs.c
+++ b/src/third_party/wiredtiger/src/history/hs.c
@@ -1270,6 +1270,14 @@ __wt_find_hs_upd(WT_SESSION_IMPL *session, WT_ITEM *key, const char *value_forma
WT_ERR(hs_cursor->get_key(
hs_cursor, &hs_btree_id, &hs_key, &hs_start_ts_tmp, &hs_counter_tmp));
+ if (hs_btree_id != S2BT(session)->id) {
+ /* Fallback to the onpage value as the base value. */
+ orig_hs_value_buf = hs_value;
+ hs_value = on_disk_buf;
+ upd_type = WT_UPDATE_STANDARD;
+ break;
+ }
+
WT_ERR(__wt_compare(session, NULL, &hs_key, key, &cmp));
if (cmp != 0) {
diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h
index fa3d10f1b16..662ba865dca 100644
--- a/src/third_party/wiredtiger/src/include/connection.h
+++ b/src/third_party/wiredtiger/src/include/connection.h
@@ -448,10 +448,11 @@ struct __wt_connection_impl {
size_t debug_ckpt_alloc; /* Checkpoint retention allocated. */
uint32_t debug_ckpt_cnt; /* Checkpoint retention number. */
uint32_t debug_log_cnt; /* Log file retention count */
+
/* AUTOMATIC FLAG VALUE GENERATION START */
#define WT_CONN_DEBUG_CKPT_RETAIN 0x1u
#define WT_CONN_DEBUG_CURSOR_COPY 0x2u
-#define WT_CONN_DEBUG_REALLOC_EXACT 0000u
+#define WT_CONN_DEBUG_REALLOC_EXACT 0x4u
#define WT_CONN_DEBUG_SLOW_CKPT 0x8u
/* AUTOMATIC FLAG VALUE GENERATION STOP */
uint64_t debug_flags;
diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c
index 956711943ed..9be945bb6c3 100644
--- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c
+++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c
@@ -332,6 +332,11 @@ __rollback_row_ondisk_fixup_key(WT_SESSION_IMPL *session, WT_PAGE *page, WT_ROW
tombstone->txnid = cbt->upd_value->tw.stop_txn;
tombstone->durable_ts = cbt->upd_value->tw.durable_stop_ts;
tombstone->start_ts = cbt->upd_value->tw.stop_ts;
+ __wt_verbose(session, WT_VERB_RTS,
+ "tombstone restored from history store (txnid: %" PRIu64
+ ", start_ts: %s, durable_ts: %s",
+ tombstone->txnid, __wt_timestamp_to_string(tombstone->start_ts, ts_string[0]),
+ __wt_timestamp_to_string(tombstone->durable_ts, ts_string[1]));
/*
* Set the flag to indicate that this update has been restored from history store
diff --git a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
index eda25c511bb..68c5fc7f9e9 100644
--- a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
@@ -85,10 +85,13 @@ typedef struct {
static volatile THREAD_TS th_ts[MAX_TH];
#define ENV_CONFIG_COMPAT ",compatibility=(release=\"2.9\")"
-#define ENV_CONFIG_DEF "create,log=(archive=false,file_max=10M,enabled)"
-#define ENV_CONFIG_TXNSYNC \
- "create,log=(archive=false,file_max=10M,enabled)," \
- "transaction_sync=(enabled,method=none)"
+#define ENV_CONFIG_DEF \
+ "create," \
+ "eviction_updates_trigger=95,eviction_updates_target=80," \
+ "log=(archive=false,file_max=10M,enabled)"
+#define ENV_CONFIG_TXNSYNC \
+ ENV_CONFIG_DEF \
+ ",transaction_sync=(enabled,method=none)"
#define ENV_CONFIG_REC "log=(archive=false,recover=on)"
typedef struct {
diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
index 8c69211d563..a9ebfcd085b 100644
--- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
@@ -85,7 +85,7 @@ static volatile uint64_t global_ts = 1;
#define ENV_CONFIG_DEF \
"cache_size=20M,create," \
"debug_mode=(table_logging=true,checkpoint_retention=5)," \
- "eviction_dirty_trigger=50,eviction_updates_trigger=50," \
+ "eviction_updates_trigger=95,eviction_updates_target=80," \
"log=(archive=true,file_max=10M,enabled),session_max=%d," \
"statistics=(fast),statistics_log=(wait=1,json=true),"
#define ENV_CONFIG_TXNSYNC \
diff --git a/src/third_party/wiredtiger/test/suite/test_gc01.py b/src/third_party/wiredtiger/test/suite/test_gc01.py
index ff6a0d6a85c..5ff54d036c2 100755
--- a/src/third_party/wiredtiger/test/suite/test_gc01.py
+++ b/src/third_party/wiredtiger/test/suite/test_gc01.py
@@ -82,7 +82,8 @@ class test_gc_base(wttest.WiredTigerTestCase):
# Test that checkpoint cleans the obsolete lookaside pages.
class test_gc01(test_gc_base):
# Force a small cache.
- conn_config = 'cache_size=50MB,log=(enabled),statistics=(all)'
+ conn_config = ('cache_size=50MB,eviction_updates_trigger=95,eviction_updates_target=80,'
+ 'log=(enabled),statistics=(all)')
session_config = 'isolation=snapshot'
def test_gc(self):