Skip to content

Commit

Permalink
Merge pull request #79051 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…21.2-77240

release-21.2: jobs: fix startable job num-runs overcount
  • Loading branch information
samiskin authored Apr 1, 2022
2 parents 956989b + 0a65ec2 commit bc0813f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/jobs/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,6 @@ func (sj *StartableJob) Start(ctx context.Context) (err error) {
return fmt.Errorf("cannot resume %T job which is not committed", sj.resumer)
}

if err := sj.started(ctx, nil /* txn */); err != nil {
return err
}

if err := sj.registry.stopper.RunAsyncTask(ctx, sj.taskName(), func(ctx context.Context) {
sj.execErr = sj.registry.runJob(sj.resumerCtx, sj.resumer, sj.Job, StatusRunning, sj.taskName())
close(sj.execDone)
Expand Down

0 comments on commit bc0813f

Please sign in to comment.