This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 94ea17aa87d [fix](fe ut) fix TabletRepairAndBalanceTest (#31397)
94ea17aa87d is described below
commit 94ea17aa87d1b711f905f0e57a04047498457421
Author: yujun <[email protected]>
AuthorDate: Wed Feb 28 13:03:31 2024 +0800
[fix](fe ut) fix TabletRepairAndBalanceTest (#31397)
---
.../apache/doris/clone/TabletRepairAndBalanceTest.java | 15 ++++++++++-----
.../org/apache/doris/utframe/MockedBackendFactory.java | 7 ++++---
2 files changed, 14 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 979943b1609..0417a525b8b 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
@@ -106,11 +106,15 @@ public class TabletRepairAndBalanceTest {
FeConstants.runningUnitTest = true;
System.out.println(runningDir);
FeConstants.runningUnitTest = true;
+ Config.tablet_schedule_interval_ms = 100;
Config.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
@@ -322,7 +326,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, replicaMetaTable.cellSet().size());
@@ -384,7 +388,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);
@@ -594,8 +599,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 afbffaa26c9..c705893c672 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
@@ -192,8 +192,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));
@@ -329,7 +329,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: [email protected]
For additional commands, e-mail: [email protected]