You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/transform/TransformExpressionCompiler.java
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,10 @@ public class TransformExpressionCompiler {
39
39
40
40
/** Triggers internal garbage collection of expired cache entries. */
41
41
publicstaticvoidcleanUp() {
42
-
COMPILED_EXPRESSION_CACHE.cleanUp();
42
+
// com.google.common.cache.Cache from Guava isn't guaranteed to clear all cached records
43
+
// when invoking Cache#cleanUp, which may cause classloader leakage. Use #invalidateAll
44
+
// instead to ensure all key / value pairs to be correctly discarded.
45
+
COMPILED_EXPRESSION_CACHE.invalidateAll();
43
46
}
44
47
45
48
/** Compiles an expression code to a janino {@link ExpressionEvaluator}. */
0 commit comments