summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/op_observer_sharding_impl.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2020-04-20 10:44:27 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-21 10:53:38 +0000
commitd86b3e0b2c7d81822a03a2d47154d17d21143c76 (patch)
tree8fe5a7f28ef59ed1f92d70422a636984b60ece1f /src/mongo/db/s/op_observer_sharding_impl.cpp
parent10ee8c156f747c55895067cb418827c57c59557b (diff)
downloadmongo-d86b3e0b2c7d81822a03a2d47154d17d21143c76.tar.gz
SERVER-47472 Remove usages of checkShardVersionOrThrow_DEPRECATED from the OpObservers
Diffstat (limited to 'src/mongo/db/s/op_observer_sharding_impl.cpp')
-rw-r--r--src/mongo/db/s/op_observer_sharding_impl.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mongo/db/s/op_observer_sharding_impl.cpp b/src/mongo/db/s/op_observer_sharding_impl.cpp
index c6eb5abab8e..8ba84469ff8 100644
--- a/src/mongo/db/s/op_observer_sharding_impl.cpp
+++ b/src/mongo/db/s/op_observer_sharding_impl.cpp
@@ -103,15 +103,11 @@ void OpObserverShardingImpl::shardObserveInsertOp(OperationContext* opCtx,
const repl::OpTime& opTime,
const bool fromMigrate,
const bool inMultiDocumentTransaction) {
- auto* const csr = (nss == NamespaceString::kSessionTransactionsTableNamespace || fromMigrate)
- ? nullptr
- : CollectionShardingRuntime::get(opCtx, nss);
-
- if (!csr) {
+ if (nss == NamespaceString::kSessionTransactionsTableNamespace || fromMigrate)
return;
- }
- csr->checkShardVersionOrThrow_DEPRECATED(opCtx);
+ auto* const csr = CollectionShardingRuntime::get(opCtx, nss);
+ csr->checkShardVersionOrThrow(opCtx);
if (inMultiDocumentTransaction) {
assertIntersectingChunkHasNotMoved(opCtx, csr, insertedDoc);
@@ -133,7 +129,7 @@ void OpObserverShardingImpl::shardObserveUpdateOp(OperationContext* opCtx,
const repl::OpTime& prePostImageOpTime,
const bool inMultiDocumentTransaction) {
auto* const csr = CollectionShardingRuntime::get(opCtx, nss);
- csr->checkShardVersionOrThrow_DEPRECATED(opCtx);
+ csr->checkShardVersionOrThrow(opCtx);
if (inMultiDocumentTransaction) {
assertIntersectingChunkHasNotMoved(opCtx, csr, postImageDoc);
@@ -154,7 +150,7 @@ void OpObserverShardingImpl::shardObserveDeleteOp(OperationContext* opCtx,
const repl::OpTime& preImageOpTime,
const bool inMultiDocumentTransaction) {
auto* const csr = CollectionShardingRuntime::get(opCtx, nss);
- csr->checkShardVersionOrThrow_DEPRECATED(opCtx);
+ csr->checkShardVersionOrThrow(opCtx);
if (inMultiDocumentTransaction) {
assertIntersectingChunkHasNotMoved(opCtx, csr, documentKey);