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

Fix flaky transparent_decompress_chunk #7288

Merged

Conversation

mkindahl
Copy link
Contributor

@mkindahl mkindahl commented Sep 23, 2024

It can pick merge joins in favor of hash joins when testing outer joins. Since these tests are only testing outer joins and currently uses hash joins, we ensure that it will consistently pick those by disabling merge joins for these queries only. Merge join is used for other queries, so we do not disable merge join for the entire test.

Disable-check: force-changelog-file

It can pick merge joins in favor of hash joins when testing outer
joins. Since these tests are only testing outer joins and currently
uses hash joins, we ensure that it will consistently pick those by
disabling merge joins for these queries only. Merge join is used for
other queries, so we do not disable merge join for the entire test.
@mkindahl mkindahl self-assigned this Sep 23, 2024
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.29%. Comparing base (59f50f2) to head (88e0765).
Report is 355 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7288       +/-   ##
===========================================
+ Coverage   80.06%   92.29%   +12.22%     
===========================================
  Files         190      205       +15     
  Lines       37181    38538     +1357     
  Branches     9450     9997      +547     
===========================================
+ Hits        29770    35568     +5798     
+ Misses       2997     2970       -27     
+ Partials     4414        0     -4414     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@erimatnor erimatnor left a comment

Choose a reason for hiding this comment

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

This is fine to stabilize the test.

However, this seems like a symptom of a larger problem we've seen with compression where it doesn't have stable plans because (column) stats don't really work.

Normally, an analyze should stabilize tests like this after stats are updated.

Stats is not something we can fix now, however, so disabling certain joins is the only way. But I think it is still important to highlight the larger issue we need to address that can lead to bad query plans.

@akuzm
Copy link
Member

akuzm commented Sep 23, 2024

Normally, an analyze should stabilize tests like this after stats are updated.

Stats is not something we can fix now, however, so disabling certain joins is the only way. But I think it is still important to highlight the larger issue we need to address that can lead to bad query plans.

It does stabilize, you have to run it after compression. This uncovers so many problems though that it's gonna take a month to fix, and the problems are not easy, many things are broken in DecompressChunk costing or even in upstream costs. I tried before #6550

@mkindahl
Copy link
Contributor Author

This is fine to stabilize the test.

However, this seems like a symptom of a larger problem we've seen with compression where it doesn't have stable plans because (column) stats don't really work.

Normally, an analyze should stabilize tests like this after stats are updated.

Yeah, but it require a more elaborate update of the test, so this is just an immediate fix to avoid the current problem.

Stats is not something we can fix now, however, so disabling certain joins is the only way. But I think it is still important to highlight the larger issue we need to address that can lead to bad query plans.

I think we need to go over these tests and actually try to test DecompressChunk with all kinds of joins since they have slightly different behavior and requirements on what fields are set, so there can be bugs hiding here, but that is a bigger effort.

@mkindahl
Copy link
Contributor Author

Normally, an analyze should stabilize tests like this after stats are updated.
Stats is not something we can fix now, however, so disabling certain joins is the only way. But I think it is still important to highlight the larger issue we need to address that can lead to bad query plans.

It does stabilize, you have to run it after compression. This uncovers so many problems though that it's gonna take a month to fix, and the problems are not easy, many things are broken in DecompressChunk costing or even in upstream costs. I tried before #6550

I suspected this, but did not dig too much into it.

@mkindahl mkindahl merged commit d29ccee into timescale:main Sep 23, 2024
42 of 44 checks passed
@mkindahl mkindahl deleted the flaky-transparent_decompress_chunk branch September 23, 2024 08:35
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.

3 participants