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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6d3f9c6afe1 Fixing closure of file slice readers w/ mdt reader (#12366)
6d3f9c6afe1 is described below

commit 6d3f9c6afe1953531cf84cfcdb20babedecc429e
Author: Sivabalan Narayanan <[email protected]>
AuthorDate: Mon Dec 2 00:20:59 2024 -0800

    Fixing closure of file slice readers w/ mdt reader (#12366)
---
 .../main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java
 
b/hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java
index 0736d3524c9..522b0041127 100644
--- 
a/hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java
+++ 
b/hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java
@@ -459,6 +459,10 @@ public class HoodieBackedTableMetadata extends 
BaseTableMetadata {
       return readFromBaseAndMergeWithAllLogRecords(baseFileReader, sortedKeys, 
true, logRecords, timings, partitionName);
     } catch (IOException ioe) {
       throw new HoodieIOException("Error merging records from metadata table 
for  " + keys.size() + " key : ", ioe);
+    } finally {
+      if (!reuse) {
+        closeReader(readers);
+      }
     }
   }
 

Reply via email to