chore: reduce peer score not found log noise (#1121)

This commit is contained in:
richΛrd 2024-06-05 15:03:33 -04:00 committed by GitHub
parent 0e223591ed
commit d2d2f5672e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,9 +132,13 @@ func (pm *PeerManager) checkAndUpdateTopicHealth(topic *NodeTopicDetails) int {
healthyPeerCount++
}
} else {
pm.logger.Warn("failed to fetch peer score ", zap.Error(err), logging.HostID("peer", p))
//For now considering peer as healthy if we can't fetch score.
if errors.Is(err, peerstore.ErrNotFound) {
// For now considering peer as healthy if we can't fetch score.
healthyPeerCount++
pm.logger.Debug("peer score is not available yet", logging.HostID("peer", p))
} else {
pm.logger.Warn("failed to fetch peer score ", zap.Error(err), logging.HostID("peer", p))
}
}
}
}