diff options
author | Daniel Gottlieb <danny.gottlieb@gmail.com> | 2017-08-08 16:14:56 -0400 |
---|---|---|
committer | Daniel Gottlieb <danny.gottlieb@gmail.com> | 2017-08-08 16:14:56 -0400 |
commit | 6de1435b6f37aae5c79bbb4440ee84f6d36fe1e1 (patch) | |
tree | b1125311d5ef180cae98cf9e120ecabc80fbe73a /src/mongo/db | |
parent | 3f8e2edf1cd26689120b80b0b58983996bb8a7ce (diff) | |
download | mongo-6de1435b6f37aae5c79bbb4440ee84f6d36fe1e1.tar.gz |
Revert "SERVER-30295: Connect FCV to WiredTiger compatibility version."
This reverts commit c5a6b74a50e3fa39b1e24b0d4c2463d530bc9885.
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 31 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp | 4 |
2 files changed, 11 insertions, 24 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index 99b25bc5f15..0cb016beb8d 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -345,7 +345,7 @@ WiredTigerKVEngine::WiredTigerKVEngine(const std::string& canonicalName, ss << "eviction=(threads_min=4,threads_max=4),"; ss << "config_base=false,"; ss << "statistics=(fast),"; - + ss << "compatibility=(release=\"2.9\"),"; // The setting may have a later setting override it if not using the journal. We make it // unconditional here because even nojournal may need this setting if it is a transition // from using the journal. @@ -491,37 +491,25 @@ void WiredTigerKVEngine::cleanShutdown() { } const bool keepOldBehavior = true; - const bool needsDowngrade = !_readOnly && + const bool needsDowngrade = !keepOldBehavior && !_readOnly && serverGlobalParams.featureCompatibility.version.load() == ServerGlobalParams::FeatureCompatibility::Version::k34; - if (keepOldBehavior && needsDowngrade) { - // When Recover to a timestamp is turned on (SERVER-30349), this block can go - // away. The 3.4 downgrade block below that restarts WT will run the following - // `reconfigure` at the very end after reverting all table logging. - log() << "Downgrading WiredTiger to 2.9"; - invariantWTOK(_conn->reconfigure(_conn, "compatibility=(release=2.9)")); - } invariantWTOK(_conn->close(_conn, closeConfig)); _conn = nullptr; // If FCV 3.4, enable WT logging on all tables. - if (!keepOldBehavior && needsDowngrade) { - // Steps for downgrading: - // - // 1) Close and reopen WiredTiger. This clears out any leftover cursors that get in - // the way of performing the downgrade. - // - // 2) Enable WiredTiger logging on all tables. - // - // 3) Reconfigure the WiredTiger to release compatibility 2.9. The WiredTiger version - // shipped with MongoDB 3.4 will always refuse to start up without this reconfigure - // being successful. Doing this last prevents MongoDB running in 3.4 with only some - // underlying tables being logged. + if (needsDowngrade) { log() << "Downgrading files to FCV 3.4"; WT_CONNECTION* conn; std::stringstream openConfig; openConfig << _wtOpenConfig << ",log=(archive=false)"; + + const bool NEW_WT_DROPPED = false; + if (NEW_WT_DROPPED) { + openConfig << ",compatibility=(release=2.9)"; + } + invariantWTOK( wiredtiger_open(_path.c_str(), &_eventHandler, openConfig.str().c_str(), &conn)); @@ -550,7 +538,6 @@ void WiredTigerKVEngine::cleanShutdown() { tableCursor->close(tableCursor); session->close(session, nullptr); - invariantWTOK(conn->reconfigure(conn, "compatibility=(release=2.9)")); invariantWTOK(conn->close(conn, closeConfig)); } } diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp index 862dd359664..a367d2d61a6 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp @@ -467,8 +467,8 @@ Status WiredTigerUtil::setTableLogging(OperationContext* opCtx, const std::strin } Status WiredTigerUtil::setTableLogging(WT_SESSION* session, const std::string& uri, bool on) { - const bool keepOldBehavior = true; - if (keepOldBehavior) { + const bool NEW_WT_DROPPED = false; + if (!NEW_WT_DROPPED) { return Status::OK(); } |