diff --git a/cdc/kv/client.go b/cdc/kv/client.go index a3b33a38dca..21549e87798 100644 --- a/cdc/kv/client.go +++ b/cdc/kv/client.go @@ -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