summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorJiawei Yang <jiawei.yang@mongodb.com>2023-03-01 23:17:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-13 22:47:43 +0000
commit9f2867c9da77e2d64df3852f7d4578f10e6f0817 (patch)
tree3c7ec7b6871d181abb49663e80a6ce97e248c383 /src/mongo/db/clientcursor.cpp
parenta8be7ac8d8d9c41694e5d34d54b3050ee06f6589 (diff)
downloadmongo-9f2867c9da77e2d64df3852f7d4578f10e6f0817.tar.gz
SERVER-70127 change system operation threads to be killable by default
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index 0fd963220a3..b901cbef362 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -351,6 +351,13 @@ public:
void run() {
ThreadClient tc("clientcursormon", getGlobalServiceContext());
+
+ // TODO(SERVER-74662): Please revisit if this thread could be made killable.
+ {
+ stdx::lock_guard<Client> lk(*tc.get());
+ tc.get()->setSystemOperationUnKillableByStepdown(lk);
+ }
+
while (!globalInShutdownDeprecated()) {
{
const ServiceContext::UniqueOperationContext opCtx = cc().makeOperationContext();