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

Add support for merging compressed chunks #7669

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erimatnor
Copy link
Contributor

@erimatnor erimatnor commented Feb 7, 2025

Compressed chunks can be merged by applying the same copy+heap swap technique to the internal compressed chunks as applied to non-compressed chunks. However, it is necessary to consider cases when some chunks are compressed and some are not.

The way this is handled is to pick the first compressed chunk found among the input chunks, and then use that as the "result" chunk. In the next step all the chunks' non-compressed heaps are merged followed by all the "internal" compressed heaps. In the last step, the result chunk has its non-compressed and compressed heaps swapped with the merged ones, respectively.

In all other regards, the merging works the same as before when merging non-compressed chunks.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 91.34615% with 9 lines in your changes missing coverage. Please review.

Project coverage is 81.98%. Comparing base (59f50f2) to head (702d543).
Report is 787 commits behind head on main.

Files with missing lines Patch % Lines
tsl/src/chunk.c 91.34% 3 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7669      +/-   ##
==========================================
+ Coverage   80.06%   81.98%   +1.91%     
==========================================
  Files         190      246      +56     
  Lines       37181    45308    +8127     
  Branches     9450    11316    +1866     
==========================================
+ Hits        29770    37147    +7377     
- Misses       2997     3704     +707     
- Partials     4414     4457      +43     

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

@erimatnor erimatnor force-pushed the merge-chunks-compressed branch 2 times, most recently from 3b2bca9 to 2cfb52f Compare February 7, 2025 15:54
@erimatnor erimatnor force-pushed the merge-chunks-compressed branch from 2cfb52f to bc91a59 Compare February 19, 2025 09:34
@erimatnor erimatnor marked this pull request as ready for review February 19, 2025 13:05
Compressed chunks can be merged by applying the same copy+heap swap
technique to the internal compressed heaps as done for the
non-compressed heaps. However, special consideration is necessary for
cases where some chunks are compressed and some are not.

The way this is handled is to pick the first compressed chunk found
among the input chunks, and then use that as the "result" chunk. In
the next step all the chunks' non-compressed heaps are merged followed
by all the "internal" compressed heaps. In the last step, the result
chunk has its non-compressed and compressed heaps swapped with the
merged ones, respectively.

In all other regards, the merging works the same as before when merging
non-compressed chunks.
@erimatnor erimatnor force-pushed the merge-chunks-compressed branch from bc91a59 to 702d543 Compare February 21, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant