jianguotian opened a new pull request, #77:
URL: https://github.com/apache/paimon-mosaic/pull/77

   ## Summary
   
   Rust may call Java `InputFile.readFully` from native worker threads while 
loading row-group ranges. Java exceptions are thread-local, so an exception 
thrown on a worker was previously lost at the JNI call boundary and surfaced to 
the caller as a generic `RuntimeException`.
   
   This change preserves the original Java throwable across the native read and 
rethrows the same object on the calling Java thread.
   
   ## Changes
   
   - Carry a pending Java input exception inside the corresponding Rust 
`io::Error`, without shared cross-read state.
   - Restore the original throwable from reader-open, row-group-open, and 
column-read JNI boundaries.
   - Clear worker-thread exceptions before native threads detach and avoid 
replacing an already pending Java exception.
   - Release `InputFile` and throwable global references on both open-time and 
background-read failures.
   
   This does not change the Mosaic file format or any public API.
   
   ## Testing
   
   - Regression test: before the fix, a background `IOException` became 
`RuntimeException("open row group failed: Java exception was thrown")`; after 
the fix, the exact same `IOException` object is restored.
   - Regression tests verify failed reads release the `InputFile` and throwable 
global references and leave the reader handle valid until explicitly freed.
   - `cargo fmt --all -- --check`
   - `cargo clippy --workspace --all-targets -- -D warnings`
   - `cargo test --workspace --release` — 399 passed
   - Java 11: `mvn test` — 62 passed
   - Java 8: `mvn test` — 62 passed
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to