Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3896#discussion_r116500027
  
    --- Diff: 
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java
 ---
    @@ -234,8 +237,17 @@ private void respondAsLeader(ChannelHandlerContext 
ctx, HttpRequest request, Str
                                                        if 
(!rootURI.relativize(requestedURI).equals(requestedURI)) {
                                                                
logger.debug("Loading missing file from classloader: {}", requestPath);
                                                                // ensure that 
directory to file exists.
    -                                                           
file.getParentFile().mkdirs();
    -                                                           
Files.copy(resourceStream, file.toPath());
    +                                                           if 
(!file.getParentFile().mkdirs()) {
    +                                                                   throw 
new IOException("Could not create directories for file " + file);
    +                                                           }
    +                                                           synchronized 
(COPY_LOCK) {
    --- End diff --
    
    Because this was easy to write, is easy to review, does not change any 
behavior and isn't particularly intrusive.
    
    I agree that we should have a discussion as to whether we should load the 
files lazily or not, but not now when the next release is coming up and 
everyone is scrambling to fix the most issues in as little time as possible


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to