wombatu-kun opened a new pull request, #9016: URL: https://github.com/apache/paimon/pull/9016
### Purpose Closes #9007. `close()` in `SingleFileWriter` and `FormatTableSingleFileWriter` routed only `IOException` to `abort()`, so an unchecked failure skipped cleanup entirely. The `finally` still sets `closed = true`, so nothing cleans up later either: the output stream stays open and the partially written file is orphaned. `writeImpl()`, `writeRow()` and `writeBundle()` have caught `Throwable` and called `abort()` since 2024, only `close()` was left narrower. This is on the default path. `async-file-write` defaults to `true`, and `AsyncPositionOutputStream` throws a bare `RuntimeException` from `flush()` and `close()` when the writing thread is interrupted, so cancelling a Flink job can orphan a data file. `abort()` is wrapped because `FileIO.deleteQuietly` only swallows `IOException`, so an unchecked cleanup failure would otherwise replace the real error. The rolling writers above still catch only `IOException` and are left for a separate change. ### Tests Six tests in `SingleFileWriterTest` and `FormatTableSingleFileWriterTest`: unchecked failure from the format writer's `close()`, unchecked failure from the stream's `flush()` (asserting via `TraceableFileIO` that the stream is released), `IOException` still reaching the caller unwrapped, and a failing `abort()` not replacing the original exception. All fail against the unpatched code. -- 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]
