wuchong commented on PR #20003: URL: https://github.com/apache/flink/pull/20003#issuecomment-1160374181
> A classloader should not be passed to a component if at that time it does not have access to all required classes. The classloader DOES have access to all required classes at the time when it is passed to a component. The required classes are dynamically changing when users interactively ADD JAR, so we have to replace the classloader or update classloader in place. > If you're lacking clear ownership of the classloader then mutating said classloader is a dangerous operation anyway. Sorry, I don't understand what's the "dangerous operation" you mean. There is no classloader leaking and the classloader is clearly managed by the components. Btw, Spark SQL also introduced [`MutableURLClassLoader`](https://github.com/apache/spark/blob/master/core/src/main/java/org/apache/spark/util/MutableURLClassLoader.java) to support `ADD JAR`. I think this is a reasonable way to support this feature, not a hacking way. -- 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