Skip to content

Commit

Permalink
refactor ddl puller handle jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Dec 13, 2023
1 parent d9a80e2 commit 694fca2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cdc/puller/ddl_puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ func NewDDLPuller(ctx context.Context,
}

func (h *ddlPullerImpl) add2Pending(job *timodel.Job) {
if job == nil {
return
}
if job.ID == h.lastDDLJobID {
log.Warn("ignore duplicated DDL job",
zap.String("namespace", h.changefeedID.Namespace),
Expand Down Expand Up @@ -713,6 +716,7 @@ func (h *ddlPullerImpl) Run(ctx context.Context) error {
if entry.CRTs > atomic.LoadUint64(&h.resolvedTS) {
atomic.StoreUint64(&h.resolvedTS, entry.CRTs)
lastResolvedTsAdvancedTime = cc.Now()
continue
}
}
h.add2Pending(entry.Job)
Expand Down

0 comments on commit 694fca2

Please sign in to comment.