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

    https://github.com/apache/storm/pull/2005#discussion_r106585741
  
    --- Diff: 
storm-core/src/jvm/org/apache/storm/blobstore/LocalFsBlobStore.java ---
    @@ -219,17 +219,44 @@ public void setBlobMeta(String key, SettableBlobMeta 
meta, Subject who) throws A
         @Override
         public void deleteBlob(String key, Subject who) throws 
AuthorizationException, KeyNotFoundException {
             validateKey(key);
    -        checkForBlobOrDownload(key);
    -        SettableBlobMeta meta = getStoredBlobMeta(key);
    -        _aclHandler.hasPermissions(meta.get_acl(), WRITE, who, key);
    +
    +        boolean checkPermission = true;
    +        try {
    +            checkForBlobOrDownload(key);
    +        } catch (KeyNotFoundException e) {
    +            LOG.warn("Detected deletion from ZK for the key {} while 
pulling the latest change. Needs to be deleted. key: {}", key);
    +            checkPermission = false;
    +        }
    +
    +        if (checkPermission) {
    --- End diff --
    
    Unless you want to apply different logic in the catch block for the two 
methods. If we just want to log a generic message having single try..catch 
should be sufficient.


---
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