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,stats: fix flakes in TestCacheWait and TestQueryCache #51828

Merged
merged 2 commits into from
Jul 23, 2020

Conversation

rytaft
Copy link
Collaborator

@rytaft rytaft commented Jul 23, 2020

stats: fix flake in TestCacheWait

This commit fixes a flake in TestCacheWait, which was introduced
by #51616. That PR changed the call to InvalidateTableStats in
TestCacheWait to RefreshTableStats, but that change should not have
been made. The purpose of the test is to test that the cache invalidation
and waiting mechanisms work correctly, and therefore it must call
InvalidateTableStats, not RefreshTableStats.

Fixes #51712

sql: fix flake in TestQueryCache/group/statschange

This commit fixes a flake in TestQueryCache/group/statschange,
which was introduced by #51616. That PR made updates to the stats
cache asynchronous, so we can no longer expect the query cache to
be invalidated immediately after a stats update. This commit fixes
the problem by introducing a retry mechanism into the test.

Fixes #51693

This commit fixes a flake in TestCacheWait, which was introduced
by cockroachdb#51616. That PR changed the call to InvalidateTableStats in
TestCacheWait to RefreshTableStats, but that change should not have
been made. The purpose of the test is to test that the cache invalidation
and waiting mechanisms work correctly, and therefore it must call
InvalidateTableStats, not RefreshTableStats.

Fixes cockroachdb#51712

Release note: None
@rytaft rytaft requested a review from a team as a code owner July 23, 2020 11:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rytaft rytaft requested a review from RaduBerinde July 23, 2020 13:58
@rytaft rytaft changed the title stats: fix flake in TestCacheWait sql,stats: fix flakes in TestCacheWait and TestQueryCache/group/statschange Jul 23, 2020
@rytaft rytaft changed the title sql,stats: fix flakes in TestCacheWait and TestQueryCache/group/statschange sql,stats: fix flakes in TestCacheWait and TestQueryCache Jul 23, 2020
This commit fixes a flake in TestQueryCache/group/statschange,
which was introduced by cockroachdb#51616. That PR made updates to the stats
cache asynchronous, so we can no longer expect the query cache to
be invalidated immediately after a stats update. This commit fixes
the problem by introducing a retry mechanism into the test.

Fixes cockroachdb#51693

Release note: None
Copy link
Member

@RaduBerinde RaduBerinde 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! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)

@rytaft
Copy link
Collaborator Author

rytaft commented Jul 23, 2020

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Jul 23, 2020

Build failed:

@jordanlewis
Copy link
Member

Courtesy re-bors due to flake in version-upgrade:

bors r+

@craig
Copy link
Contributor

craig bot commented Jul 23, 2020

Build succeeded:

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.

sql/stats: TestCacheWait failed sql: TestQueryCache failed
4 participants