func (d *ddl) finishJob(t *meta.Meta, job *model.Job) error { log.Warnf("finish DDL job %v", job) // done, notice and run next job. _, err := t.DeQueueDDLJob() if err != nil { return errors.Trace(err) } err = t.AddHistoryDDLJob(job) return errors.Trace(err) }
func (d *ddl) finishDDLJob(t *meta.Meta, job *model.Job) error { log.Warnf("[ddl] finish DDL job %v", job) // done, notice and run next job. _, err := t.DeQueueDDLJob() if err != nil { return errors.Trace(err) } switch job.Type { case model.ActionDropSchema, model.ActionDropTable: if err = d.prepareBgJob(t, job); err != nil { return errors.Trace(err) } } err = t.AddHistoryDDLJob(job) return errors.Trace(err) }