[Enhancement] Skip predicate column vacuuming when TTL is negative or usage is empty#71290
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks, @stephen-shelby for reviewing. However, CI reports that the added line is not covered by any tests. Should I add unit test for that line? Please leave your opinion. Thanks! |
There was a problem hiding this comment.
Pull request overview
This PR adds a configuration-driven way to suppress predicate column TTL vacuuming (to avoid unnecessary cleanup work/logs when predicate column collection is disabled or the system table is empty), and updates documentation accordingly.
Changes:
- Skip predicate column vacuum entirely when
statistic_predicate_columns_ttl_hoursis negative. - Avoid running in-memory
removeIfwhen the usage map is already empty. - Document the new “negative TTL disables vacuum” behavior in
Configcomments and EN/JA/ZH optimizer docs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| fe/fe-core/src/main/java/com/starrocks/statistic/columns/PredicateColumnsMgr.java | Adds early return for negative TTL and avoids removal pass when the map is empty. |
| fe/fe-core/src/main/java/com/starrocks/common/Config.java | Updates config comment to document that negative TTL disables vacuum. |
| docs/zh/using_starrocks/Cost_based_optimizer.md | Documents negative TTL disabling vacuum (ZH). |
| docs/ja/using_starrocks/Cost_based_optimizer.md | Documents negative TTL disabling vacuum (JA). |
| docs/en/using_starrocks/Cost_based_optimizer.md | Documents negative TTL disabling vacuum (EN). |
Head branch was pushed to by a user without write access
|
Hello, @stephen-shelby @kevincai @stdpain , I added a unittest by 8152cc1. Thanks! |
Signed-off-by: seokyun.ha <seokyun.ha@toss.im>
Signed-off-by: seokyun.ha <seokyun.ha@toss.im>
…columns vacuumed Signed-off-by: seokyun.ha <seokyun.ha@toss.im>
8152cc1 to
04e5a9a
Compare
|
I've done git rebase and push forcly to pass git rebase HEAD~3 --signoff
git push --force-with-lease origin disable-predicate-column-vacuumThanks! |
Signed-off-by: 絵空事スピリット <richard.wang@celerdata.com>
Signed-off-by: 絵空事スピリット <richard.wang@celerdata.com>
🌎 Translation Required?✅ All translation files are up to date.
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 3 / 3 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|
@Mergifyio backport branch-4.1 |
✅ Backports have been createdDetails
|
… usage is empty (#71290) Signed-off-by: seokyun.ha <seokyun.ha@toss.im> Signed-off-by: 絵空事スピリット <richard.wang@celerdata.com> Co-authored-by: 絵空事スピリット <richard.wang@celerdata.com> Co-authored-by: kevincai <771299+kevincai@users.noreply.github.com>
… usage is empty (StarRocks#71290) Signed-off-by: seokyun.ha <seokyun.ha@toss.im> Signed-off-by: 絵空事スピリット <richard.wang@celerdata.com> Co-authored-by: 絵空事スピリット <richard.wang@celerdata.com>
… usage is empty (backport #71290) (#71777) Signed-off-by: seokyun.ha <seokyun.ha@toss.im> Signed-off-by: 絵空事スピリット <richard.wang@celerdata.com> Co-authored-by: seokyun.ha <seokyun.ha@toss.im> Co-authored-by: 絵空事スピリット <richard.wang@celerdata.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Why I'm doing:
I'm using StarRocks with
enable_predicate_columns_collection=falseand have truncated the_statistics_.predicate_columnstable. However, the vacuum process with TTL is still running and generating useless audit logs. I want to suppress predicate column vacuuming by disabling predicate column TTL.What I'm doing:
When
statistic_predicate_columns_ttl_hoursis set to a negative value (e.g.-1), skip vacuuming entirely.Additionally, skip vacuuming
id2columnUsagewhen it is already empty before removal:Already, reflect the changes on documents also.
Fixes #71291
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: