You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "horizonzy (via GitHub)" <gi...@apache.org> on 2026/08/11 19:02:04 UTC
[PR] Fix read throttling deadlock on Netty IO threads [bookkeeper]
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: commits-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix read throttling deadlock on Netty IO threads [bookkeeper]
Posted by "StevenLuMT (via GitHub)" <gi...@apache.org>.
StevenLuMT commented on PR #4867:
URL: https://github.com/apache/bookkeeper/pull/4867#issuecomment-5364939136
[ERROR] src/test/java/org/apache/bookkeeper/proto/ReadEntryProcessorTest.java:[23,15] (imports) UnusedImports: Unused import: org.junit.Assert.fail.
[ERROR] src/test/java/org/apache/bookkeeper/proto/ReadEntryProcessorTest.java:[29,15] (imports) UnusedImports: Unused import: org.mockito.Mockito.never.
[ERROR] src/test/java/org/apache/bookkeeper/proto/ReadEntryProcessorTest.java:[49,8] (imports) UnusedImports: Unused import: java.util.concurrent.TimeoutException.
[ERROR] src/test/java/org/apache/bookkeeper/proto/ReadEntryProcessorTest.java:[208] (regexp) RegexpSingleline: Trailing whitespace
@horizonzy
--
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: commits-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org