Skip to content

Commit

Permalink
ddl: sync the job access in failpoint mockParallelSameDDLJobTwice
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed Apr 13, 2023
1 parent bc14799 commit b87d0ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ddl/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1056,11 +1056,11 @@ func (d *ddl) DoDDLJob(ctx sessionctx.Context, job *model.Job) error {

failpoint.Inject("mockParallelSameDDLJobTwice", func(val failpoint.Value) {
if val.(bool) {
<-task.err
// The same job will be put to the DDL queue twice.
job = job.Clone()
task1 := &limitJobTask{job, make(chan error)}
d.limitJobCh <- task1
<-task.err
// The second job result is used for test.
task = task1
}
Expand Down

0 comments on commit b87d0ae

Please sign in to comment.