summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/log
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-04-09 19:00:15 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-09 09:23:51 +0000
commit96727ea47d7d5c29e4f77df0581224a7ee4bb8b1 (patch)
tree240af30e06980adba6a7f1d998c65e8d62ae7568 /src/third_party/wiredtiger/src/log
parent6e182b5c907f2965516b852311c9be6da05932d8 (diff)
downloadmongo-96727ea47d7d5c29e4f77df0581224a7ee4bb8b1.tar.gz
Import wiredtiger: da6c25fee0c5c9b0376df0dc19caa40a553cc5a2 from branch mongodb-4.4
ref: 5b5d798856..da6c25fee0 for: 4.5.1 WT-5527 Free the onpage updates when restoring update chains WT-5675 Prepare support with durable history: workgen changes WT-5778 Simplify __rec_append_orig_value WT-5796 Speed up verification of file's associated history store information WT-5811 Mark ASAN tests as running on a slow machine WT-5909 Coverity unused value issue WT-5930 (4.4-only) Journaled data from 4.2 binaries not recovered at startup WT-5932 Rollback to stable aborting on-disk updates for in-memory database WT-5938 Fix a memory corruption in rollback to stable WT-5941 Document how eviction works in durable history WT-5943 Consider WT_TS_NONE timestamped update also a valid update for rollback to stable WT-5944 Relax test_wt2853_perf performance parameters temporarily WT-5948 Search shouldn't ignore globally visible tombstone of history store WT-5952 Fix freeing updates racing with application threads WT-5953 Fix format CONFIG file "mmap_all" syntax incompatibility WT-5961 Respect write generations when constructing the root addr WT-5965 Ignore leading whitespace in format CONFIG files WT-5967 Remove named snapshot support WT-5978 Unstable prepared updates causing the update chain to be unnecessarily restored WT-5979 Add Evergreen release compatibility test for forward compatibility WT-5983 Remove diagnostic tests left over from WT-5043 WT-5985 Turn off format testing for relaxed isolation levels WT-5987 Turn off history store verification in the WT_SESSION.verify method WT-5988 Do not write log records as part recovery rollback to stable operation WT-5993 Restore disk page header version WT-5994 Turn off format testing for relaxed isolation levels (part 2)
Diffstat (limited to 'src/third_party/wiredtiger/src/log')
-rw-r--r--src/third_party/wiredtiger/src/log/log.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/log/log.c b/src/third_party/wiredtiger/src/log/log.c
index b7b7ff66c58..963b1998289 100644
--- a/src/third_party/wiredtiger/src/log/log.c
+++ b/src/third_party/wiredtiger/src/log/log.c
@@ -1574,6 +1574,33 @@ err:
}
/*
+ * __wt_log_compat_verify --
+ * Verify the last log when opening for the compatibility settings. This is separate because we
+ * need to do it very early in the startup process.
+ */
+int
+__wt_log_compat_verify(WT_SESSION_IMPL *session)
+{
+ WT_DECL_RET;
+ uint32_t lastlog, lognum;
+ u_int i, logcount;
+ char **logfiles;
+
+ lastlog = 0;
+
+ WT_ERR(__log_get_files(session, WT_LOG_FILENAME, &logfiles, &logcount));
+ for (i = 0; i < logcount; i++) {
+ WT_ERR(__wt_log_extract_lognum(session, logfiles[i], &lognum));
+ lastlog = WT_MAX(lastlog, lognum);
+ }
+ if (lastlog != 0)
+ WT_ERR(__log_open_verify(session, lastlog, NULL, NULL, NULL, NULL));
+err:
+ WT_TRET(__wt_fs_directory_list_free(session, &logfiles, logcount));
+ return (ret);
+}
+
+/*
* __wt_log_open --
* Open the appropriate log file for the connection. The purpose is to find the last log file
* that exists, open it and set our initial LSNs to the end of that file. If none exist, call