merlimat commented on a change in pull request #1799: 
BlockAwareSegmentInputStreamImpl shouldn't use LedgerEntry#getLength
URL: https://github.com/apache/incubator-pulsar/pull/1799#discussion_r189042435
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/s3offload/impl/BlockAwareSegmentInputStreamImpl.java
 ##########
 @@ -122,14 +122,15 @@ private int readEntries() throws IOException {
             Iterator<LedgerEntry> iterator = ledgerEntriesOnce.iterator();
             while (iterator.hasNext()) {
                 LedgerEntry entry = iterator.next();
-                int entryLength = (int) entry.getLength();
+                ByteBuf buf = entry.getEntryBuffer().retain();
 
 Review comment:
   Shouldn't this retain be compensated with a `release()`. I assume the 
entries returned by this method will be released but the entryBuffer itself 
would have to be released.

----------------------------------------------------------------
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