dmvk commented on a change in pull request #17916:
URL: https://github.com/apache/flink/pull/17916#discussion_r787767971



##########
File path: 
flink-core/src/main/java/org/apache/flink/core/fs/SafeFileSystemFactory.java
##########
@@ -18,29 +18,52 @@
 package org.apache.flink.core.fs;
 
 import org.apache.flink.configuration.Configuration;
+import org.apache.flink.util.FatalExitExceptionHandler;
 import org.apache.flink.util.TemporaryClassLoaderContext;
 import org.apache.flink.util.WrappingProxy;
+import org.apache.flink.util.concurrent.ExecutorThreadFactory;
 
 import java.io.IOException;
 import java.net.URI;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 /**
- * A wrapper around {@link FileSystemFactory} that ensures the plugin 
classloader is used for all
- * {@link FileSystem} operations.
+ * A wrapper around {@link FileSystemFactory} that ensures the same 
classloader is used for all
+ * {@link FileSystem} operations and that we don't leak classloader via 
inherited {@link
+ * java.security.ProtectionDomain protection domains} when new threads that 
might outlive the
+ * classloader are spawned during {@link FileSystem} initialization.
  */
-public class PluginFileSystemFactory implements FileSystemFactory {
+public class SafeFileSystemFactory implements FileSystemFactory {
+
+    private static final ExecutorService EXECUTOR =

Review comment:
       I'll add comments into the code.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to