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

fix(compaction): support trivial reclaim #10258

Merged
merged 11 commits into from
Jun 13, 2023

Conversation

Little-Wallace
Copy link
Contributor

@Little-Wallace Little-Wallace commented Jun 9, 2023

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

What's changed and what's your intention?

fix #10215

This PR will create reference for every sstable files in group-split. It means that a large group can not reduce the number of sstable files at the time when it splits a large table to an independent group. We will use space-reclaim compaction to reduce the number of files after group split.
I add a compatibility field in hummock.proto to ensure this change would not affect those risingwave cluster which upgrade from an old version. If the version-delta was generated by the old binary, it would still move all files which have no data of valid table-id to new group.

Checklist For Contributors

  • 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).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
@Little-Wallace Little-Wallace marked this pull request as ready for review June 9, 2023 09:43
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Copy link
Contributor

@zwang28 zwang28 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 PTAL space_reclaim part which is refactored a lot.

return Some(CompactionInput {
input_levels: vec![
InputLevel {
level_idx: level.level_idx,
Copy link
Contributor

Choose a reason for hiding this comment

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

is level.level_idx always 0?

@zwang28 zwang28 requested a review from Li0k June 12, 2023 08:30
});
}
}
state.last_level = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

how about change state.last_level = 1 -> state.last_level = base_level if convenient

@Little-Wallace
Copy link
Contributor Author

image

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Copy link
Contributor

@Li0k Li0k left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix

@Li0k Li0k added this pull request to the merge queue Jun 13, 2023
@Li0k Li0k removed this pull request from the merge queue due to a manual request Jun 13, 2023
@Little-Wallace Little-Wallace added this pull request to the merge queue Jun 13, 2023
Merged via the queue into risingwavelabs:main with commit 2f92852 Jun 13, 2023
@Little-Wallace Little-Wallace deleted the fix-branched branch June 13, 2023 07:43
Little-Wallace added a commit to Little-Wallace/risingwave that referenced this pull request Jun 21, 2023
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
zwang28 pushed a commit that referenced this pull request Jun 27, 2023
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
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.

bug(compaction group): expired task is not correctly rejected
3 participants