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

chore(storage): adjust compaction task priority and fix memory estimation #13914

Merged
merged 7 commits into from
Dec 19, 2023

Conversation

Li0k
Copy link
Contributor

@Li0k Li0k commented Dec 11, 2023

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

What's changed and what's your intention?

  1. Adjust compaction task priority (increase normal task priority to avoid starvation)
  2. Adjust the memory estimation algorithm to consider tombstone to improve accuracy
  3. Add some log for debug

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • 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.

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

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

Comparison is base (beabcb2) 68.06% compared to head (76afe59) 67.98%.
Report is 2 commits behind head on main.

Files Patch % Lines
src/storage/hummock_sdk/src/compact.rs 44.44% 20 Missing ⚠️
src/meta/src/hummock/manager/mod.rs 33.33% 4 Missing ⚠️
.../storage/src/hummock/compactor/compactor_runner.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13914      +/-   ##
==========================================
- Coverage   68.06%   67.98%   -0.08%     
==========================================
  Files        1542     1542              
  Lines      266890   266905      +15     
==========================================
- Hits       181646   181454     -192     
- Misses      85244    85451     +207     
Flag Coverage Δ
rust 67.98% <40.00%> (-0.08%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -78,18 +96,22 @@ pub fn append_sstable_info_to_string(s: &mut String, sstable_info: &SstableInfo)
hex::encode(key_range.right.as_slice())
};

let ratio = sstable_info.stale_key_count * 100 / sstable_info.total_key_count;
let stale_ratio = sstable_info.stale_key_count * 100 / sstable_info.total_key_count;
Copy link
Contributor

Choose a reason for hiding this comment

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

total_key_count be 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch,

It is not expected that there will be an sst with total_key_count = 0, however, I can't guarantee that the arguments passed by the caller are compliant.

Copy link
Contributor

@Little-Wallace Little-Wallace left a comment

Choose a reason for hiding this comment

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

LGTM

@Li0k Li0k added this pull request to the merge queue Dec 19, 2023
Merged via the queue into main with commit 03cd054 Dec 19, 2023
26 of 27 checks passed
@Li0k Li0k deleted the li0k/storage_fix branch December 19, 2023 08:28
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.

3 participants