branch-4.1: [config](pick) Add max_bucket_num_per_partition config to limit bucket number #61576 #62286#62325
Merged
yiguolei merged 2 commits intoapache:branch-4.1from Apr 13, 2026
Conversation
…t number Add a new FE config `max_bucket_num_per_partition` to limit the maximum number of buckets when creating a table or adding a partition. Default value is 768. Changes: 1. Add `max_bucket_num_per_partition` config in Config.java, defaulting to 768 2. Add bucket number validation in `DistributionDescriptor.validate()` for CREATE TABLE scenario 3. Add bucket number validation in `InternalCatalog.addPartition()` for ALTER TABLE ADD PARTITION scenario 4. Add unit tests for the new validation logic 5. Add regression test configurations Behavior: - For user-specified buckets (CREATE TABLE / ALTER TABLE ADD PARTITION): if bucket number exceeds this limit, the operation will be rejected with a helpful error message - For auto-bucket feature (Dynamic Partition): bucket number is capped by `autobucket_max_buckets` automatically, no change - Set to 0 or negative value to disable this limit Cherry-picked from PR apache#61576 and apache#62286
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Apr 13, 2026
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
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.
Summary
Pick PR #61576 and #62286 to branch-4.1, combining both changes into one commit.
Changes
Add a new FE config
max_bucket_num_per_partitionto limit the maximum number of buckets when creating a table or adding a partition. Default value is 768.max_bucket_num_per_partitionconfig in Config.java, defaulting to 768DistributionDescriptor.validate()for CREATE TABLE scenarioInternalCatalog.addPartition()for ALTER TABLE ADD PARTITION scenarioBehavior
autobucket_max_bucketsautomatically, no changeTest
Related Issue
close #61576
close #62286