[
https://issues.apache.org/jira/browse/BOOKKEEPER-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13752272#comment-13752272
]
Ivan Kelly commented on BOOKKEEPER-654:
---------------------------------------
My main issue with this is the pattern being used. The pattern is to try to
call in executor, if fail, run in current thread context. Makes me very
uncomfortable. What if the current context is the ZK callback, and the callback
makes a synchronous zk call? Whats more, it's not just our code which has to be
clean of such patterns. It's conceivable that a client could have a callback
like
{code}
class AddCallback {
void addComplete(int rc, ...) {
if (rc != BKException.Code.OK) {
zk.setData(/* update some state about WAL */);
} else {
...
}
}
}
{code}
If the client in question has passed in a zk to the bookkeeper client, they now
have a hung thread. Given that this JIRA is to try and protect users from
themselves, we should be as comprehensive as we can. And since being
comprehensive probably means big changes, I think it's better to do it in 4.3,
and skip for 4.2.2.
Minor comments:
- RunTimeException too broad
- ClientClosedException should be used instead of BkClientClosedException
everywhere.
> Bookkeeper client operations are allowed even after its closure, bk#close()
> ---------------------------------------------------------------------------
>
> Key: BOOKKEEPER-654
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-654
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Rakesh R
> Assignee: Rakesh R
> Fix For: 4.2.2, 4.3.0
>
> Attachments:
> 0001-BOOKKEEPER-654-Bookkeeper-client-operations-are-allo.patch,
> 0001-BOOKKEEPER-654-testcase-to-understand-more.patch,
> 0002-BOOKKEEPER-654.patch, 0003-BOOKKEEPER-654.patch,
> 0004-BOOKKEEPER-654.patch, 0005-BOOKKEEPER-654.patch,
> 0006-BOOKKEEPER-654-handled-inprogress-and-newrequests.patch
>
>
> User can perform below operations with the closed bookkeeper client, which
> was instantiated with external zkclient.
> - open a closed ledger
> - create a new ledger
> Also, ledgerhandle operations like fencing/add/write are infinitely hanging.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira