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

    https://github.com/apache/storm/pull/2925#discussion_r240360762
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/dependency/DependencyUploader.java ---
    @@ -154,11 +154,22 @@ private boolean uploadDependencyToBlobStore(String 
key, File dependency)
                 acls.add(new AccessControl(AccessControlType.OTHER,
                                            BlobStoreAclHandler.READ));
     
    -            AtomicOutputStream blob = getBlobStore().createBlob(key, new 
SettableBlobMeta(acls));
    -            Files.copy(dependency.toPath(), blob);
    -            blob.close();
    +            AtomicOutputStream blob = null;
    +            try {
    +                blob = getBlobStore().createBlob(key, new 
SettableBlobMeta(acls));
    +                Files.copy(dependency.toPath(), blob);
    +                blob.close();
     
    -            uploadNew = true;
    +                uploadNew = true;
    --- End diff --
    
    shouldn't we call blob = null here to prevent a dupe cancel after close?


---

Reply via email to