Skip to content

Commit

Permalink
[release-18.0] discovery: fix crash with nil server vschema (#15086) (#…
Browse files Browse the repository at this point in the history
…15092)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
  • Loading branch information
vitess-bot[bot] authored Feb 8, 2024
1 parent 08f5bef commit e634efd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/vt/discovery/keyspace_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ func (kss *keyspaceState) isServing() bool {
// In addition, the traffic switcher updates SrvVSchema when the DeniedTables attributes in a Shard record is
// modified.
func (kss *keyspaceState) onSrvVSchema(vs *vschemapb.SrvVSchema, err error) bool {
// the vschema can be nil if the server is currently shutting down
if vs == nil {
return true
}

kss.mu.Lock()
defer kss.mu.Unlock()
kss.moveTablesState, _ = kss.getMoveTablesStatus(vs)
Expand Down

0 comments on commit e634efd

Please sign in to comment.