[
https://issues.apache.org/jira/browse/BOOKKEEPER-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429196#comment-13429196
]
Ivan Kelly commented on BOOKKEEPER-326:
---------------------------------------
{quote}
-1 on the changes Ivan made to LedgerHandle. it breaks the throttle mechanism
we deployed in BookKeeper now. for now, we use semaphore to do rate limit on
both read/write operations, if permits are exhausted, the client which called
addEntry/readEntries would be blocked until the permits are releases. the
changes would not block client when permits are exhausted.{quote}
I had forgotten that PendingReadOp reaches into the ledger handle to take the
permit. I think, even if don't move to a rate limiting semaphore, we should
move all calls to the semaphore into LedgerHandle and remove all accesses from
without. This way, we could make the change I suggested, which would be another
safeguard against deadlocking, and is generally better software engineering
practice also.
@Rakesh
The patch you have up is good. Is there a reason this JIRA isn't patch
available?
> DeadLock during ledger recovery
> --------------------------------
>
> Key: BOOKKEEPER-326
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-326
> Project: Bookkeeper
> Issue Type: Bug
> Affects Versions: 4.1.0
> Reporter: Vinay
> Priority: Blocker
> Attachments: BK_DeadLock.log, BOOKKEEPER-326.1.patch,
> BOOKKEEPER-326.2.patch, BOOKKEEPER-326.part2.diff, BOOKKEEPER-326.patch
>
>
> Deadlock found during ledger recovery. please find the attached thread dump.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira