Skip to content

Commit

Permalink
Merge pull request #110824 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-22.2-110773

release-22.2: changefeedccl: Fix potential shutdown NPE
  • Loading branch information
miretskiy authored Sep 18, 2023
2 parents 5623d8e + 004cb4d commit ea44a50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/ccl/changefeedccl/changefeed_processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,11 @@ func (ca *changeAggregator) close() {
if ca.Closed {
return
}
if ca.cancel == nil {
// consumer close may be called even before Start is called.
// If that's the case, cancel is not initialized.
return
}
ca.cancel()
// Wait for the poller to finish shutting down.
if ca.kvFeedDoneCh != nil {
Expand Down

0 comments on commit ea44a50

Please sign in to comment.