mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
3c487165b8
|
@ -42,15 +42,19 @@ bool AgentCallback::operator()(arangodb::ClusterCommResult* res) {
|
|||
if (_agent) {
|
||||
_agent->reportIn(_slaveID, _last);
|
||||
}
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY) << "comm_status(" << res->status
|
||||
<< "), last(" << _last << "), follower("
|
||||
<< _slaveID << "), time("
|
||||
<< TRI_microtime() - _startTime << ")";
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY)
|
||||
<< "Got good callback from AppendEntriesRPC: "
|
||||
<< "comm_status(" << res->status
|
||||
<< "), last(" << _last << "), follower("
|
||||
<< _slaveID << "), time("
|
||||
<< TRI_microtime() - _startTime << ")";
|
||||
} else {
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY) << "comm_status(" << res->status
|
||||
<< "), last(" << _last << "), follower("
|
||||
<< _slaveID << "), time("
|
||||
<< TRI_microtime() - _startTime << ")";
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY)
|
||||
<< "Got bad callback from AppendEntriesRPC: "
|
||||
<< "comm_status(" << res->status
|
||||
<< "), last(" << _last << "), follower("
|
||||
<< _slaveID << "), time("
|
||||
<< TRI_microtime() - _startTime << ")";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -112,8 +112,8 @@ void Constituent::termNoLock(term_t t) {
|
|||
_term = t;
|
||||
|
||||
if (tmp != t) {
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY) << _id << ": " << roleStr[_role]
|
||||
<< " term " << t;
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY) << _id << ": changing term, current role:"
|
||||
<< roleStr[_role] << " new term " << t;
|
||||
|
||||
_cast = false;
|
||||
Builder body;
|
||||
|
@ -345,7 +345,8 @@ bool Constituent::vote(term_t termOfPeer, std::string id, index_t prevLogIndex,
|
|||
if (prevLogTerm > myLastLogEntry.term ||
|
||||
(prevLogTerm == myLastLogEntry.term &&
|
||||
prevLogIndex >= myLastLogEntry.index)) {
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY) << "voting for " << id;
|
||||
LOG_TOPIC(DEBUG, Logger::AGENCY) << "voting for " << id << " in term "
|
||||
<< _term;
|
||||
_cast = true;
|
||||
_votedFor = id;
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue