[
https://issues.apache.org/jira/browse/BOOKKEEPER-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287129#comment-13287129
]
Sijie Guo commented on BOOKKEEPER-280:
--------------------------------------
[~mmerli] the patch seems good to me. only one place, it would be better to
change -1 to use a constant define in "long entryId = -1;". The constant define
you could refer BOOKKEEPER-260.
But one thing that I concerned is that changing return value breaks binary
compatibility (i.e. bytecodes that was previously compiled against the old API
will no longer run).
http://stackoverflow.com/questions/3589946/retrofitting-void-methods-to-return-its-argument-to-facilitate-fluency-breaking
In order not to block BOOKKEEPER-220, I would suggest you implement sync
addEntry based on bookkeeper's asyncAddEntry first to get the entry id.
> LedgerHandle.addEntry() should return an entryId
> ------------------------------------------------
>
> Key: BOOKKEEPER-280
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-280
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Matteo Merli
> Priority: Minor
> Fix For: 4.2.0
>
> Attachments:
> 0001-BOOKKEEPER-280-LedgerHandle.addEntry-should-return-a.patch,
> 0001-BOOKKEEPER-280-LedgerHandle.addEntry-should-return-a.patch
>
>
> LedgerHandle.asyncAddEntry callback provides the entryId of the newly added
> entry, but the synchronous version return void.
--
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