From 067f718e3bd6dcf9893d7df28129d5ff75cf2410 Mon Sep 17 00:00:00 2001 From: Arthur Schreiber Date: Thu, 11 Jul 2024 15:31:37 +0000 Subject: [PATCH] More logging. --- go/vt/discovery/healthcheck.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/go/vt/discovery/healthcheck.go b/go/vt/discovery/healthcheck.go index fe349b155d6..00b5f7d28a3 100644 --- a/go/vt/discovery/healthcheck.go +++ b/go/vt/discovery/healthcheck.go @@ -694,6 +694,11 @@ func (hc *HealthCheckImpl) GetHealthyTabletStats(target *query.Target) []*Tablet var result []*TabletHealth hc.mu.Lock() defer hc.mu.Unlock() + + if (target.TabletType == topodata.TabletType_PRIMARY) && len(hc.healthy[KeyFromTarget(target)]) > 1 { + log.Warningf("[BUG] GetHealthyTabletStats called for primary tablet type, but returning more than one primary tablet") + } + return append(result, hc.healthy[KeyFromTarget(target)]...) }