zhangyue19921010 opened a new issue, #11229:
URL: https://github.com/apache/paimon/issues/11229

   ### Search before asking
   
   - [x] I searched in the issues and found no report of this output-close 
failure path.
   
   ### Paimon version
   
   master at `33dbcfcb17eae5a9c89fd3c7e087df7e6a3957a0`.
   
   ### Compute Engine
   
   Java API, JDK 11.
   
   ### Minimal reproduce step
   
   Create an ordinary append table with `bucket=1`, `bucket-key=id`, 
`bucket.append.ordered=false`, `clustering.incremental=true`, and 
`clustering.columns=id`. Use Avro, a 16 KiB write buffer and 1 KiB pages. 
Commit 600 rows with a 512-character string prefix followed by the row ID, then 
run full compaction through `BatchTableWrite`.
   
   Inject an IOException when the compaction output stream closes. Check the 
caller-owned IOManager spill directory before closing the table write or 
IOManager. The regression reproduces this with both synchronous and 
asynchronous file writes.
   
   ### What doesn't meet your expectations?
   
   The original output error is reported, but 23 sort spill files remain in 
each failing case. Healthy compactions remove the files. 
`BaseAppendFileStoreWrite.clusterRewrite` calls `rewriter.close()` and 
`sorter.close()` in one try block, so the first failure skips sorter cleanup. 
The committed input files remain unchanged.
   
   ### Anything else?
   
   Use the existing `IOUtils.closeAll` helper to attempt both cleanup actions 
while retaining the original failure. The shared IOManager must remain open. 
This concerns failed output finalization; the shared-IOManager ownership fix in 
#10068 is already present.
   
   ### 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]

Reply via email to