cockroachdb / cockroachdb/cockroach
jobs: clean up `Status` and `RunningStatus` names
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Currently, we refer to the job's state (e.g. `RUNNING`, `CANCELLED`) as its `status`, and a more descriptive job specific status message, as the `running_status`. These names are confusing for a number of reasons:
- we now store descriptive status messages in the new `system.job_status` page.
- we have always stored the job's state in system.jobs under the `status` column
- we update these descriptive status messages outside of the RUNNING state, so `running_status` isn't a great name
To reduce confusion, I propose that:
- in go code, refactor `status` to `state` and `runningstatus` to `statusMessage`.
- continue to store the job's state, in the system.jobs `status` column because:
- we've got better things to do than build a migration to rename a column
- most users of the jobs system will use higher level apis that correctly use "State"
- in `crdb_internal.jobs` mark the current `status` and `running_status` columns as not visible, and add the `state` and `status_message` columns.
Jira issue: CRDB-47305
Contributor guide
Assessment
This issue has not been assessed yet.