Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BePPPower committed Dec 10, 2024
1 parent 7dbae6e commit 8c49254
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/load/ExportMgr.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,16 @@ public void addExportJobAndRegisterTask(ExportJob job) throws Exception {
job.getBrokerDesc());
}
// ATTN: Must add task after edit log, otherwise the job may finish before adding job.
for (int i = 0; i < job.getCopiedTaskExecutors().size(); i++) {
Env.getCurrentEnv().getTransientTaskManager().addMemoryTask(job.getCopiedTaskExecutors().get(i));
try {
for (int i = 0; i < job.getCopiedTaskExecutors().size(); i++) {
Env.getCurrentEnv().getTransientTaskManager().addMemoryTask(job.getCopiedTaskExecutors().get(i));
}
} catch (Exception e) {
// If there happens exceptions in `addMemoryTask`
// we must update the state of export job to `CANCELLED`
// because we have added this export in `ExportMgr`
job.updateExportJobState(ExportJobState.CANCELLED, 0L, null,
ExportFailMsg.CancelType.RUN_FAIL, e.getMessage());
}
LOG.info("add export job. {}", job);
}
Expand Down

0 comments on commit 8c49254

Please sign in to comment.