From f9623edb15c177597c338b10a50ef557ea31131c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Jos=C3=A9=20Grillo=20Ram=C3=ADrez?= Date: Thu, 30 Jan 2020 12:18:48 +0100 Subject: SERVER-45778 Rename getOrphanFilter to getOwnershipFilter and change the return type --- src/mongo/db/s/op_observer_sharding_impl.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mongo/db/s/op_observer_sharding_impl.cpp') 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. -- cgit v1.2.1