diff options
author | Josef Ahmad <josef.ahmad@mongodb.com> | 2023-05-12 12:47:02 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-12 13:27:50 +0000 |
commit | be1c14d1f945a1ca55d7311c54bccae8d27edd84 (patch) | |
tree | 80bb3502e0bff7c44167b50bede008b463cd25f7 /src/mongo/db/index_builds_coordinator.cpp | |
parent | 75ef59b570f937c0a14944187d43bf0707543980 (diff) | |
download | mongo-be1c14d1f945a1ca55d7311c54bccae8d27edd84.tar.gz |
SERVER-77025 Wait for index builds to complete on conflicting command application
Diffstat (limited to 'src/mongo/db/index_builds_coordinator.cpp')
-rw-r--r-- | src/mongo/db/index_builds_coordinator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp index 851f35d8a3f..d11df7344d9 100644 --- a/src/mongo/db/index_builds_coordinator.cpp +++ b/src/mongo/db/index_builds_coordinator.cpp @@ -96,9 +96,9 @@ MONGO_FAIL_POINT_DEFINE(failSetUpResumeIndexBuild); MONGO_FAIL_POINT_DEFINE(failIndexBuildWithError); MONGO_FAIL_POINT_DEFINE(failIndexBuildWithErrorInSecondDrain); MONGO_FAIL_POINT_DEFINE(hangInRemoveIndexBuildEntryAfterCommitOrAbort); +MONGO_FAIL_POINT_DEFINE(hangIndexBuildOnSetupBeforeTakingLocks); MONGO_FAIL_POINT_DEFINE(hangAbortIndexBuildByBuildUUIDAfterLocks); - IndexBuildsCoordinator::IndexBuildsSSS::IndexBuildsSSS() : ServerStatusSection("indexBuilds"), registered(0), @@ -2319,6 +2319,9 @@ IndexBuildsCoordinator::PostSetupAction IndexBuildsCoordinator::_setUpIndexBuild std::shared_ptr<ReplIndexBuildState> replState, Timestamp startTimestamp, const IndexBuildOptions& indexBuildOptions) { + + hangIndexBuildOnSetupBeforeTakingLocks.pauseWhileSet(opCtx); + auto [dbLock, collLock, rstl] = std::move(_acquireExclusiveLockWithRSTLRetry(opCtx, replState.get()).getValue()); |