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: add a threshold for compact block #8322

Merged
merged 8 commits into from
Oct 23, 2022
Merged

Conversation

zhyass
Copy link
Member

@zhyass zhyass commented Oct 19, 2022

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

Summary

Add a threshold 2 for compact blocks, if the selected blocks are less than 2*max_threads, compact is skipped.

Add a limit to batch compaction.

optimize table [database.]table_name compact [segment] [limit segment_count];

Fixes #8316
Fixes #8241

@vercel
Copy link

vercel bot commented Oct 19, 2022

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

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Oct 22, 2022 at 4:58PM (UTC)

@zhyass zhyass requested review from wubx and dantengsky October 19, 2022 14:22
@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label Oct 19, 2022
@BohuTANG
Copy link
Member

Unit test failed: test_fuse_snapshot_optimize_compact

@BohuTANG
Copy link
Member

There are many tests failed and need to address.

@BohuTANG
Copy link
Member

Some sqllogic tests related to compact still need to modify.

@zhyass zhyass marked this pull request as draft October 19, 2022 15:50
@zhyass zhyass marked this pull request as ready for review October 20, 2022 13:35
@zhyass zhyass marked this pull request as draft October 20, 2022 13:37
@zhyass zhyass marked this pull request as ready for review October 22, 2022 16:59
@BohuTANG BohuTANG merged commit c6c77d3 into databendlabs:main Oct 23, 2022
@BohuTANG
Copy link
Member

BohuTANG commented Oct 23, 2022

@soyeric128 for the new option:
optimize table <table> compact [segment] [limit <segment count>];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: optimize table tb_name compact let the data grow biger feat: optimize table xx compact limit 1000
3 participants