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: Defines structs in the merge tree memtable #3326

Merged
merged 3 commits into from Feb 19, 2024

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Feb 19, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR defines common structs for a new memtable, the merge tree memtable.

  • The merge tree memtable divides a tree into multiple partitions.
  • Each partition contains multiple shards.
  • Each shard contains a key dictionary and a list of data parts.
  • The tree finds a shard by a row's primary key and inserts the row into the mutable data part of the shard.
  • It freezes mutable parts into immutable parts and merges them later

It also ports necessary codes to implement the Memtable trait from the time series memtable.

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 19, 2024
@evenyag evenyag changed the base branch from poc/merge-tree-memtable to main February 19, 2024 10:19
@evenyag evenyag marked this pull request as ready for review February 19, 2024 10:20
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

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

Comparison is base (29f11d7) 85.57% compared to head (73991b6) 84.77%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3326      +/-   ##
==========================================
- Coverage   85.57%   84.77%   -0.81%     
==========================================
  Files         872      878       +6     
  Lines      141958   142704     +746     
==========================================
- Hits       121481   120976     -505     
- Misses      20477    21728    +1251     

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
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

@v0y4g3r v0y4g3r added this pull request to the merge queue Feb 19, 2024
Merged via the queue into GreptimeTeam:main with commit 43fd87e Feb 19, 2024
33 checks passed
@v0y4g3r v0y4g3r deleted the feat/merge-tree-basic branch February 19, 2024 11:54
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.

None yet

3 participants