diff options
author | Marcos José Grillo Ramírez <marcos.grillo@mongodb.com> | 2020-01-30 12:18:48 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-03 12:17:22 +0000 |
commit | f9623edb15c177597c338b10a50ef557ea31131c (patch) | |
tree | ae6803d85db9564901598ce7de5d01ece2f4b919 /src/mongo/db/commands/mr.cpp | |
parent | b5134bcb006e74e2102de6e171a28931f84ea12f (diff) | |
download | mongo-f9623edb15c177597c338b10a50ef557ea31131c.tar.gz |
SERVER-45778 Rename getOrphanFilter to getOwnershipFilter and change the return type
Diffstat (limited to 'src/mongo/db/commands/mr.cpp')
-rw-r--r-- | src/mongo/db/commands/mr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index 8bc31f78e46..006969061c8 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -1415,10 +1415,10 @@ bool runMapReduce(OperationContext* opCtx, uassert(16149, "cannot run map reduce without the js engine", getGlobalScriptEngine()); - const auto metadata = [&] { + const auto collectionFilter = [&] { AutoGetCollectionForReadCommand autoColl(opCtx, config.nss); return CollectionShardingState::get(opCtx, config.nss) - ->getOrphansFilter(opCtx, autoColl.getCollection()); + ->getOwnershipFilter(opCtx, autoColl.getCollection()); }(); bool shouldHaveData = false; @@ -1513,9 +1513,9 @@ bool runMapReduce(OperationContext* opCtx, // Check to see if this is a new object we don't own yet because of a chunk // migration - if (metadata->isSharded()) { - ShardKeyPattern kp(metadata->getKeyPattern()); - if (!metadata->keyBelongsToMe(kp.extractShardKeyFromDoc(o))) { + if (collectionFilter.isSharded()) { + ShardKeyPattern kp(collectionFilter.getKeyPattern()); + if (!collectionFilter.keyBelongsToMe(kp.extractShardKeyFromDoc(o))) { continue; } } |