[ 
https://issues.apache.org/jira/browse/FLINK-7517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16266688#comment-16266688
 ] 

ASF GitHub Bot commented on FLINK-7517:
---------------------------------------

Github user NicoK commented on the issue:

    https://github.com/apache/flink/pull/4594
  
    Yes @zhijiangW, I kept the original logic.
    I guess, the reasoning behind using off-heap netty buffers only was to 
reduce the overhead before transmitting messages over the wire: 1) we reduce GC 
overhead somewhat and 2) at some point we need the memory to be off-heap and 
put into kernel space anyway - depending on netty, this may be optimised if it 
is already off-heap.
    
    Also, starting with #4481 we will only be using off-heap network buffers 
anyway.


> let NettyBufferPool extend PooledByteBufAllocator
> -------------------------------------------------
>
>                 Key: FLINK-7517
>                 URL: https://issues.apache.org/jira/browse/FLINK-7517
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Network
>    Affects Versions: 1.4.0
>            Reporter: Nico Kruber
>            Assignee: Nico Kruber
>
> {{NettyBufferPool}} wraps {{PooledByteBufAllocator}} but due to this, any 
> allocated buffer's {{alloc()}} method is returning the wrapped 
> {{PooledByteBufAllocator}} which allowed heap buffers again. By extending the 
> {{PooledByteBufAllocator}}, we prevent this loop hole and also fix the 
> invariant that a copy of a buffer should have the same allocator.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to