Skip to content

Commit

Permalink
kvclient(cdc): fix an out of range panic in client (pingcap#9799)
Browse files Browse the repository at this point in the history
  • Loading branch information
hicqu committed Sep 24, 2023
1 parent 11b023a commit f80da64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cdc/kv/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ func (s *eventFeedSession) receiveFromStream(
}

if len(cevent.Events) != 0 {
if entries, ok := cevent.Events[0].Event.(*cdcpb.Event_Entries_); ok {
if entries, ok := cevent.Events[0].Event.(*cdcpb.Event_Entries_); ok && len(entries.Entries.Entries) > 0 {
commitTs := entries.Entries.Entries[0].CommitTs
if maxCommitTs < commitTs {
maxCommitTs = commitTs
Expand Down

0 comments on commit f80da64

Please sign in to comment.