diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2020-03-29 10:52:41 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-10 17:31:40 +0000 |
commit | 7645ff98bb0f289f8eb1605cb743b414e5ded0fc (patch) | |
tree | 10c276e9c6c63d67ba64274ca848e4e85ad7f33b /src/mongo/db/db_raii.cpp | |
parent | bc94db6b53702214da703957606870b771deda7a (diff) | |
download | mongo-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.cpp | 4 |
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; } } |