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 KeyDictBuilder for the merge tree memtable #3334

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Feb 20, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR implements the KeyDictBuilder for the merge tree memtable

  • Each builder has fixed capacity
  • It interns key and returns an index to get the key from the builder again
  • It can scan keys in sorted order from the builder
  • It can build a KeyDict by invoking finish()
    • It will replace pk index with a new value so the pk index has the same order the key

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.

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Feb 20, 2024
@evenyag evenyag marked this pull request as ready for review February 20, 2024 09:31
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (43fd87e) 85.23% compared to head (3d8da26) 84.82%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3334      +/-   ##
==========================================
- Coverage   85.23%   84.82%   -0.41%     
==========================================
  Files         878      882       +4     
  Lines      143009   144085    +1076     
==========================================
+ Hits       121896   122225     +329     
- Misses      21113    21860     +747     

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

src/mito2/src/memtable/merge_tree/dict.rs Outdated Show resolved Hide resolved
src/mito2/src/memtable/merge_tree/dict.rs Outdated Show resolved Hide resolved
src/mito2/src/memtable/merge_tree/dict.rs Show resolved Hide resolved
Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

src/mito2/src/memtable/merge_tree/dict.rs Outdated Show resolved Hide resolved
src/mito2/src/memtable/merge_tree/dict.rs Show resolved Hide resolved
@evenyag evenyag enabled auto-merge February 20, 2024 15:30
@evenyag evenyag added this pull request to the merge queue Feb 20, 2024
Merged via the queue into GreptimeTeam:main with commit f087a84 Feb 20, 2024
17 checks passed
@evenyag evenyag deleted the feat/merge-tree-index branch February 20, 2024 15:52
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.

3 participants