diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-06-27 17:36:03 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-07-14 10:09:54 -0400 |
commit | 57862d65fa0240690fc2455a4c7cb12b7cff1583 (patch) | |
tree | 8a18898fca95d922a1788dc0deb74662de872c40 /src/mongo/s/query/cluster_cursor_cleanup_job.cpp | |
parent | fe4c678a39e385e343c6f06a72c92252a132cabb (diff) | |
download | mongo-57862d65fa0240690fc2455a4c7cb12b7cff1583.tar.gz |
SERVER-24511 Make frequency with which background job that kills timed-out cursors is run configurable
Diffstat (limited to 'src/mongo/s/query/cluster_cursor_cleanup_job.cpp')
-rw-r--r-- | src/mongo/s/query/cluster_cursor_cleanup_job.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/s/query/cluster_cursor_cleanup_job.cpp b/src/mongo/s/query/cluster_cursor_cleanup_job.cpp index a7e4159c9b5..068d06ac98a 100644 --- a/src/mongo/s/query/cluster_cursor_cleanup_job.cpp +++ b/src/mongo/s/query/cluster_cursor_cleanup_job.cpp @@ -51,6 +51,9 @@ ExportedServerParameter<long long, ServerParameterType::kStartupAndRuntime> "cursorTimeoutMillis", &cursorTimeoutMillis); +// Frequency with which ClusterCursorCleanupJob is run. +MONGO_EXPORT_SERVER_PARAMETER(clientCursorMonitorFrequencySecs, long long, 4); + } // namespace ClusterCursorCleanupJob clusterCursorCleanupJob; @@ -67,8 +70,8 @@ void ClusterCursorCleanupJob::run() { while (!inShutdown()) { manager->killMortalCursorsInactiveSince(Date_t::now() - Milliseconds(cursorTimeoutMillis.load())); - manager->reapZombieCursors(); - sleepFor(Seconds(4)); + manager->incrementCursorsTimedOut(manager->reapZombieCursors()); + sleepsecs(clientCursorMonitorFrequencySecs); } } |