Skip to content

Commit

Permalink
kvclient(cdc): fix an out of range panic in client (#9799) (#9802)
Browse files Browse the repository at this point in the history
close #9739
  • Loading branch information
hicqu authored Sep 24, 2023
1 parent a01df72 commit 5dc93e4
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 5dc93e4

Please sign in to comment.