-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[Feature] Support enabling partition aggregation for tables created in older versions #59102
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1bb3d9c to
5f99797
Compare
12594e0 to
6919291
Compare
luohaha
reviewed
May 26, 2025
fe/fe-core/src/main/java/com/starrocks/alter/LakeTableAlterMetaJobBase.java
Outdated
Show resolved
Hide resolved
luohaha
reviewed
May 27, 2025
wyb
reviewed
May 28, 2025
fe/fe-core/src/main/java/com/starrocks/alter/LakeTableAlterMetaJobBase.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/common/proc/PartitionsProcDir.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/alter/LakeTableAlterMetaJobBase.java
Outdated
Show resolved
Hide resolved
2ca89f9 to
4fa2e8e
Compare
Signed-off-by: sevev <qiangzh95@gmail.com>
Signed-off-by: sevev <qiangzh95@gmail.com>
85ebf0f to
e96324c
Compare
luohaha
reviewed
May 29, 2025
fe/fe-core/src/main/java/com/starrocks/alter/LakeTableAlterMetaJobBase.java
Outdated
Show resolved
Hide resolved
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 80 / 89 (89.89%) file detail
|
[BE Incremental Coverage Report]✅ pass : 5 / 5 (100.00%) file detail
|
kevincai
approved these changes
May 30, 2025
wyb
approved these changes
May 30, 2025
gengjun-git
approved these changes
May 30, 2025
Seaven
approved these changes
May 30, 2025
AntiTopQuark
pushed a commit
to AntiTopQuark/starrocks
that referenced
this pull request
Jun 19, 2025
…n older versions (StarRocks#59102) Signed-off-by: sevev <qiangzh95@gmail.com> Signed-off-by: AntiTopQuark <AntiTopQuark1350@outlook.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Why I'm doing:
In previous PRs, we implemented table-level
enable_partition_aggregationproperty to reduce API calls in StarRocks shared-data mode. However, this property currently can only be specified during table creation. As a result, even after users upgrade to the latest version, they cannot enable this feature for existing tables unless they create new ones.Therefore, we need to develop a method to activate this functionality for historical tables.
What I'm doing:
Users can enable/disable this feature using the following SQL command when they upgrade to new version:
But there is one critical limitation:consecutive modifications to enable_partition_aggregation are prohibited.
e.g.
Why:
enable_partition_aggregationis designed as a non-frequently toggled property. Modification support is primarily intended to allow enabling the feature on tables created in old version.enable_partition_aggregationwill modify the table's metadata storage format. So the system must support coexistence of both metadata formats during the transition period. After modifyenable_partition_aggregation, the table metadata will keep ametadataSwitchVersionfield to track the version of the format change. Frequent modifications will increased complexity in compatibility logic, So the modification is prohibited whenmetadataSwitchVersionis not 0.When we can do the next modification of
enable_partition_aggregation property?If you want to modify
enable_partition_aggregation, you can check themetadataSwitchVersionfirst. You can runshow '/proc/dbs/$db/$table/partitions'to check themetadataSwitchVersion.How can we efficiently reset the metadataSwitchVersion to 0 after completing the metadata format transition?
metadataSwitchVersionis reset to 0 when the version beforemetadataSwitchVersionis vacuumed. So we can decreaselake_autovacuum_grace_period_minutesto speed up vacuum.Fixes #58316
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: