Skip to content

Commit

Permalink
changefeed(ticdc): check changefeed info is nil to prevent panic (#9917
Browse files Browse the repository at this point in the history
…) (#9924)

close #9915
  • Loading branch information
ti-chi-bot authored Oct 18, 2023
1 parent 7c9bc3f commit a9cc735
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/upstream/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ func (m *Manager) Tick(ctx context.Context,

activeUpstreams := make(map[uint64]struct{})
for _, cf := range globalState.Changefeeds {
activeUpstreams[cf.Info.UpstreamID] = struct{}{}
if cf != nil && cf.Info != nil {
activeUpstreams[cf.Info.UpstreamID] = struct{}{}
}
}
m.mu.Lock()
defer m.mu.Unlock()
Expand Down

0 comments on commit a9cc735

Please sign in to comment.