Apache9 commented on code in PR #4597:
URL: https://github.com/apache/hbase/pull/4597#discussion_r915651261


##########
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java:
##########
@@ -429,6 +429,9 @@ private void flushBuffer(CompletableFuture<Long> future, 
ByteBuf dataBuf,
       future.completeExceptionally(new IOException("stream already broken"));
       // it's the one we have just pushed or just a no-op
       waitingAckQueue.removeFirst();
+
+      // This method takes ownership of the dataBuf so we need release it 
before returning.
+      dataBuf.release();

Review Comment:
   Ah, yeah. Just call ByteBuf.release directly is also fine but we need to do 
the null check by ourselves.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to