summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/s/flush_database_cache_updates_command.cpp2
-rw-r--r--src/mongo/db/s/shard_filtering_metadata_refresh.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/s/flush_database_cache_updates_command.cpp b/src/mongo/db/s/flush_database_cache_updates_command.cpp
index d1310e5f25f..4805e8c723f 100644
--- a/src/mongo/db/s/flush_database_cache_updates_command.cpp
+++ b/src/mongo/db/s/flush_database_cache_updates_command.cpp
@@ -178,7 +178,7 @@ public:
auto dssLock = DatabaseShardingState::DSSLock::lockShared(opCtx, dss);
if (auto criticalSectionSignal = dss->getCriticalSectionSignal(
- ShardingMigrationCriticalSection::kRead, dssLock)) {
+ ShardingMigrationCriticalSection::kWrite, dssLock)) {
oss.setMigrationCriticalSectionSignal(criticalSectionSignal);
}
}
diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp
index 37aac84a672..49f03ce476b 100644
--- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp
+++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp
@@ -75,7 +75,7 @@ bool joinDbVersionOperation(OperationContext* opCtx,
invariant(dssLock->has_value());
if (auto critSect =
- dss->getCriticalSectionSignal(ShardingMigrationCriticalSection::kRead, **dssLock)) {
+ dss->getCriticalSectionSignal(ShardingMigrationCriticalSection::kWrite, **dssLock)) {
LOGV2_DEBUG(6697201,
2,
"Waiting for exit from the critical section",