Skip to content

Commit

Permalink
Merge pull request #101261 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-100868

release-23.1: jobs: wrap payload vs progress err differently
  • Loading branch information
adityamaru authored Apr 12, 2023
2 parents c8a4703 + 3c2f272 commit 58f543f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/jobs/adopt.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (r *Registry) resumeJob(
return err
}
if !exists {
return errors.Wrap(&JobNotFoundError{jobID: jobID}, "job not found in system.job_info")
return errors.Wrap(&JobNotFoundError{jobID: jobID}, "job payload not found in system.job_info")
}
if err := protoutil.Unmarshal(payloadBytes, payload); err != nil {
return err
Expand All @@ -339,7 +339,7 @@ func (r *Registry) resumeJob(
return err
}
if !exists {
return errors.Wrap(&JobNotFoundError{jobID: jobID}, "job not found in system.job_info")
return errors.Wrap(&JobNotFoundError{jobID: jobID}, "job progress not found in system.job_info")
}
return protoutil.Unmarshal(progressBytes, progress)
}); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/jobs/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ func (j *Job) loadJobPayloadAndProgress(
return nil, nil, errors.Wrapf(err, "failed to get payload for job %d", j.ID())
}
if !exists {
return nil, nil, errors.Wrap(&JobNotFoundError{jobID: j.ID()}, "job not found in system.job_info")
return nil, nil, errors.Wrap(&JobNotFoundError{jobID: j.ID()}, "job payload not found in system.job_info")
}
if err := protoutil.Unmarshal(payloadBytes, payload); err != nil {
return nil, nil, err
Expand All @@ -775,7 +775,7 @@ func (j *Job) loadJobPayloadAndProgress(
return nil, nil, errors.Wrapf(err, "failed to get progress for job %d", j.ID())
}
if !exists {
return nil, nil, errors.Wrap(&JobNotFoundError{jobID: j.ID()}, "job not found in system.job_info")
return nil, nil, errors.Wrap(&JobNotFoundError{jobID: j.ID()}, "job progress not found in system.job_info")
}
if err := protoutil.Unmarshal(progressBytes, progress); err != nil {
return nil, nil, &JobNotFoundError{jobID: j.ID()}
Expand Down

0 comments on commit 58f543f

Please sign in to comment.