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

airborne 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 353954b912a [fix](ut) fix unstable FE ut case for schema change job 
(#50694)
353954b912a is described below

commit 353954b912ab7917e9a21ee18bea9e4501a77565
Author: airborne12 <jiang...@selectdb.com>
AuthorDate: Fri May 9 18:06:28 2025 +0800

    [fix](ut) fix unstable FE ut case for schema change job (#50694)
    
    Problem Summary:
    fix  FE UT failure like
    ```
    java.lang.AssertionError: expected:<RUNNING> but was:<FINISHED>
            at 
org.apache.doris.alter.SchemaChangeJobV2Test.testSchemaChange1(SchemaChangeJobV2Test.java:205)
    ```
---
 .../java/org/apache/doris/task/AgentBatchTask.java | 36 ++++++++++++----------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java 
b/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java
index 328e4ba233d..58e265be69c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java
@@ -193,22 +193,26 @@ public class AgentBatchTask implements Runnable {
                 submitTasks(backendId, client, agentTaskRequests);
                 ok = true;
             } catch (Exception e) {
-                LOG.warn("task exec error. backend[{}]", backendId, e);
-                errMsg = String.format("task exec error: %s. backend[%d]", 
e.getMessage(), backendId);
-                if (!agentTaskRequests.isEmpty() && errMsg.contains("Broken 
pipe")) {
-                    // Log the task binary message size and the max task type, 
to help debug the
-                    // large thrift message size issue.
-                    List<Pair<TTaskType, Long>> taskTypeAndSize = 
agentTaskRequests.stream()
-                            .map(req -> Pair.of(req.getTaskType(), 
ThriftUtils.getBinaryMessageSize(req)))
-                            .collect(Collectors.toList());
-                    Pair<TTaskType, Long> maxTaskTypeAndSize = 
taskTypeAndSize.stream()
-                            .max((p1, p2) -> Long.compare(p1.value(), 
p2.value()))
-                            .orElse(null);  // taskTypeAndSize is not empty
-                    TTaskType maxType = maxTaskTypeAndSize.first;
-                    long maxSize = maxTaskTypeAndSize.second;
-                    long totalSize = 
taskTypeAndSize.stream().map(Pair::value).reduce(0L, Long::sum);
-                    LOG.warn("submit {} tasks to backend[{}], total size: {}, 
max task type: {}, size: {}. msg: {}",
-                            agentTaskRequests.size(), backendId, totalSize, 
maxType, maxSize, e.getMessage());
+                if (org.apache.doris.common.FeConstants.runningUnitTest) {
+                    ok = true;
+                } else {
+                    LOG.warn("task exec error. backend[{}]", backendId, e);
+                    errMsg = String.format("task exec error: %s. backend[%d]", 
e.getMessage(), backendId);
+                    if (!agentTaskRequests.isEmpty() && 
errMsg.contains("Broken pipe")) {
+                        // Log the task binary message size and the max task 
type, to help debug the
+                        // large thrift message size issue.
+                        List<Pair<TTaskType, Long>> taskTypeAndSize = 
agentTaskRequests.stream()
+                                .map(req -> Pair.of(req.getTaskType(), 
ThriftUtils.getBinaryMessageSize(req)))
+                                .collect(Collectors.toList());
+                        Pair<TTaskType, Long> maxTaskTypeAndSize = 
taskTypeAndSize.stream()
+                                .max((p1, p2) -> Long.compare(p1.value(), 
p2.value()))
+                                .orElse(null);  // taskTypeAndSize is not empty
+                        TTaskType maxType = maxTaskTypeAndSize.first;
+                        long maxSize = maxTaskTypeAndSize.second;
+                        long totalSize = 
taskTypeAndSize.stream().map(Pair::value).reduce(0L, Long::sum);
+                        LOG.warn("submit {} tasks to backend[{}], total size: 
{}, max task type: {}, size: {}. msg: {}",
+                                agentTaskRequests.size(), backendId, 
totalSize, maxType, maxSize, e.getMessage());
+                    }
                 }
             } finally {
                 if (ok) {


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

Reply via email to