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: compact segments #8590

Merged
merged 25 commits into from
Nov 7, 2022

Conversation

dantengsky
Copy link
Member

@dantengsky dantengsky commented Nov 1, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

new implementation of compact segments

  • which strictly preserves the order of ingestion

    to avoid the ripple effects which may lead to a large number of consecutive compacted segments being split and merged again and again, for even a single fragmented segment, during compaction, segments of size [threshold, 2 * threshold) are allowed to be generated.

  • the "semantic" of the statement optimize table t compact segment limit n adjusted to the max number of fragmented segments to be compacted
    note that at the end of compaction, if there are fragmented segments left (the combined size of them should be lesser than the threshold), they will be compacted into a segment, those segments are not counted for the limit.

Fixes #issue

@vercel
Copy link

vercel bot commented Nov 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
databend ✅ Ready (Inspect) Visit Preview Nov 7, 2022 at 10:09AM (UTC)

@mergify mergify bot added the pr-refactor this PR changes the code base without new features or bugfix label Nov 1, 2022
@dantengsky dantengsky force-pushed the refactor-segment-compact-new branch from beffc99 to c0ddfbc Compare November 3, 2022 12:10
@dantengsky dantengsky marked this pull request as ready for review November 7, 2022 02:37
@dantengsky dantengsky requested review from zhyass and BohuTANG November 7, 2022 02:37
Copy link
Member

@zhyass zhyass left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot merged commit 5190b33 into databendlabs:main Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants