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

refactor(compaction): decouple compactor struct with compactor context #11832

Closed
wants to merge 6 commits into from

Conversation

wcy-fdu
Copy link
Contributor

@wcy-fdu wcy-fdu commented Aug 22, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

as title

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #11832 (1ed9074) into main (586bb0d) will decrease coverage by 0.01%.
The diff coverage is 61.90%.

@@            Coverage Diff             @@
##             main   #11832      +/-   ##
==========================================
- Coverage   70.20%   70.20%   -0.01%     
==========================================
  Files        1373     1373              
  Lines      228576   228618      +42     
==========================================
+ Hits       160472   160492      +20     
- Misses      68104    68126      +22     
Flag Coverage Δ
rust 70.20% <61.90%> (-0.01%) ⬇️

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

Files Changed Coverage Δ
.../storage/src/hummock/compactor/compactor_runner.rs 79.92% <47.45%> (-2.52%) ⬇️
src/storage/src/hummock/compactor/mod.rs 59.45% <68.49%> (+0.12%) ⬆️
.../storage/src/hummock/compactor/compaction_utils.rs 59.31% <77.77%> (+2.84%) ⬆️
...age/src/hummock/compactor/shared_buffer_compact.rs 85.52% <100.00%> (+0.18%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@wcy-fdu wcy-fdu requested review from Li0k and hzxa21 August 22, 2023 09:51
Copy link
Collaborator

@hzxa21 hzxa21 left a comment

Choose a reason for hiding this comment

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

IIUC, the goal is to separate task-level parameters and process-level parameters. However, I don't see how this PR can help since we still have CompactorContext storing all the parameters. This PR is somehow preliminary and just modifies severl method to accept handcrafted parameters instead of CompactorContext. I suggest we work on a PR for parameter separation as a whole.

Comment on lines +210 to +211
let compactor_metrics_cloned = self.compactor_metrics.clone();
let is_share_buffer_compact = self.is_share_buffer_compact;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems redundant to clone the metric and define two variables here.

@wcy-fdu
Copy link
Contributor Author

wcy-fdu commented Sep 1, 2023

Close as #12020 is more reasonable

@wcy-fdu wcy-fdu closed this Sep 1, 2023
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.

2 participants