summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2020-01-25 14:36:27 +0000
committerevergreen <evergreen@mongodb.com>2020-01-25 14:36:27 +0000
commiteca08e963444d77209f093a6137f5d70f7519e21 (patch)
tree9dffed93d0921e67f391bc719f3209f5cc8b32db
parent46638ed945bfafd1c8c31c9654885283b674c4a9 (diff)
downloadmongo-eca08e963444d77209f093a6137f5d70f7519e21.tar.gz
SERVER-45697 unlock RSTL based on requested index build method rather than feature checkr4.3.3r4.3.2
-rw-r--r--src/mongo/db/index_builds_coordinator.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}