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

feat(storage): Improve optimize table compact #6373

Merged
merged 6 commits into from
Jul 1, 2022

Conversation

zhyass
Copy link
Member

@zhyass zhyass commented Jun 30, 2022

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

Summary

The previous compact strategy was to insert the data overwrite directly, it's a "simple and violent" strategy.

Now it is modified to select the appropriate block for compact, and then reorganize the blocks into new segments.

Changelog

  • Improvement
  • Not for changelog (changelog entry is not required)

Related Issues

Fixes #6372

@vercel
Copy link

vercel bot commented Jun 30, 2022

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

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Jul 1, 2022 at 8:59AM (UTC)

@mergify
Copy link
Contributor

mergify bot commented Jun 30, 2022

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@BohuTANG
Copy link
Member

BohuTANG commented Jul 1, 2022

Hi @zhyass
Please add more summaries about this PR to make it more clear to your reviewer.
Thanks

@zhyass zhyass changed the title ISSUE-6372: improve optimize table compact Improve optimize table compact Jul 1, 2022
query/src/storages/storage_table.rs Outdated Show resolved Hide resolved
query/src/storages/fuse/operations/compact.rs Outdated Show resolved Hide resolved
use crate::storages::fuse::statistics::reducers::reduce_statistics;
use crate::storages::fuse::FuseTable;

pub struct CompactMutator<'a> {
Copy link
Member

Choose a reason for hiding this comment

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

Naming is much better than DeletionCollector 👍

@dantengsky
Copy link
Member

@zhyass 👍 finally, the naive impl of compaction is being replaced. left some comments, please have a look

@mergify
Copy link
Contributor

mergify bot commented Jul 1, 2022

This pull request's title is not fulfill the requirements. @zhyass please update it 🙏.

The title should contain one if the following tags:

  • feat: this PR introduces a new feature to the codebase
  • fix: this PR patches a bug in codebase
  • refactor: this PR changes the code base without new features or bugfix
  • ci|build: this PR changes build/testing/ci steps
  • docs|website: this PR changes the documents or websites
  • chore: this PR only has small changes that no need to record

@zhyass zhyass changed the title Improve optimize table compact feat(storage): Improve optimize table compact Jul 1, 2022
@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Jul 1, 2022
@BohuTANG BohuTANG requested a review from dantengsky July 1, 2022 10:03
Copy link
Member

@dantengsky dantengsky left a comment

Choose a reason for hiding this comment

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

LGTM

@databend-bot
Copy link
Member

Wait for another reviewer approval

@BohuTANG BohuTANG merged commit e3d3f09 into databendlabs:main Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-review pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvement: improve optimize table compact
4 participants