We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What did you do?
As illustrated in the picture, when flush, mem-table will be flushed to level0 and trigger major compaction.
[0-3]
[5-8]
[7-100]
[0-100]
[100-150]
[7-100] involved twice, which will cause write and space amplification
My idea is to use a compact_status to record sstables that involved into compaction, and remove them in the next compaction
compact_status
let mut compact_status = HashSet::new(); while level < MAX_LEVEL - 2 { if !option.is_threshold_exceeded_major(version, level) { break; } let (mut meet_scopes_l, start_l, end_l) = Self::this_level_scopes(version, min, max, level); let (mut meet_scopes_ll, start_ll, end_ll) = Self::next_level_scopes(version, &mut min, &mut max, level, &meet_scopes_l)?; // remain sstables that not involved in the compaction meet_scopes_l.retain(|scope| compact_status.insert(scope.gen)); meet_scopes_ll.retain(|scope| compact_status.insert(scope.gen)); // do compaction ...... level += 1; }
The text was updated successfully, but these errors were encountered:
crwen
KKould
No branches or pull requests
Bug Report
What did you do?
As illustrated in the picture, when flush, mem-table will be flushed to level0 and trigger major compaction.
[0-3]
,[5-8]
in level 0 and[7-100]
in level 1 are selected, and produce[0-100]
in level 1[7-100]
was selected again, and compacting with[100-150]
[7-100]
involved twice, which will cause write and space amplificationMy idea is to use a
compact_status
to record sstables that involved into compaction, and remove them in the next compactionThe text was updated successfully, but these errors were encountered: