diff --git a/arangod/Agency/AgencyFeature.cpp b/arangod/Agency/AgencyFeature.cpp index 6ec12b46a3..7921788b1a 100644 --- a/arangod/Agency/AgencyFeature.cpp +++ b/arangod/Agency/AgencyFeature.cpp @@ -255,6 +255,10 @@ void AgencyFeature::start() { } LOG_TOPIC(DEBUG, Logger::AGENCY) << "Agency endpoint " << endpoint; + if (_waitForSync) { + _maxAppendSize /= 10; + } + _agent.reset(new consensus::Agent(consensus::config_t( _size, _poolSize, _minElectionTimeout, _maxElectionTimeout, endpoint, _agencyEndpoints, _supervision, _waitForSync, _supervisionFrequency, diff --git a/arangod/Agency/Agent.cpp b/arangod/Agency/Agent.cpp index 0f63e16c28..36577fda26 100644 --- a/arangod/Agency/Agent.cpp +++ b/arangod/Agency/Agent.cpp @@ -543,7 +543,7 @@ void Agent::sendAppendEntriesRPC() { std::make_shared(builder.toJson()), headerFields, std::make_shared( this, followerId, (toLog) ? highest : 0, toLog), - std::max(1.0e-3 * toLog * dt.count(), 0.25 * _config.minPing()), true); + std::max(1.0e-3 * toLog * dt.count(), _config.minPing()), true); // _lastSent, _lastHighest: local and single threaded access _lastSent[followerId] = system_clock::now(); @@ -1029,7 +1029,7 @@ void Agent::run() { sendAppendEntriesRPC(); // Don't panic - _appendCV.wait(1.0e-1*_config.minPing()); + _appendCV.wait(static_cast(1.0e-1*_config.minPing())); // Detect faulty agent and replace // if possible and only if not already activating