diff options
author | Benety Goh <benety@mongodb.com> | 2019-07-11 15:04:08 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-07-11 15:04:43 -0400 |
commit | 1719255a297343227cd9a190a3280fb8fef2c488 (patch) | |
tree | 9daa776c12b1a1170c8d0316ab96cc686e818c00 | |
parent | 27807650274531ee8031cb989c2ed33bdc9bee21 (diff) | |
download | mongo-1719255a297343227cd9a190a3280fb8fef2c488.tar.gz |
SERVER-42154 add hangAfterInitializingIndexBuild fail point to IndexBuildsCoordinatorMongod
This fail point supports index build tests that step down/get interrupted as the createIndexes
command and transferring control over to the IndexBuildsCoordinatorMongod's thread pool.
-rw-r--r-- | src/mongo/db/index_builds_coordinator_mongod.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/index_builds_coordinator_mongod.cpp b/src/mongo/db/index_builds_coordinator_mongod.cpp index 4fb8274a640..8d71eed1d16 100644 --- a/src/mongo/db/index_builds_coordinator_mongod.cpp +++ b/src/mongo/db/index_builds_coordinator_mongod.cpp @@ -40,6 +40,7 @@ #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" #include "mongo/util/assert_util.h" +#include "mongo/util/fail_point.h" #include "mongo/util/log.h" #include "mongo/util/str.h" @@ -49,6 +50,8 @@ using namespace indexbuildentryhelpers; namespace { +MONGO_FAIL_POINT_DEFINE(hangAfterInitializingIndexBuild); + /** * Constructs the options for the loader thread pool. */ @@ -179,6 +182,8 @@ IndexBuildsCoordinatorMongod::startIndexBuild(OperationContext* opCtx, return; } + MONGO_FAIL_POINT_PAUSE_WHILE_SET(hangAfterInitializingIndexBuild); + auto opCtx = Client::getCurrent()->makeOperationContext(); opCtx->setDeadlineByDate(deadline, timeoutError); |