F #4809: Less verbose output

This commit is contained in:
Ruben S. Montero committed 2017-05-09 12:29:44 +02:00
1 parent 5f6a627bab
commit 1bcfc2bd00
2 files changed
+22 -6

No files matched your search

+22 -4
View File
@@ -757,12 +757,30 @@ void RaftManager::send_heartbeat()
if ( rc == -1 )
{
std::ostringstream oss;
static time_t last_error = 0;
static int num_errors = 0;
oss << "Error sending heartbeat to follower " << it->first <<": "
<< error;
num_errors++;
NebulaLog::log("RCM", Log::INFO, oss);
if ( last_error == 0 )
{
last_error = time(0);
num_errors = 1;
}
else if ( last_error + 60 < time(0) )
{
if ( num_errors > 10 )
{
std::ostringstream oss;
oss << "Detetected error condition on follower "
<< it->first <<". Last error was: " << error;
NebulaLog::log("RCM", Log::INFO, oss);
}
last_error = 0;
}
}
else if ( success == false && fterm > term )
{
-2
View File
@@ -125,8 +125,6 @@ void ReplicaThread::do_replication()
if ( xml_rc == -1 )
{
NebulaLog::log("RCM", Log::ERROR, error);
if ( retry_timeout < max_retry_timeout )
{
retry_timeout = 2 * retry_timeout;