summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/log/log.c
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-06-08 16:55:49 +1000
committerLuke Chen <luke.chen@mongodb.com>2018-06-08 16:55:49 +1000
commit52a8e76c75ffdae950def841ae4ca23538274120 (patch)
tree34bc4397cec84be288c6d0cf258e8688f890e973 /src/third_party/wiredtiger/src/log/log.c
parentf2ff14b25f86cceb47a298c8dfd4176e211e819b (diff)
downloadmongo-52a8e76c75ffdae950def841ae4ca23538274120.tar.gz
Import wiredtiger: d16557c82ca66ff220238299d0f7c9a182d1720e from branch mongodb-4.0
ref: c3eafe83e8..d16557c82c for: 4.0.0-rc5 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
Diffstat (limited to 'src/third_party/wiredtiger/src/log/log.c')
-rw-r--r--src/third_party/wiredtiger/src/log/log.c17
1 files changed, 13 insertions, 4 deletions
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.