From c6ec415752c8398f588491d8af1c54ee4e7fcbb4 Mon Sep 17 00:00:00 2001 From: Mathew Robinson Date: Tue, 30 Jul 2019 10:51:26 -0400 Subject: SERVER-40667 MongoD Storage watchdog should treat unexpected interruption as process-fatal --- src/mongo/watchdog/watchdog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mongo/watchdog') diff --git a/src/mongo/watchdog/watchdog.cpp b/src/mongo/watchdog/watchdog.cpp index 05b9a7f23fb..bc12a7fb1eb 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; -- cgit v1.2.1