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(storage): init compaction group #2248

Closed
wants to merge 2 commits into from
Closed

Conversation

zwang28
Copy link
Contributor

@zwang28 zwang28 commented Apr 29, 2022

What's changed and what's your intention?

This PR initializes compaction group. To be compatible with current code, we temporarily create one default compaction group and use the existent tiered compaction picker for it. All files are added to the default compaction group, so the whole write path remains the same.

Changes

  • Send compaction request to compaction scheduler when HummockManager::commit_epoch, instead of previous periodic compaction trigger. The compaction frequency are expected to be very different from before.
  • Define dedicated error types for hummock meta module, to distinguish retryable errors from unretryable ones.
  • Move some code from hummock_manager.rs to versioning.rs and compaction.rs, to reduce hummock_manager.rs size.

TODO

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 771 files.

Valid Invalid Ignored Fixed
768 1 2 0
Click to see the invalid file list
  • src/meta/src/hummock/manager/mod.rs

src/meta/src/hummock/manager/mod.rs Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #2248 (0699492) into main (65a1958) will decrease coverage by 0.06%.
The diff coverage is 61.69%.

@@            Coverage Diff             @@
##             main    #2248      +/-   ##
==========================================
- Coverage   71.24%   71.18%   -0.07%     
==========================================
  Files         655      660       +5     
  Lines       83523    83865     +342     
==========================================
+ Hits        59507    59696     +189     
- Misses      24016    24169     +153     
Flag Coverage Δ
rust 71.18% <61.69%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ummock/compaction_group/group_compaction_picker.rs 0.00% <0.00%> (ø)
src/meta/src/hummock/compaction_scheduler.rs 0.00% <0.00%> (ø)
src/meta/src/hummock/compactor_manager.rs 98.21% <ø> (ø)
src/meta/src/hummock/mod.rs 22.44% <0.00%> (+1.08%) ⬆️
src/meta/src/hummock/utils.rs 0.00% <0.00%> (ø)
src/meta/src/rpc/service/hummock_service.rs 0.00% <0.00%> (ø)
src/meta/src/storage/meta_store.rs 25.00% <0.00%> (-37.50%) ⬇️
src/meta/src/hummock/error.rs 13.79% <13.79%> (ø)
src/meta/src/hummock/compaction_group/mod.rs 60.41% <61.70%> (+60.41%) ⬆️
src/meta/src/hummock/mock_hummock_meta_client.rs 51.06% <63.15%> (+1.69%) ⬆️
... and 23 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@zwang28 zwang28 force-pushed the wangzheng/compaction_group branch from adfa51a to 08cb845 Compare April 29, 2022 12:23
@zwang28 zwang28 marked this pull request as ready for review April 29, 2022 12:28
@zwang28 zwang28 force-pushed the wangzheng/compaction_group branch from 2635827 to bce23fb Compare April 29, 2022 14:07
@zwang28 zwang28 marked this pull request as draft April 29, 2022 14:53
@zwang28 zwang28 changed the title feat(storage): init compaction group WIP feat(storage): init compaction group Apr 29, 2022
@zwang28 zwang28 force-pushed the wangzheng/compaction_group branch 2 times, most recently from 0f6c8a7 to 949a98c Compare May 1, 2022 06:27
@zwang28 zwang28 mentioned this pull request May 1, 2022
9 tasks
@zwang28 zwang28 force-pushed the wangzheng/compaction_group branch 3 times, most recently from 78636e0 to 00c107e Compare May 1, 2022 08:38
@zwang28 zwang28 force-pushed the wangzheng/compaction_group branch 4 times, most recently from 5545a39 to f27bbb7 Compare May 1, 2022 11:40
@zwang28 zwang28 force-pushed the wangzheng/compaction_group branch from f27bbb7 to 0699492 Compare May 1, 2022 12:11
@zwang28 zwang28 changed the title WIP feat(storage): init compaction group feat(storage): init compaction group May 1, 2022
@zwang28 zwang28 marked this pull request as ready for review May 1, 2022 12:34
@zwang28 zwang28 marked this pull request as draft May 4, 2022 08:55
@zwang28
Copy link
Contributor Author

zwang28 commented May 5, 2022

Will split to smaller PRs after #2242

@zwang28 zwang28 closed this May 5, 2022
@zwang28 zwang28 deleted the wangzheng/compaction_group branch May 31, 2022 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant