diff options
author | Haley Connelly <haley.connelly@mongodb.com> | 2020-07-21 19:16:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-07 22:18:46 +0000 |
commit | 426ed301b2e61107e82822764a855feb27168742 (patch) | |
tree | 4f5a38722f2e658c80ba2be3da8935e9c84415e7 /src/mongo/db/namespace_string.cpp | |
parent | f0bd888de22307dad1825323cadd3b708f670ae0 (diff) | |
download | mongo-426ed301b2e61107e82822764a855feb27168742.tar.gz |
SERVER-49290 Support running $lookup locally on shard for config.cache.chunks.* namespaces
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
-rw-r--r-- | src/mongo/db/namespace_string.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/namespace_string.cpp b/src/mongo/db/namespace_string.cpp index f2b8f148779..6928d8da953 100644 --- a/src/mongo/db/namespace_string.cpp +++ b/src/mongo/db/namespace_string.cpp @@ -231,12 +231,16 @@ bool NamespaceString::isNamespaceAlwaysUnsharded() const { return true; if (ns() == "config.cache.databases" || ns() == "config.cache.collections" || - (db() == "config" && coll().startsWith("cache.chunks"))) + isConfigDotCacheDotChunks()) return true; return false; } +bool NamespaceString::isConfigDotCacheDotChunks() const { + return db() == "config" && coll().startsWith("cache.chunks."); +} + bool NamespaceString::isReplicated() const { if (isLocal()) { return false; |