diff options
-rw-r--r-- | src/mongo/db/db.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 008cec9d986..4d20f50a16f 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -123,6 +123,7 @@ #include "mongo/db/s/shard_server_op_observer.h" #include "mongo/db/s/sharding_initialization_mongod.h" #include "mongo/db/s/sharding_state_recovery.h" +#include "mongo/db/s/transaction_coordinator_service.h" #include "mongo/db/s/wait_for_majority_service.h" #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" @@ -942,6 +943,10 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) { log() << "Failed to stepDown in non-command initiated shutdown path " << e.toString(); } + + // Even if the replCoordinator failed to step down, ensure we still shut down the + // TransactionCoordinatorService (see SERVER-45009) + TransactionCoordinatorService::get(serviceContext)->onStepDown(); } } |