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

ttljob: don't block job completion on stats queries #124306

Merged
merged 1 commit into from
May 23, 2024

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented May 16, 2024

fixes #124305

Release note (bug fix): Previously, if the ttl_row_stats_poll_interval
storage parameter was non-zero for a table with row level TTL enabled,
the queries issued to update row stats could block the job from
completing. Now, if the job completes, these stats queries are cancelled
instead. This means that the jobs.row_level_ttl.total_rows and
jobs.row_level_ttl.total_expired_rows metrics will report 0 if the job
finishes before the row stats queries complete.

@rafiss rafiss added backport-23.1.x Flags PRs that need to be backported to 23.1 backport-23.2.x Flags PRs that need to be backported to 23.2. backport-24.1.x Flags PRs that need to be backported to 24.1. labels May 16, 2024
@rafiss rafiss requested review from fqazi and Dedej-Bergin May 16, 2024 21:04
@rafiss rafiss requested a review from a team as a code owner May 16, 2024 21:04
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@annrpom annrpom self-requested a review May 22, 2024 20:06
@rafiss rafiss removed the request for review from fqazi May 22, 2024 20:45
Copy link
Contributor

@Dedej-Bergin Dedej-Bergin left a comment

Choose a reason for hiding this comment

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

LGTM!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @annrpom)

Copy link
Contributor

@annrpom annrpom left a comment

Choose a reason for hiding this comment

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

lgtm -- nit: can we update the release note so it documents the fact that the "estimated rows" metric might look like it's 0 before the ttl job completes?

Copy link
Contributor

@Dedej-Bergin Dedej-Bergin left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)

Release note (bug fix): Previously, if the ttl_row_stats_poll_interval
storage parameter was non-zero for a table with row level TTL enabled,
the queries issued to update row stats could block the job from
completing. Now, if the job completes, these stats queries are cancelled
instead. This means that the jobs.row_level_ttl.total_rows and
jobs.row_level_ttl.total_expired_rows metrics will report 0 if the job
finishes before the row stats queries complete.
@rafiss
Copy link
Collaborator Author

rafiss commented May 23, 2024

can we update the release note so it documents the fact that the "estimated rows" metric might look like it's 0 before the ttl job completes?

done

thanks for the reviews!

bors r+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1 backport-23.2.x Flags PRs that need to be backported to 23.2. backport-24.1.x Flags PRs that need to be backported to 24.1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ttljob: stats query can cause job to run for much longer than it needs to
4 participants