Revision 1bcfc2bd

View differences:

src/raft/RaftManager.cc
757 757

  
758 758
		if ( rc == -1 )
759 759
		{
760
			std::ostringstream oss;
760
            static time_t last_error = 0;
761
            static int    num_errors = 0;
761 762

  
762
			oss << "Error sending heartbeat to follower " << it->first <<": "
763
				<< error;
763
            num_errors++;
764 764

  
765
        	NebulaLog::log("RCM", Log::INFO, oss);
765
            if ( last_error == 0 )
766
            {
767
                last_error = time(0);
768
                num_errors = 1;
769
            }
770
            else if ( last_error + 60 < time(0) )
771
            {
772
                if ( num_errors > 10 )
773
                {
774
                    std::ostringstream oss;
775

  
776
                    oss << "Detetected error condition on follower "
777
                        << it->first <<". Last error was: " << error;
778

  
779
                    NebulaLog::log("RCM", Log::INFO, oss);
780
                }
781

  
782
                last_error = 0;
783
            }
766 784
		}
767 785
		else if ( success == false && fterm > term )
768 786
		{
src/raft/ReplicaManager.cc
125 125

  
126 126
        if ( xml_rc == -1 )
127 127
        {
128
            NebulaLog::log("RCM", Log::ERROR, error);
129

  
130 128
            if ( retry_timeout < max_retry_timeout )
131 129
            {
132 130
                retry_timeout = 2 * retry_timeout;

Also available in: Unified diff