rjgoyln opened a new pull request, #11791:
URL: https://github.com/apache/ozone/pull/11791

   ## What changes were proposed in this pull request?
   
   An interrupted `acquire()` in `KeyOutputStream.write`, `flush` or `hsync` 
throws without taking a permit, but the `finally` block still releases one. 
This happens whether the thread is interrupted while waiting or on entry (e.g. 
after `Future.cancel(true)`), and each such call leaves the stream's semaphore 
one permit larger for good.
   
   With the default `ozone.client.key.write.concurrency` of 1, one interrupted 
call lets `flush` and `hsync` on the same stream overlap with each other and 
with a write. Writes and close still serialize on the write lock.
   
   ## What is the link to the Apache JIRA?
   
   https://issues.apache.org/jira/browse/HDDS-17271
   
   ## How was this patch tested?
   
   - Added a regression test that fails on master and when any one of the three 
call sites is reverted.
   - `hadoop-ozone/client` unit tests (654), checkstyle and PMD pass.
   
   Generated-by: Claude Code (Opus 5.5)
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to