Skip to content

Commit

Permalink
Remove columns from show jobs response and Jobs Page (#18577)
Browse files Browse the repository at this point in the history
  • Loading branch information
kathancox committed May 23, 2024
1 parent eb2966c commit c366b17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
11 changes: 3 additions & 8 deletions src/current/_includes/v24.1/ui/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ The Jobs list is designed for you to manage pending work. It is not intended to

Use the **Jobs** table to see recently created and completed jobs.

The following screenshot shows `BACKUP` jobs:

<img src="{{ 'images/v24.1/ui_jobs_page.png' | relative_url }}" alt="DB Console Jobs Page" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v24.1/ui-jobs-page.png' | relative_url }}" alt="DB Console Jobs Page" style="border:1px solid #eee;max-width:100%" />

### Filter jobs

Expand All @@ -34,10 +32,7 @@ Job ID | Unique job ID. This value is used to [pause]({{ link_prefix }}pause-job
User Name | User that created the job.
Creation Time (UTC) | Date and time the job was created.
Last Modified Time (UTC) | Date and time the job was last modified.
Last Execution Time (UTC) | Date and time the job was last executed.
High-water Timestamp | A checkpoint for a [changefeed job's progress]({{ link_prefix }}monitor-and-debug-changefeeds.html#monitor-a-changefeed) that guarantees that all changes before (or at) the timestamp have been emitted. Hover over the high-water timestamp to view the [system time]({{ link_prefix }}as-of-system-time.html).
Execution Count | Number of times the job was executed.
Coordinator Node | ID of the coordinating node.
Completed Time (UTC) | Date and time the job was completed.

To view [job details](#job-details), click the job description.

Expand All @@ -56,7 +51,7 @@ Status | Description
`REVERTING`| Job failed or was canceled and its changes are being reverted.
`REVERT-FAILED` | Job encountered a non-retryable error when reverting the changes. It is necessary to manually clean up a job with this status.
`RETRYING` | Job is retrying another job that failed.

## Job details

The details show:
Expand Down
Binary file added src/current/images/v24.1/ui-jobs-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 2 additions & 8 deletions src/current/v24.1/show-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ The `SHOW JOBS` [statement]({% link {{ page.version.version }}/sql-statements.md
- Enterprise [`BACKUP`]({% link {{ page.version.version }}/backup.md %}) and [`RESTORE`]({% link {{ page.version.version }}/restore.md %}).
- [Scheduled backups]({% link {{ page.version.version }}/manage-a-backup-schedule.md %}).
- [User-created table statistics]({% link {{ page.version.version }}/create-statistics.md %}) created for use by the [cost-based optimizer]({% link {{ page.version.version }}/cost-based-optimizer.md %}). To view [automatic table statistics]({% link {{ page.version.version }}/cost-based-optimizer.md %}#table-statistics), use [`SHOW AUTOMATIC JOBS`](#show-automatic-jobs).
- `SHOW JOBS` now displays newly added columns from `crdb_internal.jobs` (`last_run`, `next_run`, `num_runs`, and `execution_errors`). The columns capture state related to retries, failures, and exponential backoff.

These details can help you understand the status of crucial tasks that can impact the performance of your cluster, as well as help you control them.

Details for [enterprise changefeeds]({% link {{ page.version.version }}/create-changefeed.md %}), including the [sink URI]({% link {{ page.version.version }}/create-changefeed.md %}#sink-uri) and full table name, are not displayed on running the `SHOW JOBS` statement. For details about [enterprise changefeeds]({% link {{ page.version.version }}/create-changefeed.md %}), including the [sink URI]({% link {{ page.version.version }}/create-changefeed.md %}#sink-uri) and the full table name, use [`SHOW CHANGEFEED JOBS`](#show-changefeed-jobs).
Details for [enterprise changefeeds]({% link {{ page.version.version }}/create-changefeed.md %}), including the [sink URI]({% link {{ page.version.version }}/create-changefeed.md %}#sink-uri) and full table name, are not displayed on running the `SHOW JOBS` statement. For details about [enterprise changefeeds]({% link {{ page.version.version }}/create-changefeed.md %}), including the [sink URI]({% link {{ page.version.version }}/create-changefeed.md %}#sink-uri) and the full table name, use [`SHOW CHANGEFEED JOBS`](#show-changefeed-jobs).

To block a call to `SHOW JOBS` that returns after all specified job ID(s) have a terminal state, use [`SHOW JOBS WHEN COMPLETE`](#show-job-when-complete). The statement will return a row per job ID, which provides details of the job execution. Note that while this statement is blocking, it will time out after 24 hours.

Expand Down Expand Up @@ -65,7 +62,7 @@ Field | Description
------|------------
`job_id` | A unique ID to identify each job. This value is used if you want to control jobs (i.e., [pause]({% link {{ page.version.version }}/pause-job.md %}), [resume]({% link {{ page.version.version }}/resume-job.md %}), or [cancel]({% link {{ page.version.version }}/cancel-job.md %}) it).
`job_type` | The type of job (e.g., [`SCHEMA CHANGE`]({% link {{ page.version.version }}/online-schema-changes.md %}), [`NEW SCHEMA CHANGE`]({% link {{ page.version.version }}/online-schema-changes.md %}#declarative-schema-changer), [`KEY VISUALIZER`]({% link {{ page.version.version }}/ui-key-visualizer.md %}), [`MIGRATION`]({% link {{ page.version.version }}/upgrade-cockroach-version.md %}#step-6-finish-the-upgrade), [`BACKUP`]({% link {{ page.version.version }}/backup.md %}), [`RESTORE`]({% link {{ page.version.version }}/restore.md %}), [`IMPORT`]({% link {{ page.version.version }}/import.md %}), [`CHANGEFEED`](#show-changefeed-jobs), [`CREATE STATS`]({% link {{ page.version.version }}/create-statistics.md %}), [`ROW LEVEL TTL`]({% link {{ page.version.version }}/row-level-ttl.md %}), [`REPLICATION STREAM INGESTION`]({% link {{ page.version.version }}/physical-cluster-replication-monitoring.md %}), or [`REPLICATION STREAM PRODUCER`]({% link {{ page.version.version }}/physical-cluster-replication-monitoring.md %})). <br><br> For job types of automatic jobs, see [Show automatic jobs](#show-automatic-jobs).
`description` | The statement that started the job, or a textual description of the job.
`description` | The statement that started the job, or a textual description of the job. When you run `SHOW JOBS`, the `description` field is limited to 100 characters. To view the full description for a job, run `SHOW JOB {job ID}`.
`statement` | When `description` is a textual description of the job, the statement that started the job is returned in this column. Currently, this field is populated only for the automatic table statistics jobs.
`user_name` | The name of the [user]({% link {{ page.version.version }}/security-reference/authorization.md %}#create-and-manage-users) who started the job.
`status` | The job's current state. Possible values: `pending`, `paused`, `pause-requested`, `failed`, `succeeded`, `canceled`, `cancel-requested`, `running`, `retry-running`, `retry-reverting`, `reverting`, `revert-failed`.<br><br>Refer to [Jobs status](#job-status) for a description of each status.
Expand All @@ -78,9 +75,6 @@ Field | Description
`error` | If the job `failed` with a terminal error, this column will contain the error generated by the failure.
`coordinator_id` | The ID of the node running the job.
`trace_id` | The job's internal [trace ID]({% link {{ page.version.version }}/show-trace.md %}#trace-description) for inflight debugging. **Note**: This ID can only be used by the Cockroach Labs support team for internal observability.
`last_run` | When a job fails with a retryable error, this column will contain the [`TIMESTAMPTZ`]({% link {{ page.version.version }}/timestamp.md %}) of the last attempt to run the job.
`next_run` | When a job fails with a retryable error, this column will contain the [`TIMESTAMPTZ`]({% link {{ page.version.version }}/timestamp.md %}) of the next attempt to run the job.
`num_runs` | The number of attempts to run the job.
`execution_errors` | A list of any retryable errors that a job may have encountered during its lifetime.

For details of changefeed-specific responses, see [`SHOW CHANGEFEED JOBS`](#show-changefeed-jobs).
Expand Down

0 comments on commit c366b17

Please sign in to comment.