Skip to content

Commit

Permalink
fix ErrSchemaStorageTableMiss error
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Jul 30, 2021
1 parent abb7abd commit 0c28a56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cdc/owner/ddl_puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ type ddlPullerImpl struct {
resolvedTS uint64
pendingDDLJobs []*timodel.Job
cancel context.CancelFunc
lastDDLJobID int64
}

func newDDLPuller(ctx cdcContext.Context, startTs uint64) (DDLPuller, error) {
Expand Down Expand Up @@ -119,7 +120,12 @@ func (h *ddlPullerImpl) Run(ctx cdcContext.Context) error {
}
h.mu.Lock()
defer h.mu.Unlock()
if job.ID == h.lastDDLJobID {
log.Warn("ignore duplicated DDL job", zap.Any("job", job))
return nil
}
h.pendingDDLJobs = append(h.pendingDDLJobs, job)
h.lastDDLJobID = job.ID
return nil
}

Expand Down

0 comments on commit 0c28a56

Please sign in to comment.