[
https://issues.apache.org/jira/browse/BOOKKEEPER-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762595#comment-13762595
]
Sijie Guo edited comment on BOOKKEEPER-446 at 9/10/13 1:39 AM:
---------------------------------------------------------------
I think we also need to clean up the return codes used in client package:
- in general, bookkeeper/ledger handle should not directly return
*ZKException*, since we allow non-zookeeper metadata managers. so they should
use the return codes returned by *Op*.
- there are still places returning zookeeper return code as bookkeeper return
code. we should also clean them up.
- attached a new patch to clean up the bookkeeper client return codes.
- add ReplicationException code for replication pipeline, rather than using
ZKException
- add UnexpectedConditionException code for unexpected conditions. e.g.
ledgerCreateOp return OK with a null ledger handle, rather than using
ZKException.
Besides that, provide two simple test cases in LedgerCreateDeleteTest rather
than in ReadWriteTest.
was (Author: hustlmsp):
I think we also need to clean up the return codes used in client package:
- in general, bookkeeper/ledger handle should not directly return
*ZKException*, since we allow non-zookeeper metadata managers. so they should
use the return codes returned by *Op*.
- there are still places returning zookeeper return code as bookkeeper return
code. we should also clean them up.
- attached a new patch to clean up the bookkeeper client return codes.
- add ReplicationException code for replication pipeline, rather than using
ZKException
- add UnexpectedConditionException code for unexpected conditions. e.g.
ledgerCreateOp return OK with a null ledger handle, rather than using
ZKException.
Besides that, provide two simple test cases in LedgerCreateDeleteTest rather
than ReadWriteTest.
> BookKeeper.createLedger(..) should not mask the error with ZKException
> ----------------------------------------------------------------------
>
> Key: BOOKKEEPER-446
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-446
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-server
> Affects Versions: 4.2.0
> Reporter: Vinay
> Assignee: Rakesh R
> Fix For: 4.2.2, 4.3.0
>
> Attachments: 0001-BOOKKEEPER-446-create-ledger-exceptions.patch,
> BOOKKEEPER-446.patch
>
>
> in {{BookKeeper.createLedger()}} following code is masking the error with
> ZKException. Should throw the original exception to client.
> {code} if (counter.getLh() == null) {
> LOG.error("ZooKeeper error: " + counter.getrc());
> throw BKException.create(Code.ZKException);
> }{code}
--
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