1
0
Fork 0

agency more verbose for fixing cluster tests in jenkins

This commit is contained in:
Kaveh Vahedipour 2016-12-23 11:10:22 +01:00
parent bb4fed5cf3
commit cf5ae36a14
2 changed files with 8 additions and 5 deletions

View File

@ -189,6 +189,8 @@ bool Agent::waitFor(index_t index, double timeout) {
// We should never get here
TRI_ASSERT(false);
return false;
}
// AgentCallback reports id of follower and its highest processed index
@ -367,7 +369,8 @@ void Agent::sendAppendEntriesRPC() {
if (unconfirmed.size() > 1) {
LOG_TOPIC(TRACE, Logger::AGENCY)
<< "Appending " << unconfirmed.size() - 1 << " entries up to index "
<< highest << " to follower " << followerId;
<< highest << " to follower " << followerId << ". Message: "
<< builder.toJson();
}
// Really leading?

View File

@ -167,6 +167,8 @@ void Constituent::followNoLock(term_t t) {
if (_leaderID == _id) {
_leaderID = NO_LEADER;
LOG_TOPIC(DEBUG, Logger::AGENCY) << "Setting _leaderID to NO_LEADER.";
} else {
LOG_TOPIC(INFO, Logger::AGENCY) << _id << ": following " << _leaderID << " in term " << t ;
}
CONDITION_LOCKER(guard, _cv);
@ -197,8 +199,7 @@ void Constituent::lead(term_t term) {
// I'm the leader
_role = LEADER;
LOG_TOPIC(DEBUG, Logger::AGENCY) << "Set _role to LEADER in term " << _term
<< ", setting _leaderID to " << _id;
LOG_TOPIC(INFO, Logger::AGENCY) << _id << ": leading in term " << _term;
_leaderID = _id;
}
@ -218,8 +219,7 @@ void Constituent::candidate() {
if (_role != CANDIDATE) {
_role = CANDIDATE;
LOG_TOPIC(DEBUG, Logger::AGENCY) << "Set _role to CANDIDATE in term "
<< _term;
LOG_TOPIC(INFO, Logger::AGENCY) << _id << ": candidating in term " << _term;
}
}