Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jobs: only include running and very recently finished jobs in SHOW JOBS #34829

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

dt
Copy link
Member

@dt dt commented Feb 12, 2019

On a cluster that has been running for a long time or with frequent periodic jobs, SHOW JOBS can output an unbounded, massive wall of text.
This makes it hard to find the jobs you are likely interested in -- those that are running or have very recently finished.

This changes SHOW JOBS to only include running jobs or those that finished in the last 12h.
The full listing of jobs is still available via crdb_internal.jobs.

Release note (general change): SHOW JOBS only returns running and recently finished jobs. Older jobs can still be inspected via the crdb_internal.jobs table.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link

@rolandcrosby rolandcrosby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @bobvawter, @dt, @mjibson, and @piyush-singh)

a discussion (no related file):
Good change. How much noise from the auto statistics jobs remains after this? If it's still an inordinate amount we might want to more aggressively filter those specifically (something like, show all jobs that are currently running, plus all the non-auto-stats jobs that completed in the last 12 hours). Thoughts?


On a cluster that has been running for a long time or with frequent periodic jobs, SHOW JOBS can output an unbounded, massive wall of text.
This makes it hard to find the jobs you are likely interested in -- those that are running or have very recently finished.

This changes SHOW JOBS to only include running jobs or those that finished in the last 12h.
The full listing of jobs is still available via crdb_internal.jobs.

Release note (general change): SHOW JOBS only returns running and recently finished jobs. Older jobs can still be inspected via the crdb_internal.jobs table.
@dt dt force-pushed the show-jobs-running branch from 50e0d40 to ef769e0 Compare February 12, 2019 18:16
@dt dt requested a review from a team as a code owner February 12, 2019 18:16
@dt dt requested a review from a team February 12, 2019 18:16
@dt
Copy link
Member Author

dt commented Feb 12, 2019

bors r+

craig bot pushed a commit that referenced this pull request Feb 12, 2019
34301: sql: validate check constraints with the schema changer r=lucy-zhang a=lucy-zhang

Currently, constraints are added in the `Unvalidated` state, and are not
validated for existing rows until ALTER TABLE ... VALIDATE CONSTRAINT is run.
With this change, check constraints will be validated asynchronously after they
are added by default (and similar changes to FKs are to follow). This addresses
the problematic long-running transactions caused by the current implementation
of VALIDATE CONSTRAINT. This PR is a rework of #32504 and has the same tests.

With this change, check constraints will be added to the table descriptor in
the new `Validating` state, visible to CRUD operations, and a mutation is
queued indicating that the constraint is to be validated. During the backfill
step, the constraint is validated for existing rows. If validation succeeds,
then the constraint moves to the `Validated` state; otherwise, it is dropped.

The behavior when dropping constraints (either via DROP CONSTRAINT or
indirectly when a column is dropped) is unchanged: no mutation is enqueued.

As part of this change, check constraints can be added to non-public columns in
the process of being added, including columns that were created earlier in the
same transaction.

The main difference between this PR and #32504 is that #32504 does not add the
constraint to the table descriptor until it has been validated.

See #34238 for more context.

Release note (sql change): Check constraint adds by default will validate table
data with the added constraint asynchronously after the transaction commits.

34720: rpc: always trace incoming RPCs if tracing is enabled r=andreimatei a=andreimatei

Before this patch, an incoming RPC would not be traced if the caller
wasn't traced. Usually this was inconsequential, as the caller is
generally traced if tracing is enabled in various ways. However, for the
status server (AdminUI calls) this was not true - the caller (the
browser, through a HTTP->gRPC gateway) was never tracing a call.
This patch makes the server create a span regardless of the caller if
tracing is enabled.

Fixes #34310

Release note: None

34798: roachtest: add two more indexes to bulk index creation test r=vivekmenezes a=vivekmenezes

Release note: None

34829: jobs: only include running and very recently finished jobs in SHOW JOBS r=dt a=dt

On a cluster that has been running for a long time or with frequent periodic jobs, SHOW JOBS can output an unbounded, massive wall of text.
This makes it hard to find the jobs you are likely interested in -- those that are running or have very recently finished.

This changes SHOW JOBS to only include running jobs or those that finished in the last 12h.
The full listing of jobs is still available via crdb_internal.jobs.

Release note (general change): SHOW JOBS only returns running and recently finished jobs. Older jobs can still be inspected via the crdb_internal.jobs table.

Co-authored-by: Lucy Zhang <[email protected]>
Co-authored-by: Andrei Matei <[email protected]>
Co-authored-by: Vivek Menezes <[email protected]>
Co-authored-by: David Taylor <[email protected]>
@craig
Copy link
Contributor

craig bot commented Feb 12, 2019

Build succeeded

@craig craig bot merged commit ef769e0 into cockroachdb:master Feb 12, 2019
@dt dt deleted the show-jobs-running branch February 14, 2019 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants