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: compaction support different level #848

Merged
merged 10 commits into from
Apr 21, 2023

Conversation

jiacai2050
Copy link
Contributor

@jiacai2050 jiacai2050 commented Apr 19, 2023

Which issue does this PR close?

Closes #

Rationale for this change

Currently all sst are in level0, and we find that when flush memtable-> sst0,
build parquet filter cost lots of CPU, which affect write throughout indirectly.

What changes are included in this PR?

Introduce SST at level 1, this is how data is moved between different components:

  • memtable -> level0
  • level0 -> level1
  • level1 -> level1

Flush memtable will only output sst at level 0, and it will skip parquet filter building.

Fow now, compaction strategy is same for 0->1 and 1->1, later we need to investigate different strategy for them.

Are there any user-facing changes?

No

How does this change test

CI

@jiacai2050 jiacai2050 marked this pull request as ready for review April 19, 2023 09:38
analytic_engine/src/sst/manager.rs Outdated Show resolved Hide resolved
analytic_engine/src/sst/parquet/writer.rs Outdated Show resolved Hide resolved
analytic_engine/src/sst/parquet/writer.rs Outdated Show resolved Hide resolved
analytic_engine/src/sst/parquet/writer.rs Outdated Show resolved Hide resolved
analytic_engine/src/row_iter/merge.rs Outdated Show resolved Hide resolved
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

LGTM

@jiacai2050 jiacai2050 merged commit 0a28aaf into apache:main Apr 21, 2023
4 checks passed
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* feat: add level 1 sst file

* add more comments for compaction tests

* wait manual compaction finish

* fix CR
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.

None yet

3 participants