Skip to content

Commit

Permalink
feat: fix panic by exiting early if conns i snil
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed Dec 30, 2024
1 parent 1b3223e commit f594eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletserver/health_streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit f594eb0

Please sign in to comment.