duongkame commented on code in PR #6690:
URL: https://github.com/apache/ozone/pull/6690#discussion_r1612123943


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChunkBufferImplWithByteBuffer.java:
##########
@@ -163,4 +175,12 @@ public String toString() {
     return getClass().getSimpleName() + ":limit=" + buffer.limit()
         + "@" + Integer.toHexString(hashCode());
   }
+
+  @Override
+  protected void finalize() throws Throwable {

Review Comment:
   GRPC is known to have some limits in the outbound:
    1. It doesn't provide any callbacks or events to notify it successfully 
sends a response. (unlike when sending a request, you can listen to the 
response observer).
    2. Even if the buffer being sent is a direct one (or mapped buffer), grpc 
will not do zero-copy when sending it as a response. It will do another copy to 
re-frame the original buffer. The copy is done through a reused heap buffer. 
   
   This PR may be very out of scope (of this PR discussion), but GRPC is not 
the right tool for the job. And we will keep making unnatural efforts to cope 
with it (like we're doing). 
   
   
   
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to