summaryrefslogtreecommitdiff
path: root/src/mongo/watchdog
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-10-29 19:49:48 +0000
committerevergreen <evergreen@mongodb.com>2019-10-29 19:49:48 +0000
commit78d5cff07cc98d173501e7b8e61d3fd8d85e53f3 (patch)
tree258bbd4c1397d60ecdb92110b37877ce46d85fc1 /src/mongo/watchdog
parent7b95afe61b71396af1907a55f3db7bd99d337849 (diff)
downloadmongo-78d5cff07cc98d173501e7b8e61d3fd8d85e53f3.tar.gz
SERVER-40667 MongoD Storage watchdog should treat unexpected interruption as process-fatal
Diffstat (limited to 'src/mongo/watchdog')
-rw-r--r--src/mongo/watchdog/watchdog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/watchdog/watchdog.cpp b/src/mongo/watchdog/watchdog.cpp
index ea1d53b2219..809403ceb51 100644
--- a/src/mongo/watchdog/watchdog.cpp
+++ b/src/mongo/watchdog/watchdog.cpp
@@ -47,6 +47,8 @@
#include "mongo/db/operation_context.h"
#include "mongo/platform/process_id.h"
#include "mongo/util/concurrency/idle_thread_block.h"
+#include "mongo/util/exit.h"
+#include "mongo/util/exit_code.h"
#include "mongo/util/hex.h"
#include "mongo/util/log.h"
#include "mongo/util/timer.h"
@@ -157,8 +159,9 @@ void WatchdogPeriodicThread::doLoop() {
if (!s.isOK()) {
// The only bad status is when we are in shutdown
if (!opCtx->getServiceContext()->getKillAllOperations()) {
- error() << "Watchdog was interrupted, shuting down:, reason: "
- << s.getStatus();
+ severe() << "Watchdog was interrupted, shutting down, reason: "
+ << s.getStatus();
+ exitCleanly(ExitCode::EXIT_ABRUPT);
}
return;