From eca08e963444d77209f093a6137f5d70f7519e21 Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Sat, 25 Jan 2020 14:36:27 +0000 Subject: SERVER-45697 unlock RSTL based on requested index build method rather than feature check --- src/mongo/db/index_builds_coordinator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp index 8730ae99e73..5697927b83c 100644 --- a/src/mongo/db/index_builds_coordinator.cpp +++ b/src/mongo/db/index_builds_coordinator.cpp @@ -1545,7 +1545,7 @@ void IndexBuildsCoordinator::_runIndexBuildInner(OperationContext* opCtx, // X lock while a prepared transaction held a Collection IX lock, and a step down was // waiting to acquire the RSTL in mode X. // TODO(SERVER-44045): Revisit this logic for the non-two phase index build case. - if (!supportsTwoPhaseIndexBuild()) { + if (IndexBuildProtocol::kTwoPhase != replState->protocol) { const bool unlocked = opCtx->lockState()->unlockRSTLforPrepare(); invariant(unlocked); } -- cgit v1.2.1