You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Sijie Guo (JIRA)" <ji...@apache.org> on 2013/08/04 22:53:48 UTC
[jira] [Commented] (BOOKKEEPER-654) Bookkeeper client operations
are allowed even after its closure, bk#close()
[ https://issues.apache.org/jira/browse/BOOKKEEPER-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728988#comment-13728988 ]
Sijie Guo commented on BOOKKEEPER-654:
--------------------------------------
no. you should not change the behavior of submit & submitOrdered since it is a generic class, which might be used in hedwig not just bookkeeper.
my comment was in OrderedSafeGenericCallback. I said that a shutdown flag can't prevent submitOrdered after shutdown. so you need to catch exceptions of submitOrdered in #operationComplete of OrderedSafeGenericCallback.
BTW, 'closed' is better than 'isShutdown' for a flag.
{quote}
public final void operationComplete(final int rc, final T result) {
+ if (executor.isShutdown) {
+ safeOperationComplete(BKException.Code.BkClientClosedException,
+ result);
+ return;
+ }
executor.submitOrdered(orderingKey, new SafeRunnable() {
@Override
{quote}
> 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-testcase-to-understand-more.patch, 0002-BOOKKEEPER-654.patch, 0003-BOOKKEEPER-654.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