diff options
author | Randolph Tan <randolph@10gen.com> | 2019-06-18 14:29:46 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2019-06-27 14:08:59 -0400 |
commit | 0d07bf5e7a72a5bce3f7d7d681a71d7ecfe7eb8c (patch) | |
tree | 6316b1ceee6a890fe075873bb8af853ba37dc750 /src/mongo/db/s/shard_filtering_metadata_refresh.cpp | |
parent | d6834482ef9bbca8fd81e82483dedde965de9574 (diff) | |
download | mongo-0d07bf5e7a72a5bce3f7d7d681a71d7ecfe7eb8c.tar.gz |
SERVER-40258 Relax locking requirements for sharding metadata refresh on shards
Diffstat (limited to 'src/mongo/db/s/shard_filtering_metadata_refresh.cpp')
-rw-r--r-- | src/mongo/db/s/shard_filtering_metadata_refresh.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp index 78dbafcae2d..155be7189d5 100644 --- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp +++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp @@ -153,8 +153,7 @@ ChunkVersion forceShardFilteringMetadataRefresh(OperationContext* opCtx, if (!cm) { // No chunk manager, so unsharded. - // Exclusive collection lock needed since we're now changing the metadata - AutoGetCollection autoColl(opCtx, nss, MODE_X); + AutoGetCollection autoColl(opCtx, nss, MODE_IX); CollectionShardingRuntime::get(opCtx, nss) ->setFilteringMetadata(opCtx, CollectionMetadata()); @@ -181,7 +180,7 @@ ChunkVersion forceShardFilteringMetadataRefresh(OperationContext* opCtx, } // Exclusive collection lock needed since we're now changing the metadata - AutoGetCollection autoColl(opCtx, nss, MODE_X); + AutoGetCollection autoColl(opCtx, nss, MODE_IX); auto* const css = CollectionShardingRuntime::get(opCtx, nss); { |