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

feat(mito): avoid buffering all batches for the same primary key #2658

Merged
merged 7 commits into from
Oct 31, 2023

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Oct 26, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR implements the merge reader in a more streaming way. The merge reader checks whether the buffered rows of the batch are more than batch_size and outputs the batch if it exceeds batch_size. This may slow down the reader but the query engine may benefit from a larger batch.

It adds more tests to check the correctness of this behavior.

#2660 describes the merge algorithm.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

#2660

@evenyag evenyag changed the title feat(mito): avoid buffering all batches for the same primary key in merge reader feat(mito): avoid buffering all batches for the same primary key Oct 26, 2023
@evenyag evenyag marked this pull request as ready for review October 26, 2023 08:53
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #2658 (d4cfd53) into develop (36c0742) will decrease coverage by 0.31%.
The diff coverage is 97.23%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2658      +/-   ##
===========================================
- Coverage    84.99%   84.68%   -0.31%     
===========================================
  Files          743      743              
  Lines       120701   120977     +276     
===========================================
- Hits        102592   102452     -140     
- Misses       18109    18525     +416     

@evenyag evenyag force-pushed the feat/merge-batch-size branch from 151ee1e to c2b0082 Compare October 30, 2023 12:20
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

DLJB

src/mito2/src/read.rs Outdated Show resolved Hide resolved
Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

kudu master 🦌

@waynexia waynexia added this pull request to the merge queue Oct 31, 2023
Merged via the queue into GreptimeTeam:develop with commit 465c8f7 Oct 31, 2023
12 checks passed
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