You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by gi...@git.apache.org on 2017/07/21 07:57:20 UTC

[GitHub] eolivelli opened a new issue #271: LedgerHandle#readEntries leaks ByteBufs if getEntry not called or getEntryInputStream() not called and closed

eolivelli opened a new issue #271: LedgerHandle#readEntries leaks ByteBufs if getEntry not called or getEntryInputStream() not called and closed
URL: https://github.com/apache/bookkeeper/issues/271
 
 
   After the switch to Netty 4 I noticed this import "API change", that is very important to be documented.
   
   Inside LedgerEntry object we retain a ByteBuf, which is turn is automatically 'released' only in this cases:
   - getEntry() is called
   - getEntryInputStream() is called and the InputStream is closed
   - the ByteBuf is manually closed by the client
   
   The real tricky thing is that if the client calls readEntry and the Enumeration is not fully processed we are going to leak ByteBufs and so head/direct memory.
   
   Proposals:
   introduce some "entry reference counting" and ensure that all generated entries by a LedgerHandler are "disposed" on LedgerHandler.close() and  make sure that when BookKeeper client is closed all of the LedgerHandlers process their own disposal procedure
   
   
   
   
   
   
 
----------------------------------------------------------------
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