Skip to content

Commit bc9d418

Browse files
committed
fix test
1 parent d8884a0 commit bc9d418

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/ddl/job_worker.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,12 @@ func (w *worker) transitOneJobStep(
547547
// if they don't overlap, we query and check inside our txn to detect the conflict.
548548
currBytes, err := sysTblMgr.GetJobBytesByIDWithSe(jobCtx.ctx, w.sess, job.ID)
549549
if err != nil {
550+
// TODO maybe we can unify where to rollback, they are scatting around.
551+
w.sess.Rollback()
550552
return 0, err
551553
}
552554
if !bytes.Equal(currBytes, jobW.Bytes) {
555+
w.sess.Rollback()
553556
return 0, errors.New("job meta changed by others")
554557
}
555558

0 commit comments

Comments
 (0)