jobs: move span registration to existing calls to in runStateMachine #67661
Labels
A-jobs
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
no-issue-activity
X-stale
Is your feature request related to a problem? Please describe.
In #65322 we added code to record the trace ID of a job before we run it. This has a somewhat unfortunate side-effect of doing an extra round-trip to update the job row every time we resume a job. We currently already write to the jobs table when we resume the job for the first time. With #44594, we're going to be writing to the jobs table every time we go to run the job. We ought to just plumb the trace ID into the point where we write to the job inside
(*Registry).runStateMachine
as opposed to having this separate write above it.cockroach/pkg/jobs/adopt.go
Lines 271 to 278 in 41a58d0
cc @sajjadrizvi @adityamaru
Jira issue: CRDB-8656
The text was updated successfully, but these errors were encountered: