gaoyunhaii commented on a change in pull request #7368: [FLINK-10742][network] 
Let Netty use Flink's buffers directly in credit-based mode
URL: https://github.com/apache/flink/pull/7368#discussion_r390719053
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/CreditBasedPartitionRequestClientHandlerTest.java
 ##########
 @@ -443,10 +587,13 @@ private static BufferResponse createBufferResponse(
                // Skip general header bytes
                serialized.readBytes(NettyMessage.FRAME_HEADER_LENGTH);
 
-               // Deserialize the bytes again. We have to go this way, because 
we only partly deserialize
-               // the header of the response and wait for a buffer from the 
buffer pool to copy the payload
-               // data into.
-               BufferResponse deserialized = 
BufferResponse.readFrom(serialized);
+               // Deserialize the bytes again. We have to go this way to 
ensure the data buffer part
+               // is consistent with the input channel sent to.
 
 Review comment:
   I think the previous comments is trying to explain why it needs to 
deserialize the bytes again: since it need to reach the state that the message 
is deserialized but not copied to a Flink Buffer yet. I thought that the 
comment might not be consistent with current implementation. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to