Martijn Visser created FLINK-41389:
--------------------------------------

             Summary: flink-rpc-akka bundles a second copy of the shaded Netty
                 Key: FLINK-41389
                 URL: https://issues.apache.org/jira/browse/FLINK-41389
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Coordination
    Affects Versions: 2.3.0
            Reporter: Martijn Visser


Since FLINK-38912, flink-rpc-akka bundles netty-handler and netty-transport, 
relocated to org.apache.flink.shaded.netty4. That is the same package and Netty 
version flink-dist already ships through flink-shaded-netty. The RPC jar is 
loaded by a SubmoduleClassLoader that loads org.apache.flink classes 
component-first, so every JobManager and TaskManager loads about 580 Netty 
classes twice, roughly 4 MiB of metaspace.

This is what pushed the heavy deployment end-to-end test over its 64m metaspace 
limit on Java 11, see FLINK-40788: the TaskManager metaspace peak went from 
about 52 MiB on release-2.2 to 57 MiB on release-2.3 and later.

Pekko declares Netty as optional, and before FLINK-38912 the relocated 
references resolved to flink-shaded-netty. We should make the Netty 
dependencies of flink-rpc-akka test-scoped again.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to