diff options
author | Benety Goh <benety@mongodb.com> | 2020-01-25 14:36:27 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-25 14:36:27 +0000 |
commit | eca08e963444d77209f093a6137f5d70f7519e21 (patch) | |
tree | 9dffed93d0921e67f391bc719f3209f5cc8b32db | |
parent | 46638ed945bfafd1c8c31c9654885283b674c4a9 (diff) | |
download | mongo-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.cpp | 2 |
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); } |