diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2020-06-02 16:58:48 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-04 22:26:43 +0000 |
commit | 7101b350980dd10d9c24909c2ab55e89ed58b785 (patch) | |
tree | af31e0b5ea0f34681e2e9584ac6770522eaf7a23 /src/mongo/db/index_builds_coordinator.h | |
parent | 30f5448e95114d344e6acffa92856536885e35dd (diff) | |
download | mongo-7101b350980dd10d9c24909c2ab55e89ed58b785.tar.gz |
SERVER-48332 Failed initial sync attempts should abort all in-progress index builds before retrying
Diffstat (limited to 'src/mongo/db/index_builds_coordinator.h')
-rw-r--r-- | src/mongo/db/index_builds_coordinator.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/index_builds_coordinator.h b/src/mongo/db/index_builds_coordinator.h index 65e5f71db42..e79bc10eb36 100644 --- a/src/mongo/db/index_builds_coordinator.h +++ b/src/mongo/db/index_builds_coordinator.h @@ -232,6 +232,17 @@ public: const std::string& reason); /** + * Signals all of the index builds to abort and then waits until the index builds are no longer + * running. The provided 'reason' will be used in the error message that the index builders + * return to their callers. + * + * Does not require holding locks. + * + * Does not stop new index builds from starting. Caller must make that guarantee. + */ + void abortAllIndexBuildsForInitialSync(OperationContext* opCtx, const std::string& reason); + + /** * Aborts an index build by index build UUID. Returns when the index build thread exits. * * Returns true if the index build was aborted or the index build is already in the process of |