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 27132c87245 [fix](Export) fix a memory leak in the FE because of the ExportJob (#44019) 27132c87245 is described below commit 27132c87245d2ab7d9c2ff534d955dd298ae52a9 Author: Tiewei Fang <ftw2...@163.com> AuthorDate: Sun Nov 17 19:48:49 2024 +0800 [fix](Export) fix a memory leak in the FE because of the ExportJob (#44019) ### What problem does this PR solve? Problem Summary: When an `Export` job has finished or been cancelled, `ExportMgr` will maintain a reference of the `ExportJob` object. Therefore, we need to clear these no longer used objects; otherwise it will cause a memory leak in the FE. --- fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java index 98cfb443ec8..554185a2ed6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java @@ -703,6 +703,9 @@ public class ExportJob implements Writable { finishTimeMs = System.currentTimeMillis(); failMsg = new ExportFailMsg(type, msg); jobExecutorList.clear(); + selectStmtListPerParallel.clear(); + allOutfileInfo.clear(); + partitionToVersion.clear(); if (FeConstants.runningUnitTest) { return; } @@ -750,6 +753,9 @@ public class ExportJob implements Writable { outfileInfo = GsonUtils.GSON.toJson(allOutfileInfo); // Clear the jobExecutorList to release memory. jobExecutorList.clear(); + selectStmtListPerParallel.clear(); + allOutfileInfo.clear(); + partitionToVersion.clear(); Env.getCurrentEnv().getEditLog().logExportUpdateState(this, ExportJobState.FINISHED); LOG.info("finish export job {}", id); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org