-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
stats: fix and unskip flaky test TestCreateStatsProgress #53681
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde and @rytaft)
pkg/sql/stats/create_stats_job_test.go, line 610 at r1 (raw file):
// Invalidate the stats cache so that we can be sure to get the latest stats. tableID := descpb.ID(53)
[nit] would be nice to get the table ID programatically (SELECT id FROM system.namespace WHERE name = 't'
)
Release justification: non-production code changes This commit fixes the flaky test TestCreateStatsProgress and unskips it. TestCreateStatsProgress was flaky because of the recent changes to the stats cache, which removed the guarantee that fresh stats would be available in the cache immediately after stats creation. This commit fixes the issue by explicitly invalidating the stats cache before the part of TestCreateStatsProgress that expects certain stats to be present. Fixes cockroachdb#52782 Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTR!
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale)
pkg/sql/stats/create_stats_job_test.go, line 610 at r1 (raw file):
Previously, RaduBerinde wrote…
[nit] would be nice to get the table ID programatically (
SELECT id FROM system.namespace WHERE name = 't'
)
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained
bors r+ |
Build succeeded: |
Release justification: non-production code changes
This commit fixes the flaky test
TestCreateStatsProgress
and unskipsit.
TestCreateStatsProgress
was flaky because of the recent changes tothe stats cache, which removed the guarantee that fresh stats would be
available in the cache immediately after stats creation. This commit
fixes the issue by explicitly invalidating the stats cache before the
part of
TestCreateStatsProgress
that expects certain stats to be present.Fixes #52782
Release note: None