PDGGK opened a new pull request, #10298:
URL: https://github.com/apache/paimon/pull/10298

   ### Purpose
   
   `LanceRecordsWriter.close()` flushes the final Arrow batch before closing 
the native Lance writer and the Arrow writer. If that final flush throws, the 
method returns immediately and both writer resources are skipped.
   
   `MosaicRecordsWriter`, the other native Arrow-backed `BundleFormatWriter` 
implementation, already continues its cleanup after a flush failure while 
preserving the first failure and attaching later failures as suppressed 
exceptions.
   
   ### What changes
   
   Apply the same failure-path cleanup semantics to `LanceRecordsWriter`:
   
   - attempt the final flush first
   - still close the native Lance writer if the flush fails
   - still close the Arrow writer if an earlier cleanup step fails
   - rethrow the first failure and attach later cleanup failures as suppressed
   
   The normal close order is unchanged.
   
   ### Tests
   
   `LanceRecordsWriterTest#testCloseContinuesCleanupAfterFlushFailure` verifies 
that a flush failure does not skip either close, and that later close failures 
are preserved as suppressed exceptions. The test fails with the production 
change reverted and passes with this fix.
   
   The full `LanceRecordsWriterTest` suite passes 6/6. Spotless and checkstyle 
are clean, `git diff --check` passes, and the module compiles with 
`maven.compiler.release=8`.
   
   ### API and Format
   
   No change.
   


-- 
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