summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builds_coordinator_mongod.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2019-07-11 15:04:08 -0400
committerBenety Goh <benety@mongodb.com>2019-07-11 15:04:43 -0400
commit1719255a297343227cd9a190a3280fb8fef2c488 (patch)
tree9daa776c12b1a1170c8d0316ab96cc686e818c00 /src/mongo/db/index_builds_coordinator_mongod.cpp
parent27807650274531ee8031cb989c2ed33bdc9bee21 (diff)
downloadmongo-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.
Diffstat (limited to 'src/mongo/db/index_builds_coordinator_mongod.cpp')
-rw-r--r--src/mongo/db/index_builds_coordinator_mongod.cpp5
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);