diff options
author | Chenhao Qu <chenhao.qu@mongodb.com> | 2022-01-12 21:38:22 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-12 11:09:45 +0000 |
commit | 72b107dfd5c09a468738140eec4b9aea2a9da4c3 (patch) | |
tree | 869637f80d48b4ca3839af1ead478ecb6c770347 | |
parent | 029e3a0ebd584a501f3431ad34262f31325f5e39 (diff) | |
download | mongo-72b107dfd5c09a468738140eec4b9aea2a9da4c3.tar.gz |
Import wiredtiger: 322951cb18905cdea2ae3004906c8e8e4e27462a from branch mongodb-master
ref: b8aee83e55..322951cb18
for: 5.3.0
WT-8598 Avoid checkpoint cleanup always on shutdown
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_sync.c | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/connection.h | 37 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn.c | 1 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c | 2 |
5 files changed, 24 insertions, 22 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index a7d8a9aeac7..1d218295d2f 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-master", - "commit": "b8aee83e55abb299c6a8476baeaa82c0221a6719" + "commit": "322951cb18905cdea2ae3004906c8e8e4e27462a" } diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c index df8dab28f4a..72b66ed006f 100644 --- a/src/third_party/wiredtiger/src/btree/bt_sync.c +++ b/src/third_party/wiredtiger/src/btree/bt_sync.c @@ -396,7 +396,7 @@ __sync_page_skip(WT_SESSION_IMPL *session, WT_REF *ref, void *context, bool *ski } /* Don't read pages into cache during startup or shutdown phase. */ - if (F_ISSET(S2C(session), WT_CONN_RECOVERING | WT_CONN_CLOSING_TIMESTAMP)) { + if (F_ISSET(S2C(session), WT_CONN_RECOVERING | WT_CONN_CLOSING_CHECKPOINT)) { *skipp = true; return (0); } @@ -557,7 +557,7 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop) * reads all of the internal pages to improve cleanup). */ if (btree->type == BTREE_ROW) - internal_cleanup = !F_ISSET(conn, WT_CONN_RECOVERING | WT_CONN_CLOSING_TIMESTAMP); + internal_cleanup = !F_ISSET(conn, WT_CONN_RECOVERING | WT_CONN_CLOSING_CHECKPOINT); else { LF_SET(WT_READ_CACHE); internal_cleanup = false; diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h index 9ca75eeaed3..f0b23fa0b1e 100644 --- a/src/third_party/wiredtiger/src/include/connection.h +++ b/src/third_party/wiredtiger/src/include/connection.h @@ -626,24 +626,25 @@ struct __wt_connection_impl { #define WT_CONN_CKPT_GATHER 0x000004u #define WT_CONN_CKPT_SYNC 0x000008u #define WT_CONN_CLOSING 0x000010u -#define WT_CONN_CLOSING_NO_MORE_OPENS 0x000020u -#define WT_CONN_CLOSING_TIMESTAMP 0x000040u -#define WT_CONN_COMPATIBILITY 0x000080u -#define WT_CONN_DATA_CORRUPTION 0x000100u -#define WT_CONN_EVICTION_RUN 0x000200u -#define WT_CONN_FILE_CLOSE_SYNC 0x000400u -#define WT_CONN_HS_OPEN 0x000800u -#define WT_CONN_INCR_BACKUP 0x001000u -#define WT_CONN_IN_MEMORY 0x002000u -#define WT_CONN_LEAK_MEMORY 0x004000u -#define WT_CONN_LSM_MERGE 0x008000u -#define WT_CONN_OPTRACK 0x010000u -#define WT_CONN_PANIC 0x020000u -#define WT_CONN_READONLY 0x040000u -#define WT_CONN_RECONFIGURING 0x080000u -#define WT_CONN_RECOVERING 0x100000u -#define WT_CONN_SALVAGE 0x200000u -#define WT_CONN_WAS_BACKUP 0x400000u +#define WT_CONN_CLOSING_CHECKPOINT 0x000020u +#define WT_CONN_CLOSING_NO_MORE_OPENS 0x000040u +#define WT_CONN_CLOSING_TIMESTAMP 0x000080u +#define WT_CONN_COMPATIBILITY 0x000100u +#define WT_CONN_DATA_CORRUPTION 0x000200u +#define WT_CONN_EVICTION_RUN 0x000400u +#define WT_CONN_FILE_CLOSE_SYNC 0x000800u +#define WT_CONN_HS_OPEN 0x001000u +#define WT_CONN_INCR_BACKUP 0x002000u +#define WT_CONN_IN_MEMORY 0x004000u +#define WT_CONN_LEAK_MEMORY 0x008000u +#define WT_CONN_LSM_MERGE 0x010000u +#define WT_CONN_OPTRACK 0x020000u +#define WT_CONN_PANIC 0x040000u +#define WT_CONN_READONLY 0x080000u +#define WT_CONN_RECONFIGURING 0x100000u +#define WT_CONN_RECOVERING 0x200000u +#define WT_CONN_SALVAGE 0x400000u +#define WT_CONN_WAS_BACKUP 0x800000u /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */ uint32_t flags; }; diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c index d5e277f41ce..d4a535cce49 100644 --- a/src/third_party/wiredtiger/src/txn/txn.c +++ b/src/third_party/wiredtiger/src/txn/txn.c @@ -2378,6 +2378,7 @@ __wt_txn_global_shutdown(WT_SESSION_IMPL *session, const char **cfg) * before shutting down all the subsystems. We have shut down all user sessions, but send in * true for waiting for internal races. */ + F_SET(conn, WT_CONN_CLOSING_CHECKPOINT); WT_TRET(__wt_config_gets(session, cfg, "use_timestamp", &cval)); ckpt_cfg = "use_timestamp=false"; if (cval.val != 0) { 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 818eaf079c5..d23e0fe1ad4 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 @@ -1623,7 +1623,7 @@ __rollback_to_stable_btree_apply( * 2. Table has timestamped updates without a stable timestamp. */ if ((F_ISSET(S2C(session), WT_CONN_RECOVERING) || - F_ISSET(S2C(session), WT_CONN_CLOSING_TIMESTAMP)) && + F_ISSET(S2C(session), WT_CONN_CLOSING_CHECKPOINT)) && (addr_size == 0 || (rollback_timestamp == WT_TS_NONE && max_durable_ts != WT_TS_NONE))) { __wt_verbose_multi(session, WT_VERB_RECOVERY_RTS(session), "skip rollback to stable on file %s because %s", uri, |