You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Ivan Kelly (JIRA)" <ji...@apache.org> on 2011/09/06 17:06:10 UTC

[jira] [Commented] (BOOKKEEPER-64) LedgerHandle#asyncAddEntry expects byte[] to remain available until completion

    [ https://issues.apache.org/jira/browse/BOOKKEEPER-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098066#comment-13098066 ] 

Ivan Kelly commented on BOOKKEEPER-64:
--------------------------------------

Actually,this patch is wrong. I misremembered what computeDigestAndPackageForSending does. I need to think about this more.

> LedgerHandle#asyncAddEntry expects byte[] to remain available until completion
> ------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-64
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-64
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Ivan Kelly
>         Attachments: BOOKKEEPER-64.diff, BOOKKEEPER-64.diff
>
>
> When a call is made to asyncAddEntry, the byte[] passed must not change until the async confirmation comes back. Otherwise the result is undefined. While for some API this is acceptable, I BK is aimed at applications where buffering may be used. This may force an extra copy before sending the data to BK to ensure the data sticks around. This is pointless as one of the first things addEntry does is make a copy while staging the data to send.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira