diff options
-rw-r--r-- | src/mongo/db/s/config/configsvr_shard_collection_command.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index 64b2249fbfb..a42e0b87659 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -895,15 +895,17 @@ public: // Make sure the cached metadata for the collection knows that we are now sharded catalogCache->invalidateShardedCollection(nss); - // Free the distlocks to allow the splits and migrations below to proceed. + // Free the collection distlock to allow the splits and migrations below to proceed. These + // operations do not take the database distlocks. collDistLock.reset(); - dbDistLock.reset(); - backwardsCompatibleDbDistLock.reset(); // Step 7. Migrate initial chunks to distribute them across shards. migrateAndFurtherSplitInitialChunks( opCtx, nss, numShards, shardIds, isEmpty, shardKeyPattern, allSplits); + dbDistLock.reset(); + backwardsCompatibleDbDistLock.reset(); + return true; } |