sijie commented on a change in pull request #244: Issue#243 - asyncAddEntry
fails with NPE with LedgerHandlerAdv
URL: https://github.com/apache/bookkeeper/pull/244#discussion_r127568518
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
##########
@@ -720,8 +720,7 @@ public void asyncAddEntry(final byte[] data, final
AddCallback cb,
* @param ctx
* some control object
*/
- public void asyncAddEntry(final long entryId, final byte[] data, final
AddCallback cb, final Object ctx)
- throws BKException {
+ public void asyncAddEntry(final long entryId, final byte[] data, final
AddCallback cb, final Object ctx) {
Review comment:
since we are touching this function now, I'd like to also raise one
discussing about the semantic here. Currently it is totally the application's
responsibility on managing the semantic on using this API. it would be good to
add some constraints on this API:
- if entryId is negative (the fix @eolivelli tried to fix)
- if entryId is smaller than LAC, that means this entry is a duplicated entry
in both cases, we should fail the addEntry with exceptions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services