gaoyunhaii commented 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-585495323
 
 
   Very thanks @zhijiangW for the review! As a whole I agree with the thought 
to reduce the complexity of the current model. However I think the 
`NettyMessageParser` is still required, since the parser has its own 
intermediate states, and if we push the parsing logic into the message 
directly, these state will be mixed with the message fields. We could keep the 
main thought of split the procedure for different messages directly, but move 
the parsing logic into the parser instead of the messages. I think in this way 
we could keep the benefit and do not introduce the above problem. 
   
   **The only drawback compared with the initial version is that now we need to 
keep two message header buffers. However, since the buffer size is only dozens 
of bytes, it should not cause application of new chunk and thus should not 
affect the total direct memory used. ** 
   
   I have updated the PR according to the above logic. :)

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