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: produce SHOW JOBS without reading legacy info rows #138104

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

dt
Copy link
Member

@dt dt commented Dec 30, 2024

Release note: none.
Epic: none.

@dt dt requested a review from msbutler December 30, 2024 23:19
@dt dt requested a review from a team as a code owner December 30, 2024 23:19
Copy link

blathers-crl bot commented Dec 30, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dt
Copy link
Member Author

dt commented Dec 30, 2024

Here's a first peek at the read query to power crdb_internal.jobs without reading job_info. That said, this is default off -- and maybe doesn't merge -- until we get auth checks which I think will require rebasing on #138102, but I wanted to look at the query here in isolation, then talk about the auth checks once everything else is settled (maybe as a separate PR even).

pkg/sql/crdb_internal.go Outdated Show resolved Hide resolved
pkg/sql/crdb_internal.go Show resolved Hide resolved
pkg/sql/crdb_internal.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@msbutler msbutler left a comment

Choose a reason for hiding this comment

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

LGTM! You could also make this setting metamorphic once this is rebased on #138102 ? At the very least, you could give this a spin on backup_restore_roundtrip.go roachtests.

pkg/sql/crdb_internal.go Show resolved Hide resolved
pkg/sql/crdb_internal.go Show resolved Hide resolved
@dt dt requested review from a team as code owners January 15, 2025 16:50
@dt dt requested review from jeffswenson and dhartunian and removed request for a team January 15, 2025 16:50
Copy link

blathers-crl bot commented Jan 15, 2025

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@dt
Copy link
Member Author

dt commented Jan 15, 2025

Okay, I've rebased this and made it on by default. Let's see what the tests think now.

@dt dt force-pushed the jobs-vtable branch 8 times, most recently from 8ec3888 to 301b592 Compare January 15, 2025 21:57
@dt
Copy link
Member Author

dt commented Jan 15, 2025

Only the last two commits here are outstanding; rest already merged.

This isn't a very useful test: it is checking how SHOW JOBS
handles invalid bytes in legacy_progress, which isn't something
we actually need to account for (and changes when we don't read
this row at all soon).

Release note: none.
Epic: none.
Release note (sql change): SHOW JOBS is now based on a new mechanism for storing information about the progress and status of running jobs.
Epic: none.
pkg/sql/crdb_internal.go Show resolved Hide resolved
pkg/sql/crdb_internal.go Show resolved Hide resolved
@dt
Copy link
Member Author

dt commented Jan 16, 2025

TFTR!

bors r+

@dt dt added the backport-25.1.x Flags PRs that need to be backported to 25.1 label Jan 16, 2025
@craig craig bot merged commit 51a1527 into cockroachdb:master Jan 16, 2025
22 checks passed
Copy link

blathers-crl bot commented Jan 16, 2025

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error setting reviewers, but backport branch blathers/backport-release-25.1-138104 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/139230/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. []

Backport to branch 25.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

jeffswenson added a commit to jeffswenson/cockroach that referenced this pull request Jan 17, 2025
As of cockroachdb#138104, `fraction_completed` is NULL if there is no progress
checkpoint for the job. Semantically, this is the right value. It's
weird that jobs with a frontier like CDC jobs would start out with
fraction_completed = 0 then switch to NULL once a checkpoint was
recorded.

Fixes: cockroachdb#139308
Part of: cockroachdb#139310
Release note: none
craig bot pushed a commit that referenced this pull request Jan 21, 2025
139359: roachtest: pause restore test should tolerate null fraction_completed r=jeffswenson a=jeffswenson

As of #138104, `fraction_completed` is NULL if there is no progress checkpoint for the job. Semantically, this is the right value. It's weird that jobs with a frontier like CDC jobs would start out with fraction_completed = 0 then switch to NULL once a checkpoint was recorded.

Fixes: #139308
Part of: #139310
Release note: none

139497: catalog/lease: deflake TestLeaseAtLatestVersion r=rafiss a=fqazi

Currently, TestLeaseAtLatestVersion can flake when the initial version
of a descriptor is acquired, which this test is not designed to handle.
To address this, this patch will intentionally use a different database
for the timestamp table, so that publishing a new version or a slow
range feed does not acquire the kv table in the same schema.

Fixes: #139386

Release note: None

139504: sql: avoid hangs in TestBackfillWithProtectedTS r=rafiss a=rafiss

This test has been flaking. I haven't reproduced the failure yet, but this patch will at least make it so the test doesn't hang if an internal step fails, so we should be able to debug flakes more easily.

informs #139281
informs #139493
Release note: None

Co-authored-by: Jeff Swenson <[email protected]>
Co-authored-by: Faizan Qazi <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
blathers-crl bot pushed a commit that referenced this pull request Jan 21, 2025
As of #138104, `fraction_completed` is NULL if there is no progress
checkpoint for the job. Semantically, this is the right value. It's
weird that jobs with a frontier like CDC jobs would start out with
fraction_completed = 0 then switch to NULL once a checkpoint was
recorded.

Fixes: #139308
Part of: #139310
Release note: none
@dt dt deleted the jobs-vtable branch January 22, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-25.1.x Flags PRs that need to be backported to 25.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants