ddl: update comments (#8845)

This commit is contained in:
Lynn
2019-01-02 16:40:46 +08:00
committed by winkyao
parent b3698f6670
commit 4616e8ca82

View File

@ -561,7 +561,7 @@ func (d *ddl) doDDLJob(ctx sessionctx.Context, job *model.Job) error {
continue
}
// If a job is a history job, the state must be JobSynced or JobCancel.
// If a job is a history job, the state must be JobStateSynced or JobStateRollbackDone or JobStateCancelled.
if historyJob.IsSynced() {
log.Infof("[ddl] DDL job ID:%d is finished", jobID)
return nil
@ -570,7 +570,7 @@ func (d *ddl) doDDLJob(ctx sessionctx.Context, job *model.Job) error {
if historyJob.Error != nil {
return errors.Trace(historyJob.Error)
}
panic("When the state is JobCancel, historyJob.Error should never be nil")
panic("When the state is JobStateRollbackDone or JobStateCancelled, historyJob.Error should never be nil")
}
}