horizonzy opened a new pull request, #4867: URL: https://github.com/apache/bookkeeper/pull/4867
## Motivation Read throttling can block Netty IO/EventLoop threads when read permits are exhausted. Once the IO threads are blocked, the server may stop dispatching new requests and Netty write completions may not make progress, preventing read permits from being released. ## Changes - Move read permit acquisition out of `ReadEntryProcessor.create()` and related construction paths. - Acquire read permits when the read processor actually runs on the worker thread. - Avoid releasing read permits in rejected-execution paths where no permit has been acquired. - Add a regression test to verify request creation does not block Netty write completion when read permits are exhausted. ## Validation Added regression test fails on the old implementation and passes with this change: ```text testCreateDoesNotStarveWriteCompletionThatReleasesReadPermit -- 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]
