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

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


The following commit(s) were added to refs/heads/master by this push:
     new 80cf3fcb4 [core] fix memory leak bug of bulkLoader (#3243)
80cf3fcb4 is described below

commit 80cf3fcb4d78c7af55d01decdeab4b27b364fa92
Author: wangwj <[email protected]>
AuthorDate: Sat Apr 20 20:19:34 2024 +0800

    [core] fix memory leak bug of bulkLoader (#3243)
---
 paimon-core/src/main/java/org/apache/paimon/lookup/BulkLoader.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/paimon-core/src/main/java/org/apache/paimon/lookup/BulkLoader.java 
b/paimon-core/src/main/java/org/apache/paimon/lookup/BulkLoader.java
index 72aa62e4a..75e6a90ea 100644
--- a/paimon-core/src/main/java/org/apache/paimon/lookup/BulkLoader.java
+++ b/paimon-core/src/main/java/org/apache/paimon/lookup/BulkLoader.java
@@ -71,6 +71,7 @@ public class BulkLoader {
             recordNum++;
             if (recordNum % 1000 == 0 && writer.fileSize() >= 
options.targetFileSizeBase()) {
                 writer.finish();
+                writer.close();
                 writer = null;
                 recordNum = 0;
             }
@@ -83,6 +84,7 @@ public class BulkLoader {
         try {
             if (writer != null) {
                 writer.finish();
+                writer.close();
             }
 
             if (files.size() > 0) {

Reply via email to