diff options
author | Randolph Tan <randolph@10gen.com> | 2015-01-23 17:30:27 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2015-02-09 16:33:33 -0500 |
commit | 2bdd030e14b304d970a0e0cc614344f80400c6e6 (patch) | |
tree | de1d91340e12c37cab84d3d53f84c3a2b118cf8e | |
parent | a1a1b60582d4dd7557c7fa40628342e1e030d1ce (diff) | |
download | mongo-2bdd030e14b304d970a0e0cc614344f80400c6e6.tar.gz |
SERVER-16984 UpdateLifecycleImpl can return empty collectionMetadata even if ns is sharded
(cherry picked from commit 70c51f2644cd56678748fbe877e987903f86f3ab)
-rw-r--r-- | src/mongo/db/ops/update_lifecycle_impl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/ops/update_lifecycle_impl.cpp b/src/mongo/db/ops/update_lifecycle_impl.cpp index 87648c37403..fbdee094885 100644 --- a/src/mongo/db/ops/update_lifecycle_impl.cpp +++ b/src/mongo/db/ops/update_lifecycle_impl.cpp @@ -38,9 +38,10 @@ namespace mongo { namespace { CollectionMetadataPtr getMetadata(const NamespaceString& nsString) { - if (shardingState.needCollectionMetadata(nsString.ns())) { + if (shardingState.enabled()) { return shardingState.getCollectionMetadata(nsString.ns()); } + return CollectionMetadataPtr(); } } |