JingsongLi commented on PR #9902:
URL: https://github.com/apache/paimon/pull/9902#issuecomment-5708351992

   Good catch. `codec.createOutputStream(...)` leases a compressor from the 
`CodecPool`, and without closing the stream the lease is never returned — every 
probe permanently grew the leased count. Wrapping the probe in 
try-with-resources is the minimal fix, and the test asserting a stable 
`CodecPool.getLeasedCompressorsCount` across repeated calls pins the behavior 
precisely.
   
   Dropping the `writer.flush()` in `AbstractTextFileWriter.close()` is also 
correct — `close()` flushes on its own.
   


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