summaryrefslogtreecommitdiff
path: root/src/mongo/db/session/kill_sessions_local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/session/kill_sessions_local.cpp')
-rw-r--r--src/mongo/db/session/kill_sessions_local.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/session/kill_sessions_local.cpp b/src/mongo/db/session/kill_sessions_local.cpp
index b40367cec27..71a00432876 100644
--- a/src/mongo/db/session/kill_sessions_local.cpp
+++ b/src/mongo/db/session/kill_sessions_local.cpp
@@ -192,6 +192,13 @@ void killSessionsAbortAllPreparedTransactions(OperationContext* opCtx) {
void yieldLocksForPreparedTransactions(OperationContext* opCtx) {
// Create a new opCtx because we need an empty locker to refresh the locks.
auto newClient = opCtx->getServiceContext()->makeClient("prepared-txns-yield-locks");
+
+ // TODO(SERVER-74658): Please revisit if this thread could be made killable.
+ {
+ stdx::lock_guard<Client> lk(*newClient.get());
+ newClient.get()->setSystemOperationUnkillableByStepdown(lk);
+ }
+
AlternativeClientRegion acr(newClient);
auto newOpCtx = cc().makeOperationContext();