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

sql: fix reset_sql_stats to truncate activity tables #104337

Merged
merged 1 commit into from
Jun 5, 2023
Merged

sql: fix reset_sql_stats to truncate activity tables #104337

merged 1 commit into from
Jun 5, 2023

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Jun 5, 2023

Previously:
The reset stats on the ui and crdb_internal.reset_sql_stats() would only reset the statement_statistics and transaction_statics tables. This would leave the sql_activity table with old data. The reset stats now truncates the sql_activity table as well.

Fixes: #104321
Epic: none

Release note (sql change): Fix crdb_internal.reset_sql_stats() to
cleanup the sql_activity table which work as a cache for the stats.

@j82w j82w requested a review from a team June 5, 2023 15:27
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@j82w j82w added the backport-23.1.x Flags PRs that need to be backported to 23.1 label Jun 5, 2023
Previously:
The reset stats on the ui and crdb_internal.reset_sql_stats() would
only reset the statement_statistics and transaction_statics tables.
This would leave the sql_activity table with old data. The reset stats
now truncates the sql_activity table as well.

Fixes: #104321
Epic: none

Release note (sql change): Fix crdb_internal.reset_sql_stats() to
 cleanup the sql_activity table which work as a cache for the stats.
Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@j82w
Copy link
Contributor Author

j82w commented Jun 5, 2023

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 5, 2023

Build failed:

@j82w
Copy link
Contributor Author

j82w commented Jun 5, 2023

bors retry

@craig
Copy link
Contributor

craig bot commented Jun 5, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jun 5, 2023

Build succeeded:

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL Activity: Reset stats does not clear new system.{statement/transaction}_activity tables
3 participants