remove hard timeout limits and use only accrual failure detection
License: MIT Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
This commit is contained in:
parent
4b114dffe1
commit
9464759ae6
|
@ -1073,7 +1073,9 @@ func TestClustersReplicationOverall(t *testing.T) {
|
|||
}
|
||||
if numLocal != nClusters-1 {
|
||||
t.Errorf("Expected %d local pins but got %d", nClusters-1, numLocal)
|
||||
t.Error(pinfos)
|
||||
for _, pi := range pinfos {
|
||||
t.Errorf("%+v", pi)
|
||||
}
|
||||
}
|
||||
|
||||
if numRemote != 1 {
|
||||
|
|
|
@ -63,11 +63,13 @@ func (mc *Checker) CheckPeers(peers []peer.ID) error {
|
|||
// and no alert has been sent before.
|
||||
func (mc Checker) CheckAll() error {
|
||||
for _, metric := range mc.metrics.AllMetrics() {
|
||||
err := mc.alertIfExpired(metric)
|
||||
if mc.FailedMetric(metric.Name, metric.Peer) {
|
||||
err := mc.alert(metric.Peer, metric.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user