summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-08-08 13:30:54 -0400
committerMaria van Keulen <maria@mongodb.com>2017-08-09 10:22:00 -0400
commit2de7b036fd98ba618d4a9cf4cbe1cf8e81132d48 (patch)
treef4604c1220d318c8f15f332f37cc017844ad991a /src/mongo/db/catalog
parent373e543253801f53dfc881f46f6346c96f43e70d (diff)
downloadmongo-2de7b036fd98ba618d4a9cf4cbe1cf8e81132d48.tar.gz
SERVER-30500 do not assign UUIDs to system.indexes on collMod/upgrade
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r--src/mongo/db/catalog/coll_mod.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/coll_mod.cpp b/src/mongo/db/catalog/coll_mod.cpp
index dcb49a5d9a3..4233c92f37a 100644
--- a/src/mongo/db/catalog/coll_mod.cpp
+++ b/src/mongo/db/catalog/coll_mod.cpp
@@ -390,8 +390,9 @@ Status _collModInternal(OperationContext* opCtx,
setCollectionOptionFlag(opCtx, coll, cmr.noPadding, result);
// Modify collection UUID if we are upgrading or downgrading. This is a no-op if we have
- // already upgraded or downgraded.
- if (upgradeUUID) {
+ // already upgraded or downgraded. As we don't assign UUIDs to system.indexes (SERVER-29926),
+ // don't implicitly upgrade them on collMod either.
+ if (upgradeUUID && !nss.isSystemDotIndexes()) {
if (uuid && !coll->uuid()) {
CollectionCatalogEntry* cce = coll->getCatalogEntry();
cce->addUUID(opCtx, uuid.get(), coll);