summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/op_observer_sharding_impl.cpp
diff options
context:
space:
mode:
authorMarcos José Grillo Ramírez <marcos.grillo@mongodb.com>2020-01-30 12:18:48 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-03 12:17:22 +0000
commitf9623edb15c177597c338b10a50ef557ea31131c (patch)
treeae6803d85db9564901598ce7de5d01ece2f4b919 /src/mongo/db/s/op_observer_sharding_impl.cpp
parentb5134bcb006e74e2102de6e171a28931f84ea12f (diff)
downloadmongo-f9623edb15c177597c338b10a50ef557ea31131c.tar.gz
SERVER-45778 Rename getOrphanFilter to getOwnershipFilter and change the return type
Diffstat (limited to 'src/mongo/db/s/op_observer_sharding_impl.cpp')
-rw-r--r--src/mongo/db/s/op_observer_sharding_impl.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/s/op_observer_sharding_impl.cpp b/src/mongo/db/s/op_observer_sharding_impl.cpp
index ab0022dd860..7a815b67c4a 100644
--- a/src/mongo/db/s/op_observer_sharding_impl.cpp
+++ b/src/mongo/db/s/op_observer_sharding_impl.cpp
@@ -55,15 +55,14 @@ void assertIntersectingChunkHasNotMoved(OperationContext* opCtx,
if (!repl::ReadConcernArgs::get(opCtx).getArgsAtClusterTime())
return;
- const auto metadata = csr->getOrphansFilter(opCtx, true /* isCollection */);
- if (!metadata->isSharded())
+ const auto collectionFilter = csr->getOwnershipFilter(opCtx, true /* isCollection */);
+ if (!collectionFilter.isSharded())
return;
- auto chunkManager = metadata->getChunkManager();
- auto shardKey = chunkManager->getShardKeyPattern().extractShardKeyFromDoc(doc);
+ auto shardKey = collectionFilter.extractShardKeyFromDoc(doc);
// We can assume the simple collation because shard keys do not support non-simple collations.
- auto chunk = chunkManager->findIntersectingChunkWithSimpleCollation(shardKey);
+ auto chunk = collectionFilter.findIntersectingChunkWithSimpleCollation(shardKey);
// Throws if the chunk has moved since the timestamp of the running transaction's atClusterTime
// read concern parameter.