Izeren commented on code in PR #27617:
URL: https://github.com/apache/flink/pull/27617#discussion_r2812382561


##########
flink-core/src/main/java/org/apache/flink/core/fs/FileSystem.java:
##########
@@ -297,6 +299,21 @@ private static void initializeWithoutPlugins(Configuration 
config)
         initialize(config, null);
     }
 
+    /**
+     * Returns a list of initialized {@link FileSystemFactory FS factories}.
+     *
+     * @return a snapshot of the currently registered file system factories
+     */
+    @Internal
+    public static List<FileSystemFactory> getInitializedFileSystems() {
+        LOCK.lock();

Review Comment:
   Could you please elaborate? This method provides generic access to the 
FS_FACTORIES values and is meant to be potentially used be external threads. If 
we don't use lock, what would guarantee that this call wouldn't be "optimized" 
by VM to return values that were at initialization (e.g. empty list)?



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