summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Fuschetto <antonio.fuschetto@mongodb.com>2022-09-30 07:28:52 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-30 08:00:26 +0000
commit1723215716b31cdbcd9783673933426e1220afd1 (patch)
tree6a55a68e7623354d615984c04f95fdc419662e33
parentd04ce74fae19b2b02af63a6ac2a669f37426658b (diff)
downloadmongo-1723215716b31cdbcd9783673933426e1220afd1.tar.gz
SERVER-69898 Wait for the critical section catch-up phase before refreshing the DB version
-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 be96e307fe2..0fc2ec08d38 100644
--- a/src/mongo/db/s/flush_database_cache_updates_command.cpp
+++ b/src/mongo/db/s/flush_database_cache_updates_command.cpp
@@ -176,7 +176,7 @@ public:
const auto scopedDss = DatabaseShardingState::assertDbLockedAndAcquire(
opCtx, ns().dbName(), DSSAcquisitionMode::kShared);
criticalSectionSignal =
- scopedDss->getCriticalSectionSignal(ShardingMigrationCriticalSection::kRead);
+ scopedDss->getCriticalSectionSignal(ShardingMigrationCriticalSection::kWrite);
}
if (criticalSectionSignal)
diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp
index 480c90b2e41..b5174ae65bb 100644
--- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp
+++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp
@@ -72,7 +72,7 @@ bool joinDbVersionOperation(
invariant(scopedDss->has_value());
if (auto critSect =
- (**scopedDss)->getCriticalSectionSignal(ShardingMigrationCriticalSection::kRead)) {
+ (**scopedDss)->getCriticalSectionSignal(ShardingMigrationCriticalSection::kWrite)) {
LOGV2_DEBUG(6697201,
2,
"Waiting for exit from the critical section",