summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2020-03-29 10:52:41 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-10 17:31:40 +0000
commit7645ff98bb0f289f8eb1605cb743b414e5ded0fc (patch)
tree10c276e9c6c63d67ba64274ca848e4e85ad7f33b /src/mongo/db/db_raii.cpp
parentbc94db6b53702214da703957606870b771deda7a (diff)
downloadmongo-7645ff98bb0f289f8eb1605cb743b414e5ded0fc.tar.gz
SERVER-46703 Make `checkShardVersionOrThrow` throw SSV if the metadata is not known
Introduces a checkShardVersionOKOrThrow_DEPRECATED variant so that we can incrementally fix the places, which are not prepared to catch StaleConfig exceptions.
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r--src/mongo/db/db_raii.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp
index 26f83b77d05..9578f5b7be5 100644
--- a/src/mongo/db/db_raii.cpp
+++ b/src/mongo/db/db_raii.cpp
@@ -350,7 +350,7 @@ AutoGetCollectionForReadCommand::AutoGetCollectionForReadCommand(
// use an empty plan.
invariant(!_autoCollForRead.getView() || !_autoCollForRead.getCollection());
auto css = CollectionShardingState::get(opCtx, _autoCollForRead.getNss());
- css->checkShardVersionOrThrow(opCtx);
+ css->checkShardVersionOrThrow_DEPRECATED(opCtx);
}
OldClientContext::OldClientContext(OperationContext* opCtx, const std::string& ns, bool doVersion)
@@ -371,7 +371,7 @@ OldClientContext::OldClientContext(OperationContext* opCtx, const std::string& n
break;
default:
CollectionShardingState::get(_opCtx, NamespaceString(ns))
- ->checkShardVersionOrThrow(_opCtx);
+ ->checkShardVersionOrThrow_DEPRECATED(_opCtx);
break;
}
}