summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
diff options
context:
space:
mode:
authorSophia Tan <sophia_tll@hotmail.com>2023-04-18 07:41:17 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-18 08:57:59 +0000
commit274cb477d2a1b64ac81b85e9f1b3172387ce0184 (patch)
treee89f778fa52a40413403b6a125b69271cf8469c0 /src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
parent8863b04c282557081cf2634bce0e26f4fa5389b2 (diff)
downloadmongo-274cb477d2a1b64ac81b85e9f1b3172387ce0184.tar.gz
SERVER-74486 Always include tenant in collection name attributes in error messages
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
index 1c64d459439..f11bcd2796e 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
@@ -693,11 +693,11 @@ KeyString::Version WiredTigerIndex::_handleVersionInfo(OperationContext* ctx,
if (!version.isOK()) {
auto collectionNamespace = desc->getEntry()->getNSSFromCatalog(ctx);
Status versionStatus = version.getStatus();
- Status indexVersionStatus(ErrorCodes::UnsupportedFormat,
- str::stream()
- << versionStatus.reason() << " Index: {name: "
- << desc->indexName() << ", ns: " << collectionNamespace
- << "} - version either too old or too new for this mongod.");
+ Status indexVersionStatus(
+ ErrorCodes::UnsupportedFormat,
+ str::stream() << versionStatus.reason() << " Index: {name: " << desc->indexName()
+ << ", ns: " << collectionNamespace.toStringForErrorMsg()
+ << "} - version either too old or too new for this mongod.");
fassertFailedWithStatus(28579, indexVersionStatus);
}
_dataFormatVersion = version.getValue();
@@ -711,7 +711,7 @@ KeyString::Version WiredTigerIndex::_handleVersionInfo(OperationContext* ctx,
Status versionStatus(ErrorCodes::UnsupportedFormat,
str::stream()
<< "Index: {name: " << desc->indexName()
- << ", ns: " << collectionNamespace
+ << ", ns: " << collectionNamespace.toStringForErrorMsg()
<< "} has incompatible format version: " << _dataFormatVersion);
fassertFailedWithStatusNoTrace(31179, versionStatus);
}