diff --git a/pkg/eventservice/event_broker.go b/pkg/eventservice/event_broker.go index 74fbdb159..9b77dbb5f 100644 --- a/pkg/eventservice/event_broker.go +++ b/pkg/eventservice/event_broker.go @@ -414,7 +414,7 @@ func (c *eventBroker) checkAndSendHandshake(task scanTask) bool { // We need call this function every time we send a event(whether dml/ddl/resolvedTs), // thus to ensure the sync point event is in correct order for each dispatcher. func (c *eventBroker) emitSyncPointEventIfNeeded(ts uint64, d *dispatcherStat, remoteID node.ID) { - if d.enableSyncPoint && ts > d.nextSyncPoint { + for d.enableSyncPoint && ts > d.nextSyncPoint { // Send the sync point event. syncPointEvent := newWrapSyncPointEvent( remoteID,