gaoyunhaii edited a comment on issue #7368: [FLINK-10742][network] Let Netty 
use Flink's buffers directly in credit-based mode
URL: https://github.com/apache/flink/pull/7368#issuecomment-583945495
 
 
   Hi @zhijiangW Very thanks for the review! I have modified the codes 
accordingly, and the change to the several main problems is that:
   
   1. Make the new decoder only used in the downstream and simplify the 
NettyMessageParser.
   2. How to deal with the discarded buffer when the corresponding input 
channel has been released ? The hard part is that we have to parse the size of 
the message and discard the message, therefore we have two possible processes:
       1. Parse the size of the message and discard the message.
       2. Parse the whole message and emit the message to the next decoder 
normally.
   
   The first case causes the problem of null Data Buffer. I agree with that we 
should deal with the null buffer in advance by canceling the request in the 
decoder directly. However, I think the Discard state is still needed since the 
decoder has to know if the following bytes should be received or should be 
discarded. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to