You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "liuml07 (via GitHub)" <gi...@apache.org> on 2025/07/08 06:38:18 UTC
Re: [PR] [FLINK-34251][core] ClosureCleaner to include reference classes for non-serialization exception [flink]
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org