[
https://issues.apache.org/jira/browse/FLINK-25972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17500666#comment-17500666
]
Francesco Guardiani edited comment on FLINK-25972 at 3/3/22, 11:15 AM:
-----------------------------------------------------------------------
This seems to be fine, look at the method {{JaninoRelMetadataHandler#compile}}:
The generated class always generates a classloader (this is the way the
{{SimpleCompiler}} from Janino works), and this classloader will use
{{JaninoRexCompiler.class.getClassLoader()}} as parent classloader, which
should be the {{AppClassLoader}}. So I don't see the leak here. Does it makes
sense? Also [~twalthr]
was (Author: slinkydeveloper):
This seems to be fine, look at the method {{JaninoRelMetadataHandler#compile}}:
The generated class always generates a classloader, and this classloader will
use {{JaninoRexCompiler.class.getClassLoader()}} as parent classloader, which
should be the {{AppClassLoader}}. So I don't see the leak here. Does it makes
sense? Also [~twalthr]
> org.apache.calcite.rel.metadata.JaninoRelMetadataProvider#HANDLERS might
> cause class leaks
> ------------------------------------------------------------------------------------------
>
> Key: FLINK-25972
> URL: https://issues.apache.org/jira/browse/FLINK-25972
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Affects Versions: 1.15.0
> Reporter: Yun Gao
> Priority: Major
>
> JaninoRelMetadataProvider -> static field HANDLERS -> generated class
> GeneratedMetadataHandler_ColumnNullCount loaded by
> org.codehaus.janino.ByteArrayClassLoader. This cache seems to use the strong
> references.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)