summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
diff options
context:
space:
mode:
authorJiawei Yang <jiawei.yang@mongodb.com>2023-04-17 21:46:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-25 04:55:00 +0000
commitc35bad3b048e8d885bf0b7517aacd2349ea81d14 (patch)
tree936b34ac089f00a94f407bfab0fe3d64ecc2deb9 /src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
parent70d26d65a1e55e4da104f4f150bdc8b6d2ae5b65 (diff)
downloadmongo-c35bad3b048e8d885bf0b7517aacd2349ea81d14.tar.gz
SERVER-70127 change system operations to be killable by default
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_external_state_impl.cpp')
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
index c15ed1b3702..eea24c1ce0e 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -145,6 +145,12 @@ auto makeThreadPool(const std::string& poolName, const std::string& threadName)
threadPoolOptions.poolName = poolName;
threadPoolOptions.onCreateThread = [](const std::string& threadName) {
Client::initThread(threadName.c_str());
+
+ {
+ stdx::lock_guard<Client> lk(cc());
+ cc().setSystemOperationUnkillableByStepdown(lk);
+ }
+
AuthorizationSession::get(cc())->grantInternalAuthorization(&cc());
};
return std::make_unique<ThreadPool>(threadPoolOptions);