[opt](config) add max_bucket_num_per_partition config to limit bucket number#61576
Open
gavinchou wants to merge 1 commit intoapache:masterfrom
Open
[opt](config) add max_bucket_num_per_partition config to limit bucket number#61576gavinchou wants to merge 1 commit intoapache:masterfrom
gavinchou wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
…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. Changes: 1. Add `max_bucket_num_per_partition` config in Config.java, defaulting to `autobucket_max_buckets` (128) for consistency. 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. Behavior: - For user-specified buckets (CREATE TABLE / ALTER TABLE ADD PARTITION): if bucket number exceeds this limit, the operation will be rejected. - For auto-bucket feature (Dynamic Partition): bucket number is capped by autobucket_max_buckets automatically. - Set to 0 or negative value to disable this limit.
673630a to
aba8238
Compare
Contributor
Author
|
run compile |
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.
Proposed 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.Changes:
max_bucket_num_per_partitionconfig in Config.java, defaulting toautobucket_max_buckets(128) for consistency.DistributionDescriptor.validate()for CREATE TABLE scenario.InternalCatalog.addPartition()for ALTER TABLE ADD PARTITION scenario.Behavior:
autobucket_max_bucketsautomatically, no change.Error message example:
Test plan
DistributionDescriptorTest.java