diff options
author | Maria van Keulen <maria@mongodb.com> | 2017-11-08 17:08:46 -0500 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2017-11-10 17:34:47 -0500 |
commit | 77fbada9b93dfa474d41216baa19f556e75bc8ca (patch) | |
tree | 913f5fee1db47eac71c709f966a220afc5e8efc6 | |
parent | dfd1d2c8317d1e9fcddcac5adf118a636caae687 (diff) | |
download | mongo-77fbada9b93dfa474d41216baa19f556e75bc8ca.tar.gz |
SERVER-31870 Clarify 3.6 upgrade-related startup error messages
-rw-r--r-- | src/mongo/db/db.cpp | 19 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 2 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 2d191c38220..0c89f32d262 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -180,6 +180,10 @@ using std::endl; namespace { +constexpr StringData upgradeLink = "http://dochub.mongodb.org/core/3.6-upgrade-fcv"_sd; +constexpr StringData mustDowngradeErrorMsg = + "UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details."_sd; + Status restoreMissingFeatureCompatibilityVersionDocument(OperationContext* opCtx, const std::vector<std::string>& dbNames) { bool isMmapV1 = opCtx->getServiceContext()->getGlobalStorageEngine()->isMmapV1(); @@ -204,8 +208,7 @@ Status restoreMissingFeatureCompatibilityVersionDocument(OperationContext* opCtx } if (!collsHaveUuids) { - return {ErrorCodes::MustDowngrade, - "Cannot restore featureCompatibilityVersion document. A 3.4 binary must be used."}; + return {ErrorCodes::MustDowngrade, mustDowngradeErrorMsg}; } // Restore the featureCompatibilityVersion document if it is missing. @@ -540,8 +543,13 @@ StatusWith<bool> repairDatabasesAndCheckVersion(OperationContext* opCtx) { // but with any value other than "3.4" or "3.6". This includes unexpected // cases with no path forward such as the FCV value not being a string. return {ErrorCodes::MustDowngrade, - "Cannot parse the feature compatibility document. If you are " - "trying to upgrade from 3.2, please use a 3.4 binary."}; + str::stream() + << "UPGRADE PROBLEM: Unable to parse the " + "featureCompatibilityVersion document. The data files need " + "to be fully upgraded to version 3.4 before attempting an " + "upgrade to 3.6. If you are upgrading to 3.6, see " + << upgradeLink + << "."}; } fcvDocumentExists = true; auto version = swVersion.getValue(); @@ -651,8 +659,7 @@ StatusWith<bool> repairDatabasesAndCheckVersion(OperationContext* opCtx) { } fassertFailedNoTrace(40652); } else { - return {ErrorCodes::MustDowngrade, - "There is no feature compatibility document. A 3.4 binary must be used."}; + return {ErrorCodes::MustDowngrade, mustDowngradeErrorMsg}; } } diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index 82f0491aa2a..509b6864744 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -526,7 +526,7 @@ void WiredTigerKVEngine::cleanShutdown() { // 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. - log() << "Downgrading files to FCV 3.4"; + LOG(1) << "Downgrading WiredTiger tables to release compatibility 2.9"; WT_CONNECTION* conn; std::stringstream openConfig; openConfig << _wtOpenConfig << ",log=(archive=false)"; |