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

   ### Search before asking
   
   - [x] I searched the issues and found no report of the same final-flush 
channel leak.
   
   ### Paimon version
   
   2.2-SNAPSHOT, commit a743f963bd8ebf06d2a2200b33c2b8c2cba6da32.
   
   ### Compute Engine
   
   Core Java spill path, JDK 11. Reachable from primary-key write-buffer 
spilling and ordinary append clustering.
   
   ### Minimal reproduce step
   
   Create a `ChannelWriterOutputView` with LZ4 compression and a real 
`BufferFileWriterImpl` channel. Buffer a value, then make the final block write 
fail when `close()` flushes it. A failing `getSize()` has the same cleanup 
problem.
   
   `ChannelWriterOutputViewTest` injects these failures into a writer backed by 
a real temporary FileChannel. It also forces the failure through 
`BinaryExternalSortBuffer.flushMemory` while its caller-owned IOManager remains 
open.
   
   ### What doesn't meet your expectations?
   
   The write/size exception escapes before `writer.close()`, leaving the 
physical channel open. `closeAndDelete()` then rejects deletion of that open 
channel and replaces the original failure. The sorter can retry the failing 
close before it reaches deletion.
   
   The output channel should close even when its final flush or size lookup 
fails, preserving the first exception and attaching a distinct close failure as 
suppressed.
   
   ### Anything else?
   
   This is a final output-flush cleanup failure. It is separate from #7664's 
caller-owned IOManager directory lifetime and #10977's lookup merge-reader 
reset. The fault injection does not simulate an operating-system disk-full 
event, and it does not close the shared IOManager.
   
   ### 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