You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2018/06/27 11:57:09 UTC

[GitHub] flink pull request #6217: [FLINK-9677][rest] Cleanup encoder after request h...

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/6217

    [FLINK-9677][rest] Cleanup encoder after request has been processed

    ## What is the purpose of the change
    
    This PR fixes an issue in the `RestClient` where the `HttpPostRequestEncoder` would be closed before the request submission was complete. `Channel#writeAndFlush();` doesn't block which lead to a race condition between the actual writing and `HttpPostRequestEncoder#cleanFiles()`.
    
    Instead we now register a listener on the last `ChannelFuture` to cleanup the encoder once the writing is complete.
    
    ## Verifying this change
    
    * `MultipartUploadResource` was modified to also include the upload of a large (64mb) mb file, which is used by `FileUploadHandlerTest` and `RestClientMultipartTest`


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 9677

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6217.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6217
    
----
commit 48c10dd686ac97cef6db4703fe61dffa5ff7d913
Author: zentol <ch...@...>
Date:   2018-06-27T07:34:34Z

    [FLINK-9677][rest] Cleanup encoder after request has been processed

----


---

[GitHub] flink pull request #6217: [FLINK-9677][rest] Cleanup encoder after request h...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/6217


---

[GitHub] flink issue #6217: [FLINK-9677][rest] Cleanup encoder after request has been...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/6217
  
    merging.


---