Github user HeartSaVioR commented on a diff in the pull request: https://github.com/apache/storm/pull/2005#discussion_r106837874 --- Diff: storm-core/src/jvm/org/apache/storm/blobstore/LocalFsBlobStore.java --- @@ -219,17 +219,37 @@ 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); + + if (!_aclHandler.checkForValidUsers(who, WRITE)) { + // need to get ACL from meta + checkForBlobOrDownload(key); + SettableBlobMeta meta = getStoredBlobMeta(key); + _aclHandler.hasPermissions(meta.get_acl(), WRITE, who, key); + } else { + // able to delete the blob without checking meta's ACL + // skip checking everything and continue deleting local files + } + try { - fbs.deleteKey(DATA_PREFIX+key); - fbs.deleteKey(META_PREFIX+key); + deleteKeyIgnoringFileNotFound(DATA_PREFIX + key); + deleteKeyIgnoringFileNotFound(META_PREFIX + key); } catch (IOException e) { throw new RuntimeException(e); } } + private void deleteKeyIgnoringFileNotFound(String key) throws IOException { + try { + fbs.deleteKey(key); + } catch (IOException e) { + if (e instanceof FileNotFoundException) { + // ignoring --- End diff -- Same as above.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---