mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
e6fb0036dd
|
@ -255,6 +255,10 @@ void AgencyFeature::start() {
|
||||||
}
|
}
|
||||||
LOG_TOPIC(DEBUG, Logger::AGENCY) << "Agency endpoint " << endpoint;
|
LOG_TOPIC(DEBUG, Logger::AGENCY) << "Agency endpoint " << endpoint;
|
||||||
|
|
||||||
|
if (_waitForSync) {
|
||||||
|
_maxAppendSize /= 10;
|
||||||
|
}
|
||||||
|
|
||||||
_agent.reset(new consensus::Agent(consensus::config_t(
|
_agent.reset(new consensus::Agent(consensus::config_t(
|
||||||
_size, _poolSize, _minElectionTimeout, _maxElectionTimeout, endpoint,
|
_size, _poolSize, _minElectionTimeout, _maxElectionTimeout, endpoint,
|
||||||
_agencyEndpoints, _supervision, _waitForSync, _supervisionFrequency,
|
_agencyEndpoints, _supervision, _waitForSync, _supervisionFrequency,
|
||||||
|
|
|
@ -543,7 +543,7 @@ void Agent::sendAppendEntriesRPC() {
|
||||||
std::make_shared<std::string>(builder.toJson()), headerFields,
|
std::make_shared<std::string>(builder.toJson()), headerFields,
|
||||||
std::make_shared<AgentCallback>(
|
std::make_shared<AgentCallback>(
|
||||||
this, followerId, (toLog) ? highest : 0, toLog),
|
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, _lastHighest: local and single threaded access
|
||||||
_lastSent[followerId] = system_clock::now();
|
_lastSent[followerId] = system_clock::now();
|
||||||
|
@ -1029,7 +1029,7 @@ void Agent::run() {
|
||||||
sendAppendEntriesRPC();
|
sendAppendEntriesRPC();
|
||||||
|
|
||||||
// Don't panic
|
// Don't panic
|
||||||
_appendCV.wait(1.0e-1*_config.minPing());
|
_appendCV.wait(static_cast<uint64_t>(1.0e-1*_config.minPing()));
|
||||||
|
|
||||||
// Detect faulty agent and replace
|
// Detect faulty agent and replace
|
||||||
// if possible and only if not already activating
|
// if possible and only if not already activating
|
||||||
|
|
Loading…
Reference in New Issue