summaryrefslogtreecommitdiff
path: root/src/mongo/s/stale_shard_version_helpers.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/s/stale_shard_version_helpers.cpp
parent8863b04c282557081cf2634bce0e26f4fa5389b2 (diff)
downloadmongo-274cb477d2a1b64ac81b85e9f1b3172387ce0184.tar.gz
SERVER-74486 Always include tenant in collection name attributes in error messages
Diffstat (limited to 'src/mongo/s/stale_shard_version_helpers.cpp')
-rw-r--r--src/mongo/s/stale_shard_version_helpers.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/s/stale_shard_version_helpers.cpp b/src/mongo/s/stale_shard_version_helpers.cpp
index aad9bf091ad..881880fd67e 100644
--- a/src/mongo/s/stale_shard_version_helpers.cpp
+++ b/src/mongo/s/stale_shard_version_helpers.cpp
@@ -82,8 +82,9 @@ void checkErrorStatusAndMaxRetries(const Status& status,
// epoch refresh. If no shard is provided, then the epoch is stale and we must refresh.
if (auto staleInfo = status.extraInfo<StaleConfigInfo>()) {
invariant(staleInfo->getNss() == nss,
- str::stream() << "StaleConfig error on unexpected namespace. Expected " << nss
- << ", received " << staleInfo->getNss());
+ str::stream() << "StaleConfig error on unexpected namespace. Expected "
+ << nss.toStringForErrorMsg() << ", received "
+ << staleInfo->getNss().toStringForErrorMsg());
catalogCache->invalidateShardOrEntireCollectionEntryForShardedCollection(
nss, staleInfo->getVersionWanted(), staleInfo->getShardId());
} else {