From 38e518a0eb3ee64d1219cd9c157bc55fb65e282c Mon Sep 17 00:00:00 2001 From: Cyril Galibern Date: Tue, 15 Aug 2023 19:52:50 +0200 Subject: [PATCH] [daemondata] setNextMsgType verify remaining d.hbGens values from non cluster node This should not happen --- daemon/daemondata/hb_message.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/daemondata/hb_message.go b/daemon/daemondata/hb_message.go index 0743cf917..3de0619e9 100644 --- a/daemon/daemondata/hb_message.go +++ b/daemon/daemondata/hb_message.go @@ -152,8 +152,9 @@ func (d *data) setNextMsgType() { continue } if _, ok := d.clusterNodes[node]; !ok { - // unexpected hb gens from non cluster member, so it doesn't need full - d.log.Warn().Msgf("evict unexpected hb gens %s: not a cluster node", node) + err := fmt.Errorf("bug: d.hbGens[%s] exists without d.clusterNodes[%s]", node, node) + // TODO: replace with panic(err) ? + d.log.Error().Err(err).Msgf("setNextMsgType cleanup unexpected hb gens %s", node) delete(d.hbGens, node) continue }