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

    https://github.com/apache/storm/pull/2925#discussion_r240365742
  
    --- Diff: storm-client/src/jvm/org/apache/storm/blobstore/BlobStore.java ---
    @@ -288,13 +288,15 @@ public void createBlob(String key, InputStream in, 
SettableBlobMeta meta, Subjec
                 while ((len = in.read(buffer)) > 0) {
                     out.write(buffer, 0, len);
                 }
    -            out.close();
    -        } catch (AuthorizationException | IOException | RuntimeException 
e) {
    -            if (out != null) {
    -                out.cancel();
    -            }
             } finally {
    -            in.close();
    +            try {
    +                if (out != null) {
    --- End diff --
    
    That is intentional. Calling `cancel` will also cancel writes associated 
with the stream, and will clean up any transient resources ("part" files) that 
may have been left around as a result of an error. It seems best to do this in 
the error case, and I do not think it will do any harm in other cases.


---

Reply via email to