Skip to content

Commit

Permalink
Merge #72781
Browse files Browse the repository at this point in the history
72781: importccl: use jobs.LoadClaimedJob r=msbutler a=stevendanna

The LoadJob API is unsafe as it can lead to multiple nodes updating
the same job regardless of who has it claimed.

Release note: None

Co-authored-by: Steven Danna <[email protected]>
  • Loading branch information
craig[bot] and stevendanna committed Dec 14, 2021
2 parents 0c2fea7 + 3b02af2 commit 112b5b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ccl/importccl/import_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ func ingestWithRetry(

// Re-load the job in order to update our progress object, which may have
// been updated by the changeFrontier processor since the flow started.
reloadedJob, reloadErr := execCtx.ExecCfg().JobRegistry.LoadJob(ctx, job.ID())
reloadedJob, reloadErr := execCtx.ExecCfg().JobRegistry.LoadClaimedJob(ctx, job.ID())
if reloadErr != nil {
if ctx.Err() != nil {
return res, ctx.Err()
Expand Down

0 comments on commit 112b5b9

Please sign in to comment.