diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-09-02 16:34:58 +1000 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2020-09-02 16:34:58 +1000 |
commit | ad91a93a5a31e175f5cbf8c69561e788bbc55ce1 (patch) | |
tree | 62cedf0a990059a3d9020583f4ee14da57005151 | |
parent | 95ea09d61932f51a37a63a10f4d0e0c1fced4723 (diff) | |
download | mongo-ad91a93a5a31e175f5cbf8c69561e788bbc55ce1.tar.gz |
Import wiredtiger: 579966149b9094922f22d9bd7e8f3b8b9db1ccf7 from branch mongodb-4.4r4.4.1-rc3r4.4.1
ref: af22169ab2..579966149b
for: 4.4.2
WT-6623 Set the connection level file id in recovery file scan
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_recover.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index d5dcda8618f..a2af96455f4 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": "af22169ab22adeb7abba4628ae4173bcf6b5b23d" + "commit": "579966149b9094922f22d9bd7e8f3b8b9db1ccf7" } diff --git a/src/third_party/wiredtiger/src/txn/txn_recover.c b/src/third_party/wiredtiger/src/txn/txn_recover.c index 9de0f333193..bc60efa5d51 100644 --- a/src/third_party/wiredtiger/src/txn/txn_recover.c +++ b/src/third_party/wiredtiger/src/txn/txn_recover.c @@ -558,6 +558,13 @@ __recovery_file_scan(WT_RECOVERY *r) WT_RET(__recovery_setup_file(r, uri, config)); } WT_RET_NOTFOUND_OK(ret); + + /* + * Set the connection level file id tracker, as such upon creation of a new file we'll begin + * from the latest file id. + */ + S2C(r->session)->next_file_id = r->max_fileid; + return (0); } @@ -683,7 +690,6 @@ __wt_txn_recover(WT_SESSION_IMPL *session, const char *cfg[]) * the files. */ metafile = &r.files[WT_METAFILE_ID]; - conn->next_file_id = r.max_fileid; if (FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED) && WT_IS_MAX_LSN(&metafile->ckpt_lsn) && !WT_IS_MAX_LSN(&r.max_ckpt_lsn)) @@ -814,8 +820,6 @@ __wt_txn_recover(WT_SESSION_IMPL *session, const char *cfg[]) ret = 0; WT_ERR(ret); - conn->next_file_id = r.max_fileid; - done: WT_ERR(__recovery_set_checkpoint_timestamp(&r)); WT_ERR(__recovery_set_oldest_timestamp(&r)); |