eolivelli commented on a change in pull request #276: Issue-271 
LedgerHandle#readEntries leaks ByteBufs
URL: https://github.com/apache/bookkeeper/pull/276#discussion_r129337447
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerEntry.java
 ##########
 @@ -53,22 +54,49 @@ public long getLength() {
         return length;
     }
 
+    /**
+     * Returns the content of the entry.
+     * This method can be called only once.
+     * While using v2 wire protocol this method will automatically release the 
internal ByteBuf
+     * @return
+     */
     public byte[] getEntry() {
+        if (data == null) {
 
 Review comment:
   @sijie I will update the patch as soon as possibile.
   Thank you
 
----------------------------------------------------------------
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