summaryrefslogtreecommitdiff
path: root/src/mongo/s/query
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/query')
-rw-r--r--src/mongo/s/query/cluster_cursor_cleanup_job.cpp5
-rw-r--r--src/mongo/s/query/cluster_query_knobs.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/s/query/cluster_cursor_cleanup_job.cpp b/src/mongo/s/query/cluster_cursor_cleanup_job.cpp
index 068d06ac98a..73de6b071f6 100644
--- a/src/mongo/s/query/cluster_cursor_cleanup_job.cpp
+++ b/src/mongo/s/query/cluster_cursor_cleanup_job.cpp
@@ -43,8 +43,7 @@ namespace {
// Period of time after which mortal cursors are killed for inactivity. Configurable with server
// parameter "cursorTimeoutMillis".
-std::atomic<long long> cursorTimeoutMillis( // NOLINT
- durationCount<Milliseconds>(Minutes(10)));
+AtomicInt64 cursorTimeoutMillis(durationCount<Milliseconds>(Minutes(10)));
ExportedServerParameter<long long, ServerParameterType::kStartupAndRuntime>
cursorTimeoutMillisConfig(ServerParameterSet::getGlobal(),
@@ -71,7 +70,7 @@ void ClusterCursorCleanupJob::run() {
manager->killMortalCursorsInactiveSince(Date_t::now() -
Milliseconds(cursorTimeoutMillis.load()));
manager->incrementCursorsTimedOut(manager->reapZombieCursors());
- sleepsecs(clientCursorMonitorFrequencySecs);
+ sleepsecs(clientCursorMonitorFrequencySecs.load());
}
}
diff --git a/src/mongo/s/query/cluster_query_knobs.h b/src/mongo/s/query/cluster_query_knobs.h
index 76df18fde4d..6eaf31dd102 100644
--- a/src/mongo/s/query/cluster_query_knobs.h
+++ b/src/mongo/s/query/cluster_query_knobs.h
@@ -28,13 +28,13 @@
#pragma once
-#include <atomic>
+#include "mongo/platform/atomic_word.h"
namespace mongo {
// If set to true on mongos, all aggregations delivered to the mongos which require a merging shard
// will select the primary shard as the merger. False by default, which means that the merging shard
// will be selected randomly amongst the shards participating in the query.
-extern std::atomic<bool> internalQueryAlwaysMergeOnPrimaryShard; // NOLINT
+extern AtomicBool internalQueryAlwaysMergeOnPrimaryShard;
} // namespace mongo