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

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

Github user zhijiangW commented on the issue:

    https://github.com/apache/flink/pull/4594
  
    This improvement is indeed very clean and reduce many redundant `Override` 
methods by extending `PooledByteBufAllocator` directly. 
    
    But I am still confused of one thing. In previous way, we created the 
`PooledByteBufAllocator` with `preferDirect` parameter as true, and the created 
allocator will be used in client and server. So it seems no chance to allow the 
heap buffer in original allocator in netty code. Or I missed or mis-understood 
some key informations?


> 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