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/20 08:15:15 UTC

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

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

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


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

commit fe414cfab77a2d26c6e446ead8c0e64bceb4e2fc
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Mon Mar 20 16:15:08 2023 +0800

    [IOTDB-5700] Clean temporary files created by UDF query after it finishes (#9376) (#9380)
---
 .../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);
     }
   }