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: Implement append mode for a region #3558

Merged
merged 10 commits into from
Mar 27, 2024

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Mar 21, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This PR implements append mode for a mito region.

  • By default, append_mode is false and the engine removes duplicate rows.
  • If append_mode is true, the engine keeps all duplicate rows.

It adds a dedup flag to the MergeReader. The MergeReader will keep rows with duplicate keys but still yield rows in sorted order.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Mar 21, 2024
@evenyag evenyag force-pushed the feat/region-append-option branch from ad748b4 to 051e8ea Compare March 21, 2024 12:46
@evenyag evenyag mentioned this pull request Mar 21, 2024
4 tasks
@evenyag evenyag marked this pull request as ready for review March 21, 2024 13:32
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 94.05594% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 84.84%. Comparing base (653697f) to head (e45e73b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3558      +/-   ##
==========================================
- Coverage   85.15%   84.84%   -0.31%     
==========================================
  Files         929      930       +1     
  Lines      154003   154236     +233     
==========================================
- Hits       131137   130862     -275     
- Misses      22866    23374     +508     

@evenyag evenyag requested a review from MichaelScofield March 21, 2024 13:53
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.

LGTM

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.

How to set this mode? Rest LGTM

@evenyag
Copy link
Contributor Author

evenyag commented Mar 26, 2024

How to set this mode? Rest LGTM

I'll expose this to table options in another PR.

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

@MichaelScofield MichaelScofield added this pull request to the merge queue Mar 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 27, 2024
@evenyag evenyag force-pushed the feat/region-append-option branch from 051e8ea to e45e73b Compare March 27, 2024 03:04
@evenyag evenyag enabled auto-merge March 27, 2024 03:07
@evenyag evenyag added this pull request to the merge queue Mar 27, 2024
Merged via the queue into GreptimeTeam:main with commit 922b1a9 Mar 27, 2024
19 checks passed
@evenyag evenyag deleted the feat/region-append-option branch March 27, 2024 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants