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 2017/11/15 14:22:37 UTC

[GitHub] jiazhai commented on issue #727: Issue 693: add interface and implementation of LedgerEntries

jiazhai commented on issue #727: Issue 693: add interface and implementation of LedgerEntries
URL: https://github.com/apache/bookkeeper/pull/727#issuecomment-344606742
 
 
   @eolivelli, Regarding the release/retain story, Here is the understanding:
   
   Before this change, read() return result as Iterable<Ledgers>, and if user call Iterable.iterator() multiple times, the references of ByteBuf have potential to be broken, and hard to manage. 
   e.g. one of the iterator accessed some entry and then released the reference; while another iterator still want to access the same entry. 
   
   By this change, each call of iterator() will inc the references, and after usage, caller will dec the reference, it is manage-able and more safe.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services