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

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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new fb5ecfb073d [fix](fe ut) fix TabletRepairAndBalanceTest #31397 (#35059)
fb5ecfb073d is described below

commit fb5ecfb073d7e0b92322e9545d5f5548a171e760
Author: yujun <yu.jun.re...@gmail.com>
AuthorDate: Fri Jun 7 13:57:34 2024 +0800

    [fix](fe ut) fix TabletRepairAndBalanceTest #31397 (#35059)
    
    cherry pick from #31397
---
 .../org/apache/doris/clone/TabletRepairAndBalanceTest.java | 14 +++++++++-----
 .../org/apache/doris/utframe/MockedBackendFactory.java     |  7 ++++---
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/clone/TabletRepairAndBalanceTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/clone/TabletRepairAndBalanceTest.java
index dfdc6c54451..f19d8ad3b00 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/clone/TabletRepairAndBalanceTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/clone/TabletRepairAndBalanceTest.java
@@ -108,8 +108,11 @@ public class TabletRepairAndBalanceTest {
         FeConstants.tablet_checker_interval_ms = 100;
         Config.tablet_repair_delay_factor_second = 1;
         Config.colocate_group_relocate_delay_second = 1;
-        Config.schedule_slot_num_per_hdd_path = 1000;
-        Config.schedule_slot_num_per_ssd_path = 1000;
+        Config.schedule_slot_num_per_hdd_path = 10000;
+        Config.schedule_slot_num_per_ssd_path = 10000;
+        Config.schedule_batch_size = 10000;
+        Config.disable_colocate_balance_between_groups = true;
+        Config.max_scheduling_tablets = 10000;
         Config.disable_balance = true;
         // 5 backends:
         // 127.0.0.1
@@ -321,7 +324,7 @@ public class TabletRepairAndBalanceTest {
         stmt = (AlterSystemStmt) UtFrameUtils.parseAndAnalyzeStmt(stmtStr, 
connectContext);
         DdlExecutor.execute(Env.getCurrentEnv(), stmt);
         Assert.assertEquals(tag2, be.getLocationTag());
-        ExceptionChecker.expectThrows(UserException.class, () -> 
tbl.checkReplicaAllocation());
+        Thread.sleep(5000);
         checkTableReplicaAllocation(tbl);
         Assert.assertEquals(90, 
invertedIndex.getReplicaMetaTable().cellSet().size());
 
@@ -383,7 +386,8 @@ public class TabletRepairAndBalanceTest {
         stmt = (AlterSystemStmt) UtFrameUtils.parseAndAnalyzeStmt(stmtStr, 
connectContext);
         DdlExecutor.execute(Env.getCurrentEnv(), stmt);
         Assert.assertEquals(tag1, be.getLocationTag());
-        ExceptionChecker.expectThrows(UserException.class, () -> 
tbl.checkReplicaAllocation());
+        Thread.sleep(5000);
+        tbl.checkReplicaAllocation();
 
         checkTableReplicaAllocation(colTbl1);
         checkTableReplicaAllocation(colTbl2);
@@ -573,8 +577,8 @@ public class TabletRepairAndBalanceTest {
                 // it will increase the probability of map to throw 
NoSuchElementException exception.
                 System.out.println(e.getMessage());
             }
-            Thread.sleep(1000);
             System.out.println("wait table " + tbl.getId() + " to be stable");
+            Thread.sleep(1000);
         }
         ExceptionChecker.expectThrowsNoException(() -> 
tbl.checkReplicaAllocation());
         System.out.println("table " + tbl.getId() + " is stable");
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java 
b/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
index 9d6f06a2266..cb228043fdd 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
@@ -175,8 +175,8 @@ public class MockedBackendFactory {
                             if (address == null) {
                                 System.out.println("fe addr thread race, 
please check it");
                             }
-                            System.out.println(
-                                    "get agent task request. type: " + 
request.getTaskType() + ", signature: "
+                            System.out.println(backend.getHost() + ":" + 
backend.getHeartbeatPort() + " "
+                                    + "get agent task request. type: " + 
request.getTaskType() + ", signature: "
                                     + request.getSignature() + ", fe addr: " + 
address);
                             TFinishTaskRequest finishTaskRequest = new 
TFinishTaskRequest(tBackend,
                                     request.getTaskType(), 
request.getSignature(), new TStatus(TStatusCode.OK));
@@ -312,7 +312,8 @@ public class MockedBackendFactory {
         public TAgentResult submitTasks(List<TAgentTaskRequest> tasks) throws 
TException {
             for (TAgentTaskRequest request : tasks) {
                 taskQueue.add(request);
-                System.out.println("receive agent task request. type: " + 
request.getTaskType() + ", signature: "
+                System.out.println(backend.getHost() + ":" + 
backend.getHeartbeatPort() + " "
+                        + "receive agent task request. type: " + 
request.getTaskType() + ", signature: "
                         + request.getSignature());
             }
             return new TAgentResult(new TStatus(TStatusCode.OK));


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

Reply via email to