liuml07 commented on code in PR #24205:
URL: https://github.com/apache/flink/pull/24205#discussion_r2191607384


##########
flink-core/src/main/java/org/apache/flink/api/java/ClosureCleaner.java:
##########
@@ -66,14 +67,20 @@ public class ClosureCleaner {
      */
     public static void clean(
             Object func, ExecutionConfig.ClosureCleanerLevel level, boolean 
checkSerializable) {
-        clean(func, level, checkSerializable, Collections.newSetFromMap(new 
IdentityHashMap<>()));
+        clean(
+                func,
+                level,
+                checkSerializable,
+                Collections.newSetFromMap(new IdentityHashMap<>()),
+                new Stack<>());
     }
 
     private static void clean(
             Object func,
             ExecutionConfig.ClosureCleanerLevel level,
             boolean checkSerializable,
-            Set<Object> visited) {
+            Set<Object> visited,
+            Stack<Class<?>> clsReferences) {

Review Comment:
   The stack is not growing when there is circular references or 
self-references as there is a `visited` Set already to only visit a class once.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to