feat: misc logging improvements for fallback mode (#10775)

This commit is contained in:
Jacob Elias 2024-06-10 15:04:47 -05:00 committed by GitHub
parent 584322fced
commit cbcf9d3c3b

@ -150,7 +150,7 @@ func (ah *PollerAsyncHandler) Init() {
log.Info("number of healthy primary candidates", "healthy_candidates", len(healthyCandidates)) log.Info("number of healthy primary candidates", "healthy_candidates", len(healthyCandidates))
if len(healthyCandidates) == 0 { if len(healthyCandidates) == 0 {
log.Info("zero healthy candidates, querying fallback backend", log.Debug("zero healthy candidates, querying fallback backend",
"backend_name", be.Name) "backend_name", be.Name)
ah.cp.UpdateBackend(ah.ctx, be) ah.cp.UpdateBackend(ah.ctx, be)
} }
@ -703,6 +703,11 @@ func (cp *ConsensusPoller) FilterCandidates(backends []*Backend) map[*Backend]*b
continue continue
} }
if !be.skipPeerCountCheck && bs.peerCount < cp.minPeerCount { if !be.skipPeerCountCheck && bs.peerCount < cp.minPeerCount {
log.Debug("backend peer count too low for inclusion in consensus",
"backend_name", be.Name,
"peer_count", bs.peerCount,
"min_peer_count", cp.minPeerCount,
)
continue continue
} }
if !bs.inSync { if !bs.inSync {