From f84654bc3cf814ae75b8454bcf52bc2929ec53ea Mon Sep 17 00:00:00 2001 From: Pierlauro Sciarelli Date: Mon, 15 Jun 2020 14:13:06 +0000 Subject: SERVER-48783 Critical section should not be entered when performing a shard version recovery --- src/mongo/db/s/shard_filtering_metadata_refresh.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/mongo/db/s/shard_filtering_metadata_refresh.cpp') diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp index 47e5a3835f1..18e1b8da13b 100644 --- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp +++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp @@ -102,9 +102,6 @@ SharedSemiFuture recoverRefreshShardVersion(ServiceContext* serviceContext auto* const csr = CollectionShardingRuntime::get(opCtx.get(), nss); auto csrLock = CollectionShardingRuntime::CSRLock::lockExclusive(opCtx.get(), csr); csr->resetShardVersionRecoverRefreshFuture(csrLock); - if (runRecover) { - csr->exitCriticalSection(opCtx.get()); - } }); if (runRecover) { @@ -194,11 +191,6 @@ void onShardVersionMismatch(OperationContext* opCtx, csr->getCriticalSectionSignal(opCtx, ShardingMigrationCriticalSection::kWrite); if (!inRecoverOrRefresh && !critSecSignal) { - if (runRecover) { - CollectionShardingRuntime::get(opCtx, nss) - ->enterCriticalSectionCatchUpPhase(csrLock); - } - csr->setShardVersionRecoverRefreshFuture( recoverRefreshShardVersion(opCtx->getServiceContext(), nss, runRecover), csrLock); -- cgit v1.2.1