summaryrefslogtreecommitdiff
path: root/src/mongo/db/mongod_main.cpp
diff options
context:
space:
mode:
authorGregory Noma <gregory.noma@gmail.com>2020-08-05 13:45:52 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-05 17:59:52 +0000
commitc3421443d50acfb81ee299bf5eff6e14879591f3 (patch)
tree7d28ca9c606c4d81b8a16103076170ffb474e1da /src/mongo/db/mongod_main.cpp
parentfd109f08f97117237dae3a9428c3d2d66f14e221 (diff)
downloadmongo-c3421443d50acfb81ee299bf5eff6e14879591f3.tar.gz
SERVER-49448 Interrupt index builds for shutdown during the expected phase in resumable index build tests
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r--src/mongo/db/mongod_main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp
index 8ad2de63145..775e13d2021 100644
--- a/src/mongo/db/mongod_main.cpp
+++ b/src/mongo/db/mongod_main.cpp
@@ -218,6 +218,7 @@ namespace {
MONGO_FAIL_POINT_DEFINE(hangDuringQuiesceMode);
MONGO_FAIL_POINT_DEFINE(pauseWhileKillingOperationsAtShutdown);
+MONGO_FAIL_POINT_DEFINE(hangBeforeShutdown);
const NamespaceString startupLogCollectionName("local.startup_log");
@@ -1025,6 +1026,11 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) {
shutdownTimeout = Milliseconds(repl::shutdownTimeoutMillisForSignaledShutdown.load());
}
+ if (MONGO_unlikely(hangBeforeShutdown.shouldFail())) {
+ LOGV2(4944800, "Hanging before shutdown due to hangBeforeShutdown failpoint");
+ hangBeforeShutdown.pauseWhileSet();
+ }
+
// If we don't have shutdownArgs, we're shutting down from a signal, or other clean shutdown
// path.
//