diff --git a/arangod/Pregel/Algos/EffectiveCloseness/HLLCounter.cpp b/arangod/Pregel/Algos/EffectiveCloseness/HLLCounter.cpp index 7a51d64b72..cd94874f26 100644 --- a/arangod/Pregel/Algos/EffectiveCloseness/HLLCounter.cpp +++ b/arangod/Pregel/Algos/EffectiveCloseness/HLLCounter.cpp @@ -88,7 +88,7 @@ uint32_t HLLCounter::getCount() { } else if (estimate > (1.0 / 30.0) * pow_2_32) { estimate = neg_pow_2_32 * log(1.0 - (estimate / pow_2_32)); } - return estimate; + return (uint32_t) estimate; } void HLLCounter::merge(HLLCounter const& other) { diff --git a/arangod/Pregel/Algos/HITS.cpp b/arangod/Pregel/Algos/HITS.cpp index 446a697ed5..4104476dd8 100644 --- a/arangod/Pregel/Algos/HITS.cpp +++ b/arangod/Pregel/Algos/HITS.cpp @@ -56,13 +56,13 @@ struct HITSComputation void compute( MessageIterator> const& messages) override { - double auth = 0.0f; - double hub = 0.0f; + double auth = 0.0; + double hub = 0.0; // we don't know our incoming neighbours in step 0, therfore we need step 0 // as 'initialization' before actually starting to converge if (globalSuperstep() <= 1) { - auth = 1.0f; - hub = 1.0f; + auth = 1.0; + hub = 1.0; } else { HITSWorkerContext const* ctx = static_cast(context()); for (SenderMessage const* message : messages) { diff --git a/arangod/Pregel/Algos/PageRank.cpp b/arangod/Pregel/Algos/PageRank.cpp index 176859fda4..1035719359 100644 --- a/arangod/Pregel/Algos/PageRank.cpp +++ b/arangod/Pregel/Algos/PageRank.cpp @@ -32,7 +32,7 @@ using namespace arangodb; using namespace arangodb::pregel; using namespace arangodb::pregel::algos; -static float EPS = 0.00001; +static float EPS = 0.00001f; static std::string const kConvergence = "convergence"; struct PRWorkerContext : public WorkerContext { @@ -41,9 +41,9 @@ struct PRWorkerContext : public WorkerContext { float commonProb = 0; void preGlobalSuperstep(uint64_t gss) override { if (gss == 0) { - commonProb = 1.0 / vertexCount(); + commonProb = 1.0f / vertexCount(); } else { - commonProb = 0.15 / vertexCount(); + commonProb = 0.15f / vertexCount(); } } }; @@ -64,11 +64,11 @@ struct PRComputation : public VertexComputation { if (globalSuperstep() == 0) { *ptr = ctx->commonProb; } else { - float sum = 0.0; + float sum = 0.0f; for (const float* msg : messages) { sum += *msg; } - *ptr = 0.85 * sum + ctx->commonProb; + *ptr = 0.85f * sum + ctx->commonProb; } float diff = fabs(copy - *ptr); aggregate(kConvergence, diff); diff --git a/arangod/Pregel/CommonFormats.h b/arangod/Pregel/CommonFormats.h index d116f859f5..b6cdc097a1 100644 --- a/arangod/Pregel/CommonFormats.h +++ b/arangod/Pregel/CommonFormats.h @@ -115,7 +115,7 @@ struct SenderMessageFormat : public MessageFormat> { SenderMessageFormat() {} void unwrapValue(VPackSlice s, SenderMessage& senderVal) const override { VPackArrayIterator array(s); - senderVal.senderId.shard = (*array).getUInt(); + senderVal.senderId.shard = (PregelShard) ((*array).getUInt()); senderVal.senderId.key = (*(++array)).copyString(); senderVal.value = (*(++array)).getNumber(); } diff --git a/arangod/Pregel/Worker.cpp b/arangod/Pregel/Worker.cpp index 13e60943a6..119e079db7 100644 --- a/arangod/Pregel/Worker.cpp +++ b/arangod/Pregel/Worker.cpp @@ -522,9 +522,9 @@ void Worker::_finishedProcessing() { // async adaptive message buffering _messageBatchSize = _algorithm->messageBatchSize(_config, _messageStats); } else { - uint32_t tn = _config.parallelism(); - uint32_t s = _messageStats.sendCount / tn / 2UL; - _messageBatchSize = s > 1000 ? s : 1000; + uint64_t tn = _config.parallelism(); + uint64_t s = _messageStats.sendCount / tn / 2UL; + _messageBatchSize = s > 1000 ? (uint32_t)s : 1000; } _messageStats.resetTracking(); LOG_TOPIC(DEBUG, Logger::PREGEL) << "Batch size: " << _messageBatchSize; diff --git a/arangod/VocBase/TraverserOptions.cpp b/arangod/VocBase/TraverserOptions.cpp index 340c6da33e..b616d924fc 100644 --- a/arangod/VocBase/TraverserOptions.cpp +++ b/arangod/VocBase/TraverserOptions.cpp @@ -40,6 +40,7 @@ using VPackHelper = arangodb::basics::VelocyPackHelper; using TraverserOptions = arangodb::traverser::TraverserOptions; using ShortestPathOptions = arangodb::traverser::ShortestPathOptions; using BaseTraverserOptions = arangodb::traverser::BaseTraverserOptions; +using namespace arangodb::transaction; BaseTraverserOptions::LookupInfo::LookupInfo() : expression(nullptr),