Skip to content

Commit

Permalink
kvclient(cdc): fix an out of range panic in client (pingcap#9799) (pi…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Sep 26, 2023
1 parent b4d5086 commit d4ca8ef
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 @@ -1102,7 +1102,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 d4ca8ef

Please sign in to comment.