From f594eb02c0de9f2dbb62b306a3c1dbe5e5d7d21c Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Mon, 30 Dec 2024 10:37:20 +0530 Subject: [PATCH] feat: fix panic by exiting early if conns i snil Signed-off-by: Manan Gupta --- go/vt/vttablet/tabletserver/health_streamer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/vttablet/tabletserver/health_streamer.go b/go/vt/vttablet/tabletserver/health_streamer.go index 87a5235c2b2..9f999283ef4 100644 --- a/go/vt/vttablet/tabletserver/health_streamer.go +++ b/go/vt/vttablet/tabletserver/health_streamer.go @@ -346,7 +346,7 @@ func (hs *healthStreamer) reload(full map[string]*schema.Table, created, altered // Schema Reload to happen only on primary when it is serving. // We can be in a state when the primary is not serving after we have run DemotePrimary. In that case, // we don't want to run any queries in MySQL, so we shouldn't reload anything in the healthStreamer. - if !hs.isServingPrimary { + if !hs.isServingPrimary || hs.conns == nil { return nil }