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


With regards,
Apache Git Services

Reply via email to