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) (#11757)

close #11714
  • Loading branch information
ti-chi-bot authored Nov 19, 2024
1 parent 502a4c8 commit 3ef3c42
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 @@ -73,7 +73,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 @@ -364,8 +363,7 @@ func (p *ddlJobPullerImpl) handleJob(job *timodel.Job) (skip bool, err error) {
}
}()

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 @@ -455,7 +453,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 3ef3c42

Please sign in to comment.