This is an automated email from the ASF dual-hosted git repository.

deardeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1316d4bd633 [fix](bucket) Raise autobucket_min_buckets default from 1 
to 3 (#63729)
1316d4bd633 is described below

commit 1316d4bd633749e61adce3cbd1b88345fc00d9b3
Author: deardeng <[email protected]>
AuthorDate: Mon Jun 15 10:33:42 2026 +0800

    [fix](bucket) Raise autobucket_min_buckets default from 1 to 3 (#63729)
    
    Prevent the auto bucket algorithm from computing a bucket number that is
    too small. A minimum of 3 buckets provides a more reasonable lower bound
    for parallelism and data distribution under the auto bucket strategy.
---
 fe/fe-common/src/main/java/org/apache/doris/common/Config.java        | 2 +-
 .../test/java/org/apache/doris/catalog/DynamicPartitionTableTest.java | 4 ++--
 regression-test/suites/autobucket/test_autobucket.groovy              | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java 
b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
index 3adbc610ff9..87f3c94e6e4 100644
--- a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
+++ b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
@@ -2613,7 +2613,7 @@ public class Config extends ConfigBase {
     public static long analyze_record_limit = 20000;
 
     @ConfField(mutable = true, masterOnly = true, description = {"Minimum 
number of buckets for auto bucketing."})
-    public static int autobucket_min_buckets = 1;
+    public static int autobucket_min_buckets = 3;
 
     @ConfField(mutable = true, masterOnly = true, description = {"Maximum 
number of buckets for auto bucketing."})
     public static int autobucket_max_buckets = 128;
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/catalog/DynamicPartitionTableTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/catalog/DynamicPartitionTableTest.java
index aa8c2034f11..8b13325db69 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/catalog/DynamicPartitionTableTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/catalog/DynamicPartitionTableTest.java
@@ -1835,7 +1835,7 @@ public class DynamicPartitionTableTest {
         partitions = Lists.newArrayList(table.getAllPartitions());
         partitions.sort(Comparator.comparing(Partition::getId));
         Assert.assertEquals(53, partitions.size());
-        Assert.assertEquals(1, partitions.get(partitions.size() - 
1).getDistributionInfo().getBucketNum());
+        Assert.assertEquals(3, partitions.get(partitions.size() - 
1).getDistributionInfo().getBucketNum());
         Config.autobucket_out_of_bounds_percent_threshold = 0.5;
 
         table.readLock();
@@ -1887,7 +1887,7 @@ public class DynamicPartitionTableTest {
                     if (i < 52) {
                         Assert.assertEquals(10, idx.getTablets().size());
                     } else if (i == 52) {
-                        Assert.assertEquals(1, idx.getTablets().size());
+                        Assert.assertEquals(3, idx.getTablets().size());
                     } else if (i == 53) {
                         Assert.assertEquals(20, idx.getTablets().size());
                     }
diff --git a/regression-test/suites/autobucket/test_autobucket.groovy 
b/regression-test/suites/autobucket/test_autobucket.groovy
index 3d0515e59c2..dc1af89fd19 100644
--- a/regression-test/suites/autobucket/test_autobucket.groovy
+++ b/regression-test/suites/autobucket/test_autobucket.groovy
@@ -62,7 +62,7 @@ suite("test_autobucket") {
     // XXX: buckets at pos(8), next maybe impl by sql meta
     assertEquals(5, Integer.valueOf(result.get(0).Buckets))
     // set back to default
-    sql "ADMIN SET FRONTEND CONFIG ('autobucket_min_buckets' = '1')"
+    sql "ADMIN SET FRONTEND CONFIG ('autobucket_min_buckets' = '3')"
     sql "drop table if exists autobucket_test_min_buckets"
 
     // set max to 1
@@ -84,7 +84,7 @@ suite("test_autobucket") {
     result = sql_return_maparray "show partitions from 
autobucket_test_max_buckets"
     logger.info("${result}")
     // XXX: buckets at pos(8), next maybe impl by sql meta
-    assertEquals(1, Integer.valueOf(result.get(0).Buckets)) //equals max bucket
+    assertEquals(3, Integer.valueOf(result.get(0).Buckets)) //equals max bucket
     // set back to default
     sql "ADMIN SET FRONTEND CONFIG ('autobucket_max_buckets' = '128')"
     sql "drop table if exists autobucket_test_max_buckets"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to