You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2023/03/19 16:30:46 UTC

[iotdb] branch master updated: [IOTDB-5700] Clean temporary files created by UDF query after it finishes (#9376)

This is an automated email from the ASF dual-hosted git repository.

rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 524cac789e [IOTDB-5700] Clean temporary files created by UDF query after it finishes (#9376)
524cac789e is described below

commit 524cac789ef3122d655264e42db0ef59514ce417
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Mon Mar 20 00:30:40 2023 +0800

    [IOTDB-5700] Clean temporary files created by UDF query after it finishes (#9376)
---
 .../org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFContext.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFContext.java b/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFContext.java
index be40778823..293fc97ac4 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFContext.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFContext.java
@@ -22,6 +22,7 @@ package org.apache.iotdb.db.mpp.transformation.dag.udf;
 import org.apache.iotdb.commons.udf.service.UDFClassLoaderManager;
 import org.apache.iotdb.db.mpp.plan.expression.Expression;
 import org.apache.iotdb.db.mpp.plan.expression.multi.FunctionExpression;
+import org.apache.iotdb.db.service.TemporaryQueryDataFileService;
 
 import java.time.ZoneId;
 import java.util.HashMap;
@@ -50,6 +51,8 @@ public class UDTFContext {
       }
     } finally {
       UDFClassLoaderManager.getInstance().finalizeUDFQuery(queryId);
+      // close and delete UDF temp files
+      TemporaryQueryDataFileService.getInstance().deregister(queryId);
     }
   }