Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](Export) Cancel the export job when the ring buffer have no enough slot #45244

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading