This is an automated email from the ASF dual-hosted git repository. morningman 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 12dcb17eedb [fix](Export) Cancel the export job when the ring buffer have no enough slot (#45244) 12dcb17eedb is described below commit 12dcb17eedbca64e854a067d20fd04c0218eb152 Author: Tiewei Fang <fangtie...@selectdb.com> AuthorDate: Sun Dec 15 10:48:42 2024 +0800 [fix](Export) Cancel the export job when the ring buffer have no enough slot (#45244) Problem Summary: If there happen exceptions in `addMemoryTask`, we must update the state of the export job to `CANCELLED` because we have added this export job in `ExportMgr`. --- .../src/main/java/org/apache/doris/load/ExportMgr.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/ExportMgr.java b/fe/fe-core/src/main/java/org/apache/doris/load/ExportMgr.java index 94ae436ee6d..ed6ee29bb9c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/load/ExportMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/load/ExportMgr.java @@ -122,8 +122,16 @@ public class ExportMgr { 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); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org