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

Chesnay Schepler commented on FLINK-18695:
------------------------------------------

[~gaoyunhaii] there are certainly cases where PREFER_DIRECT can have an effect; 
it's just that there are 
[others|https://github.com/netty/netty/blob/8c5b72aaf02e7f349a9972dd9179b449b5a6067b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java#L312]
 
[where|https://github.com/netty/netty/blob/8c5b72aaf02e7f349a9972dd9179b449b5a6067b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java#L22369]
 it might not. The first instance specifically is the one that was changed in 
[this 
commit|https://github.com/netty/netty/commit/39cc7a673939dec96258ff27f5b1874671838af0],
 which appears to be the crux of the issue.

> Allow NettyBufferPool to allocate heap buffers
> ----------------------------------------------
>
>                 Key: FLINK-18695
>                 URL: https://issues.apache.org/jira/browse/FLINK-18695
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Network
>            Reporter: Chesnay Schepler
>            Assignee: Yun Gao
>            Priority: Major
>             Fix For: 1.12.0
>
>
> in 4.1.43 netty made a change to their SslHandler to always use heap buffers 
> for JDK SSLEngine implementations, to avoid an additional memory copy.
> However, our {{NettyBufferPool}} forbids heap buffer allocations.
> We will either have to allow heap buffer allocations, or create a custom 
> SslHandler implementation that does not use heap buffers (although this seems 
> ill-adviced?).
> /cc [~sewen] [~uce] [~NicoK] [~zjwang] [~pnowojski]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to