diff options
| author | Jiawei Yang <jiawei.yang@mongodb.com> | 2023-03-29 18:42:16 +0000 |
|---|---|---|
| committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-30 18:51:41 +0000 |
| commit | b5f1d6bb8c06742cde53f028fd266eff584a2537 (patch) | |
| tree | ed87f3936e635da175b860359aba30ff15424487 /src/mongo/db/session | |
| parent | 4714df5896ddaa06f3146531d2283a013f903996 (diff) | |
| download | mongo-b5f1d6bb8c06742cde53f028fd266eff584a2537.tar.gz | |
Revert "SERVER-70127 change system operation threads to be killable by default"
This reverts commit 9f2867c9da77e2d64df3852f7d4578f10e6f0817.
Revert "SERVER-75352 OplogBatcher's ReplBatcher thread should be unkillable"
This reverts commit 26266d5b736f90961a328399dea5d299cd407ab2.
Diffstat (limited to 'src/mongo/db/session')
| -rw-r--r-- | src/mongo/db/session/kill_sessions_local.cpp | 7 | ||||
| -rw-r--r-- | src/mongo/db/session/session_catalog_mongod.cpp | 13 | ||||
| -rw-r--r-- | src/mongo/db/session/session_killer.cpp | 6 |
3 files changed, 0 insertions, 26 deletions
diff --git a/src/mongo/db/session/kill_sessions_local.cpp b/src/mongo/db/session/kill_sessions_local.cpp index f87d456dc02..b40367cec27 100644 --- a/src/mongo/db/session/kill_sessions_local.cpp +++ b/src/mongo/db/session/kill_sessions_local.cpp @@ -192,13 +192,6 @@ 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(); diff --git a/src/mongo/db/session/session_catalog_mongod.cpp b/src/mongo/db/session/session_catalog_mongod.cpp index e7f4bc8d9dc..40cc1cb7532 100644 --- a/src/mongo/db/session/session_catalog_mongod.cpp +++ b/src/mongo/db/session/session_catalog_mongod.cpp @@ -110,13 +110,6 @@ void killSessionTokens(OperationContext* opCtx, invariant(status); ThreadClient tc("Kill-Sessions", service); - - // TODO(SERVER-74658): Please revisit if this thread could be made killable. - { - stdx::lock_guard<Client> lk(*tc.get()); - tc.get()->setSystemOperationUnKillableByStepdown(lk); - } - auto uniqueOpCtx = tc->makeOperationContext(); const auto opCtx = uniqueOpCtx.get(); const auto catalog = SessionCatalog::get(opCtx); @@ -515,12 +508,6 @@ void MongoDSessionCatalog::onStepUp(OperationContext* opCtx) { { // Create a new opCtx because we need an empty locker to refresh the locks. auto newClient = opCtx->getServiceContext()->makeClient("restore-prepared-txn"); - - { - stdx::lock_guard<Client> lk(*newClient.get()); - newClient.get()->setSystemOperationUnKillableByStepdown(lk); - } - AlternativeClientRegion acr(newClient); for (const auto& sessionInfo : sessionsToReacquireLocks) { auto newOpCtx = cc().makeOperationContext(); diff --git a/src/mongo/db/session/session_killer.cpp b/src/mongo/db/session/session_killer.cpp index f77c1c33236..fa3c6adda25 100644 --- a/src/mongo/db/session/session_killer.cpp +++ b/src/mongo/db/session/session_killer.cpp @@ -51,12 +51,6 @@ SessionKiller::SessionKiller(ServiceContext* sc, KillFunc killer) ThreadClient tc("SessionKiller", sc); - // TODO(SERVER-74658): Please revisit if this thread could be made killable. - { - stdx::lock_guard<Client> lk(*tc.get()); - tc.get()->setSystemOperationUnKillableByStepdown(lk); - } - stdx::unique_lock<Latch> lk(_mutex); // While we're not in shutdown |
