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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 818fd88a10d [test](p0) force replica = 1 in p0 regression tests 
(#45684)
818fd88a10d is described below

commit 818fd88a10d123a472b5aa10e90ca9f0d3c79508
Author: Kaijie Chen <chenkai...@selectdb.com>
AuthorDate: Mon Dec 23 10:23:50 2024 +0800

    [test](p0) force replica = 1 in p0 regression tests (#45684)
    
    ### What problem does this PR solve?
    
    Some tests in p0 does not set replica = 1, and will fail when BE number
    is not enough.
    
    This PR fixed this problem by set
    `force_olap_table_replication_allocation` in p0 fe.conf
---
 regression-test/pipeline/p0/conf/fe.conf                           | 2 ++
 .../partition_p0/dynamic_partition/test_dynamic_partition.groovy   | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/regression-test/pipeline/p0/conf/fe.conf 
b/regression-test/pipeline/p0/conf/fe.conf
index 6f4d1e5f21f..41128a7ba50 100644
--- a/regression-test/pipeline/p0/conf/fe.conf
+++ b/regression-test/pipeline/p0/conf/fe.conf
@@ -121,3 +121,5 @@ enable_advance_next_id = true
 # enable deadlock detection
 enable_deadlock_detection = true
 max_lock_hold_threshold_seconds = 10
+
+force_olap_table_replication_allocation=tag.location.default:1
diff --git 
a/regression-test/suites/partition_p0/dynamic_partition/test_dynamic_partition.groovy
 
b/regression-test/suites/partition_p0/dynamic_partition/test_dynamic_partition.groovy
index 7e8274057e3..da881263040 100644
--- 
a/regression-test/suites/partition_p0/dynamic_partition/test_dynamic_partition.groovy
+++ 
b/regression-test/suites/partition_p0/dynamic_partition/test_dynamic_partition.groovy
@@ -15,6 +15,10 @@
 // specific language governing permissions and limitations
 // under the License.
 suite("test_dynamic_partition") {
+    def config_row = sql """ ADMIN SHOW FRONTEND CONFIG LIKE 
'force_olap_table_replication_allocation'; """
+    String old_conf_value = config_row[0][1]
+    sql """ ADMIN SET FRONTEND CONFIG 
("force_olap_table_replication_allocation" = ""); """
+
     // todo: test dynamic partition
     sql "drop table if exists dy_par"
     sql """
@@ -156,4 +160,7 @@ suite("test_dynamic_partition") {
         exception "errCode = 2,"
     }
     sql "drop table if exists dy_par_bad"
+
+    // restore force_olap_table_replication_allocation to old_value
+    sql """ ADMIN SET FRONTEND CONFIG 
("force_olap_table_replication_allocation" = "${old_conf_value}"); """
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to