Skip to content

Commit

Permalink
cherry pick pingcap#24146 to release-5.0
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
zimulala authored and ti-srebot committed Apr 25, 2021
1 parent 1145e34 commit ce32aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ddl/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ func (d *ddl) doDDLJob(ctx sessionctx.Context, job *model.Job) error {
}

if historyJob.Error != nil {
logutil.BgLogger().Info("[ddl] DDL job is failed", zap.Int64("jobID", jobID))
return errors.Trace(historyJob.Error)
}
// Only for JobStateCancelled job which is adding columns or drop columns.
Expand Down
2 changes: 1 addition & 1 deletion ddl/ddl_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ func (w *worker) handleDDLJobQueue(d *ddlCtx) error {
d.mu.hook.OnJobUpdated(job)
d.mu.RUnlock()

if job.IsSynced() || job.IsCancelled() {
if job.IsSynced() || job.IsCancelled() || job.IsRollbackDone() {
asyncNotify(d.ddlJobDoneCh)
}
}
Expand Down

0 comments on commit ce32aec

Please sign in to comment.