ddl: update comments (#8845)
This commit is contained in:
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user