[opt](config) add max_bucket_num_per_partition config to limit bucket number#61576
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
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
|
run compile |
Add DistributionDescriptorTest to test the bucket number limit functionality: - Test normal bucket number within limit - Test bucket number exceeds limit throws AnalysisException - Test disable limit by setting to 0 - Test auto bucket is not limited by this config - Test random distribution also respects limit - Test bucket number zero or negative validation
|
run buildall |
TPC-H: Total hot run time: 26974 ms |
TPC-DS: Total hot run time: 168322 ms |
FE UT Coverage ReportIncrement line coverage |
Two existing tests use large bucket numbers (2400) which exceed the default max_bucket_num_per_partition limit. Disable the limit in these tests to avoid test failures: - DecommissionTest.testDecommissionBackend - PartitionExprUtilTest.testAutoBucketLargeDataCalculatesBuckets
|
Fixed unit tests in DecommissionTest and PartitionExprUtilTest to disable max_bucket_num_per_partition limit for tests that use large bucket numbers. The other failing tests (LoadManagerTest, TableQueryPlanActionTest, CountStarSmallestSlotTest) are pre-existing issues unrelated to this change. |
|
run buildall |
TPC-H: Total hot run time: 26709 ms |
TPC-DS: Total hot run time: 168017 ms |
…st configurations Configure max_bucket_num_per_partition in regression test configs for testing.
|
run buildall |
TPC-H: Total hot run time: 26540 ms |
TPC-DS: Total hot run time: 168930 ms |
FE UT Coverage ReportIncrement line coverage |
|
skip buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
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