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
close #9915
  • Loading branch information
3AceShowHand authored Oct 18, 2023
1 parent c988064 commit 0a70e3a
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 0a70e3a

Please sign in to comment.