-
Notifications
You must be signed in to change notification settings - Fork 7
feat: use hypercore for TA tables #327
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #327 +/- ##
=======================================
Coverage 94.28% 94.28%
=======================================
Files 1247 1248 +1
Lines 45911 45916 +5
Branches 1455 1455
=======================================
+ Hits 43289 43294 +5
Misses 2317 2317
Partials 305 305
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #327 will not alter performanceComparing Summary
|
91a0c74
to
2965849
Compare
@sentry review |
This comment has been minimized.
This comment has been minimized.
2965849
to
b7054a0
Compare
we're enabling Timescale's hypercore feature for the TA testrun hypertable and the testrun summary and testrun branch summary CAs. We're doing this for the space savings, since we're not really doing point queries on the testruns table. We're segmenting by repoid and branch because we will almost always filter on repo_id if we're running queries against any TA table, and I'm choosing to also segment by branch because we'll be filtering by branch in some of the CAs and when we're reading raw data from the table in the API. For the orderby section I'm choosing to order by testsuite, classname, name then timestamp because i want to have similar tests grouped together in chunks so we can make the most of the compression and also because we're grouping by those fields in the computations for the CAs. the old image is 2 years old and is using timescale 2.10.2. We want to use the hypercore API so we have to have at least 2.18.0, so I'm updating the image we're using so CI works.
b7054a0
to
f3fef84
Compare
@sentry review |
ALTER TABLE ta_timeseries_testrun SET ( | ||
timescaledb.enable_columnstore, | ||
timescaledb.segmentby = 'repo_id, branch', | ||
timescaledb.orderby = 'testsuite, classname, name, timestamp DESC' | ||
); | ||
""", | ||
reverse_sql="ALTER TABLE ta_timeseries_testrun SET (timescaledb.enable_columnstore = false);", | ||
), | ||
RiskyRunSQL( | ||
""" | ||
CALL add_columnstore_policy('ta_timeseries_testrun', INTERVAL '7 days'); | ||
""", | ||
reverse_sql="CALL remove_columnstore_policy('ta_timeseries_testrun');", |
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.
Potential bug: Migration may fail due to TimescaleDB version incompatibility with PostgreSQL 14 in the new Docker image, causing deployment failure.
- Description: The migration attempts to enable TimescaleDB hypercore columnstore features and use functions like
add_columnstore_policy()
and parameters liketimescaledb.enable_columnstore
. These features require TimescaleDB 2.18.0+. However, the pull request changes the Docker image totimescale/timescaledb:latest-pg14
. Recent TimescaleDB versions (2.20.0+) no longer officially support PostgreSQL 14. This incompatibility means the required TimescaleDB functions or parameters may not be available in the deployed environment, leading toProgrammingError
or similar database errors during migration execution. This will cause deployment failures and service outages. - Suggested fix: Verify the exact TimescaleDB version in
timescale/timescaledb:latest-pg14
and ensure it supports both PostgreSQL 14 and the required hypercore columnstore features. If not, update the Docker image to a compatible TimescaleDB version that supports PostgreSQL 15+ or adjust the migration to features compatible with the existing environment.
severity: 0.9, confidence: 0.75
Did we get this right? 👍 / 👎 to inform future reviews.
Fixes CCMRG-1370
we're enabling Timescale's hypercore feature for the TA testrun hypertable and
the testrun summary and testrun branch summary CAs. We're doing this for the
space savings, since we're not really doing point queries on the testruns table.
We're segmenting by repoid and testid because we will almost always filter on
repo_id if we're running queries against any TA table, and I'm choosing to also
segment by test_id since we're likely to group by the test_id and it'd be likely
for multiple different tests to all run around the same time, which I suspect
would reduce the effectiveness of the compression for the computed_name and
test_id columns, since we'd have to store a bunch of different values instead
of just one or two for a given chunk.