summaryrefslogtreecommitdiff
path: root/src/mongo/db/ttl.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-01-13 16:16:21 -0500
committerMathias Stearn <mathias@10gen.com>2017-03-24 16:13:26 -0400
commit63d1f4c049587e7923a1154fc31f29bc190316df (patch)
tree35f2b6172f26a003d896d8241ca9800d8a3a71d8 /src/mongo/db/ttl.cpp
parent27ddad2221974798284ef62d3328a3c02a510220 (diff)
downloadmongo-63d1f4c049587e7923a1154fc31f29bc190316df.tar.gz
SERVER-27727 Hide idle threads in hang analyzer (extras)
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r--src/mongo/db/ttl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp
index f9c1d9459d6..e51785cf8c4 100644
--- a/src/mongo/db/ttl.cpp
+++ b/src/mongo/db/ttl.cpp
@@ -56,6 +56,7 @@
#include "mongo/db/server_parameters.h"
#include "mongo/db/ttl_collection_cache.h"
#include "mongo/util/background.h"
+#include "mongo/util/concurrency/idle_thread_block.h"
#include "mongo/util/exit.h"
#include "mongo/util/log.h"
@@ -87,7 +88,10 @@ public:
AuthorizationSession::get(cc())->grantInternalAuthorization();
while (!globalInShutdownDeprecated()) {
- sleepsecs(ttlMonitorSleepSecs.load());
+ {
+ IdleThreadBlock markIdle;
+ sleepsecs(ttlMonitorSleepSecs.load());
+ }
LOG(3) << "thread awake";