danny0405 commented on a change in pull request #10620: [FLINK-15239][table-planner-blink] TM Metaspace memory leak URL: https://github.com/apache/flink/pull/10620#discussion_r361266737
########## File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/generated/CompileUtils.java ########## @@ -45,7 +48,7 @@ * number of Meta zone GC (class unloading), resulting in performance bottlenecks. So we add * a cache to avoid this problem. */ - protected static final Cache<Tuple2<ClassLoader, String>, Class<?>> COMPILED_CACHE = CacheBuilder + protected static final Cache<String, Cache<ClassLoader, Class>> COMPILED_CACHE = CacheBuilder .newBuilder() .maximumSize(100) // estimated cache size Review comment: Sorry, i didn't have much knowledge, i'm just asking my questions. I also noticed that Apache Spark[1] and Apache Calcite [2] both only cache the classes. [1] https://github.com/apache/spark/blob/8f07839e743889bbffe91302f31388ab892bf08a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala#L1463 [2] https://github.com/apache/calcite/blob/a69d24951794f6d3ff67f40b0d117fd0df9a919b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableInterpretable.java#L100 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services