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

the-other-tim-brown pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git


The following commit(s) were added to refs/heads/main by this push:
     new 7c9d840c Preserve original cause in ReadException on close failure 
(#827)
7c9d840c is described below

commit 7c9d840c6caa028011a4ffae857f372e9ae6b0ee
Author: Aleksandr Andreev <[email protected]>
AuthorDate: Sat Jun 6 23:34:35 2026 +0300

    Preserve original cause in ReadException on close failure (#827)
    
    HudiDataFileExtractor.close() wrapped any failure from closing the
    table metadata or file system view in a new ReadException without
    passing the caught exception as the cause. This discarded the original
    stack trace and root cause (e.g. I/O or permission errors), making such
    failures hard to diagnose.
    
    Pass the caught exception to the ReadException(message, Throwable)
    constructor so the original cause is preserved in the exception chain.
---
 .../src/main/java/org/apache/xtable/hudi/HudiDataFileExtractor.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiDataFileExtractor.java 
b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiDataFileExtractor.java
index f3b73ec2..c61a885f 100644
--- 
a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiDataFileExtractor.java
+++ 
b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiDataFileExtractor.java
@@ -371,7 +371,8 @@ public class HudiDataFileExtractor implements AutoCloseable 
{
       fileSystemViewManager.close();
     } catch (Exception e) {
       throw new ReadException(
-          "Could not close table metadata for table " + 
metaClient.getTableConfig().getTableName());
+          "Could not close table metadata for table " + 
metaClient.getTableConfig().getTableName(),
+          e);
     }
   }
 

Reply via email to