Skip to content

Commit

Permalink
ddl_puller.go(ticdc): fix DDLs are ignored when schema versions are o…
Browse files Browse the repository at this point in the history
…ut of order (#11733) (#11756)

close #11714
  • Loading branch information
ti-chi-bot authored Dec 3, 2024
1 parent 8f7b1b0 commit 46a22f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cdc/puller/ddl_puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ type ddlJobPullerImpl struct {
kvStorage tidbkv.Storage
schemaStorage entry.SchemaStorage
resolvedTs uint64
schemaVersion int64
filter filter.Filter
// ddlJobsTable is initialized when receive the first concurrent DDL job.
// It holds the info of table `tidb_ddl_jobs` of upstream TiDB.
Expand Down Expand Up @@ -363,8 +362,7 @@ func (p *ddlJobPullerImpl) handleJob(job *timodel.Job) (skip bool, err error) {
errors.Trace(err), job.Query, job.StartTS, job.StartTS)
}

if job.BinlogInfo.FinishedTS <= p.getResolvedTs() ||
job.BinlogInfo.SchemaVersion <= p.schemaVersion {
if job.BinlogInfo.FinishedTS <= p.getResolvedTs() {
log.Info("ddl job finishedTs less than puller resolvedTs,"+
"discard the ddl job",
zap.Uint64("jobFinishedTS", job.BinlogInfo.FinishedTS),
Expand Down Expand Up @@ -454,7 +452,6 @@ func (p *ddlJobPullerImpl) handleJob(job *timodel.Job) (skip bool, err error) {
}

p.setResolvedTs(job.BinlogInfo.FinishedTS)
p.schemaVersion = job.BinlogInfo.SchemaVersion

return p.checkIneligibleTableDDL(snap, job)
}
Expand Down

0 comments on commit 46a22f7

Please sign in to comment.