yujun777 commented on code in PR #42276:
URL: https://github.com/apache/doris/pull/42276#discussion_r1811664060
##########
fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java:
##########
@@ -169,29 +171,34 @@ public void run() {
client = ClientPool.backendPool.borrowObject(address);
List<TAgentTaskRequest> agentTaskRequests = new
LinkedList<TAgentTaskRequest>();
for (AgentTask task : tasks) {
- try {
- agentTaskRequests.add(toAgentTaskRequest(task));
- } catch (Exception e) {
- task.failed();
- throw e;
- }
+ agentTaskRequests.add(toAgentTaskRequest(task));
}
client.submitTasks(agentTaskRequests);
if (LOG.isDebugEnabled()) {
for (AgentTask task : tasks) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("send task: type[{}], backend[{}],
signature[{}]",
- task.getTaskType(), backendId,
task.getSignature());
- }
+ LOG.debug("send task: type[{}], backend[{}],
signature[{}]",
+ task.getTaskType(), backendId,
task.getSignature());
}
}
ok = true;
} catch (Exception e) {
LOG.warn("task exec error. backend[{}]", backendId, e);
+ errMsg = String.format("task exec error: %s", e.getMessage());
} finally {
if (ok) {
ClientPool.backendPool.returnObject(address, client);
} else {
+ for (AgentTask task : tasks) {
+ task.failed();
+
+ // CreateReplicaTask will not trigger a retry in
ReportTask.
+ // Therefore, it needs to be marked as failed here and
all
+ // threads waiting for the result of CreateReplicaTask
need
+ // to be awakened.
+ if (task instanceof CreateReplicaTask) {
+ ((CreateReplicaTask) task).countDownToZero(errMsg);
Review Comment:
override CreateReplicaTask::failed() ? call countDownToZero in its failed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]