summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-01-13 16:16:21 -0500
committerEddie Louie <eddie.louie@mongodb.com>2017-05-02 15:44:34 -0400
commitedf81ac9673164b487534afc7047c789238be0f0 (patch)
treed80f7bc91f617027b69713a349cb4f4659f0aa63 /src/mongo/db/auth
parentb36663f746b5ed671c9fd73388ad0f9f2478c0f6 (diff)
downloadmongo-edf81ac9673164b487534afc7047c789238be0f0.tar.gz
SERVER-27727 Hide idle threads in hang analyzer (extras)
(cherry picked from commit 63d1f4c049587e7923a1154fc31f29bc190316df)
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r--src/mongo/db/auth/user_cache_invalidator_job.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/auth/user_cache_invalidator_job.cpp b/src/mongo/db/auth/user_cache_invalidator_job.cpp
index f941e1d87b1..479a2b7f7c8 100644
--- a/src/mongo/db/auth/user_cache_invalidator_job.cpp
+++ b/src/mongo/db/auth/user_cache_invalidator_job.cpp
@@ -45,6 +45,7 @@
#include "mongo/s/grid.h"
#include "mongo/stdx/mutex.h"
#include "mongo/util/background.h"
+#include "mongo/util/concurrency/idle_thread_block.h"
#include "mongo/util/exit.h"
#include "mongo/util/log.h"
#include "mongo/util/time_support.h"
@@ -146,6 +147,7 @@ void UserCacheInvalidator::run() {
lastInvalidationTime + Seconds(userCacheInvalidationIntervalSecs.load());
Date_t now = Date_t::now();
while (now < sleepUntil) {
+ IdleThreadBlock markIdle;
invalidationIntervalChangedCondition.wait_until(lock, sleepUntil.toSystemTimePoint());
sleepUntil = lastInvalidationTime + Seconds(userCacheInvalidationIntervalSecs.load());
now = Date_t::now();