You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2019/07/31 07:45:08 UTC

[GitHub] [bookkeeper] eolivelli commented on issue #2138: Discuss the lifecycle of application data bytebuffer when adding new entries to ledger

eolivelli commented on issue #2138: Discuss the lifecycle of application data bytebuffer when adding new entries to ledger
URL: https://github.com/apache/bookkeeper/issues/2138#issuecomment-516737059
 
 
   I think that it is better to have a safe and robust API.
   We should add a copy of the byte[].
   If the user wants extra performances it can use the ByteBuf based API.
   
   If you are using the (byte[], int, int) method it is very likely that you are using a part of a shared buffer and you are going to re use it, but with current behavior of BK you cannot write to the array anymore, because you won't ever know if BK is going to use it, due to retries.
   
   I would exclude some ClientConfiguration flag for not doing the copy, we would need to duplicate many tests and it will be very messy from the user's point of view.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services