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

    https://github.com/apache/flink/pull/6178#discussion_r196695325
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/FileUploadHandler.java
 ---
    @@ -72,10 +82,12 @@ public FileUploadHandler(final Path uploadDir) {
        protected void channelRead0(final ChannelHandlerContext ctx, final 
HttpObject msg) throws Exception {
                if (msg instanceof HttpRequest) {
                        final HttpRequest httpRequest = (HttpRequest) msg;
    +                   LOG.trace("Received request. URL:{} Method:{}", 
httpRequest.getUri(), httpRequest.getMethod());
                        if (httpRequest.getMethod().equals(HttpMethod.POST)) {
                                if 
(HttpPostRequestDecoder.isMultipart(httpRequest)) {
                                        currentHttpPostRequestDecoder = new 
HttpPostRequestDecoder(DATA_FACTORY, httpRequest);
                                        currentHttpRequest = httpRequest;
    +                                   currentUploadDir = 
Files.createDirectory(uploadDir.resolve(UUID.randomUUID().toString()));
    --- End diff --
    
    How do we clean up the `currentUploadDir` in case of a failure?


---

Reply via email to