zhangyue19921010 opened a new issue, #11195: URL: https://github.com/apache/paimon/issues/11195
### Search before asking - [x] I searched in the issues and found nothing similar. ### Paimon version 2.2-SNAPSHOT, commit `f1747821245bb1e844a28e5afc1dd4f38410f5df`. ### Compute Engine Java core append writer, JDK 11.0.18. ### Minimal reproduce step Use an ordinary bucketed append writer and flush three real Avro files to start an asynchronous compaction. Hold the failing rewriter until all three prepares return, then release it and wait for the `IOException` task to complete, then append more rows without preparing another commit and close the writer once. With direct writing, the current uncommitted data file remains after `close()` throws. With a spillable write buffer, its spill files and buffer remain. The core regression uses a 1 MiB file target, a 16 KiB buffer and a real single-thread executor; it checks resources before closing the externally owned `IOManager`. A second case also makes the compaction manager's cleanup throw. ### What doesn't meet your expectations? A failed compaction should still release the writer's own current file and buffer. `AppendOnlyWriter.close()` calls `sync()` before the cleanup phases. Cancelling an already completed failed future has no effect, and the `ExecutionException` skips every later phase. Run synchronization and the existing cleanup phases through `IOUtils.closeAll`, preserving their order. It attempts all phases and rethrows the first failure with subsequent failures suppressed. ### Anything else? The three new fault regressions fail at retained-resource assertions on the unchanged commit above and pass with the change. Existing prepared data files stay intact. Prepared with TRAE CLI. ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- 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]
