diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-01-05 10:56:41 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-01-05 10:56:41 -0500 |
commit | ba55f2573976ba570c2319bce9b598f0a660445f (patch) | |
tree | 7fc8adb43798e03517933c4e575dcbebe8f42087 /src/mongo/s | |
parent | f5fbf31650eea903edbbcd2f9ef042b4c39e2ecb (diff) | |
download | mongo-ba55f2573976ba570c2319bce9b598f0a660445f.tar.gz |
SERVER-25932 Make MONGO_EXPORT_SERVER_PARAMETER use AtomicWord instead of std::atomic
Diffstat (limited to 'src/mongo/s')
-rw-r--r-- | src/mongo/s/client/shard_connection.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_aggregate.cpp | 3 | ||||
-rw-r--r-- | src/mongo/s/query/cluster_cursor_cleanup_job.cpp | 5 | ||||
-rw-r--r-- | src/mongo/s/query/cluster_query_knobs.h | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/s/client/shard_connection.cpp b/src/mongo/s/client/shard_connection.cpp index bbe562997c1..490a2f4ee83 100644 --- a/src/mongo/s/client/shard_connection.cpp +++ b/src/mongo/s/client/shard_connection.cpp @@ -241,7 +241,7 @@ public: warning() << "Detected additional sharded connection in the " << "thread local pool for " << addr; - if (DBException::traceExceptions) { + if (DBException::traceExceptions.load()) { // There shouldn't be more than one connection checked out to the same // host on the same thread. printStackTrace(); diff --git a/src/mongo/s/commands/cluster_aggregate.cpp b/src/mongo/s/commands/cluster_aggregate.cpp index 9f62f50613f..15e290516e1 100644 --- a/src/mongo/s/commands/cluster_aggregate.cpp +++ b/src/mongo/s/commands/cluster_aggregate.cpp @@ -255,7 +255,8 @@ Status ClusterAggregate::runAggregate(OperationContext* txn, // Run merging command on random shard, unless a stage needs the primary shard. Need to use // ShardConnection so that the merging mongod is sent the config servers on connection init. auto& prng = txn->getClient()->getPrng(); - const auto& mergingShardId = (needPrimaryShardMerger || internalQueryAlwaysMergeOnPrimaryShard) + const auto& mergingShardId = + (needPrimaryShardMerger || internalQueryAlwaysMergeOnPrimaryShard.load()) ? conf->getPrimaryId() : shardResults[prng.nextInt32(shardResults.size())].shardTargetId; const auto mergingShard = 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 |