Skip to content

Add compression flush callback #7298

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

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

erimatnor
Copy link
Member

@erimatnor erimatnor commented Sep 24, 2024

Add the ability to define a callback function that gets called every time a new segment is flushed during compression. The callback can be used to report compression progress.

Also expose the function to create a tuple sort state for compression.

Disable-check: force-changelog-file

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.26%. Comparing base (59f50f2) to head (39a7bd2).
Report is 1009 commits behind head on main.

Files with missing lines Patch % Lines
tsl/src/compression/compression.c 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7298       +/-   ##
===========================================
+ Coverage   80.06%   92.26%   +12.19%     
===========================================
  Files         190      205       +15     
  Lines       37181    38567     +1386     
  Branches     9450     9999      +549     
===========================================
+ Hits        29770    35583     +5813     
+ Misses       2997     2984       -13     
+ Partials     4414        0     -4414     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@mkindahl mkindahl left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +1332 to +1333
row_compressor->on_flush(row_compressor,
row_compressor->rows_compressed_into_current_value);
Copy link
Member

@fabriziomello fabriziomello Sep 24, 2024

Choose a reason for hiding this comment

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

I assume for the following PRs we'll have some tests for covering it, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, there is no code coverage now because nothing is using it. But the table access method will be using it.

Add the ability to define a callback function that gets called every
time a new segment is flushed during compression. The callback can be
used to report compression progress.

Also expose the function to create a tuple sort state for compression.
@erimatnor erimatnor force-pushed the compression-expose-functions branch from e2289a1 to 39a7bd2 Compare September 25, 2024 09:25
@erimatnor erimatnor merged commit ee5eb9b into timescale:main Sep 25, 2024
37 of 38 checks passed
@akuzm akuzm added the released-2.17.0 Released in 2.17.0 label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released-2.17.0 Released in 2.17.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants