snikhil5 commented on a change in pull request #3421: URL: https://github.com/apache/storm/pull/3421#discussion_r741531933
########## File path: storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java ########## @@ -985,6 +985,37 @@ private static boolean isTopologyActiveOrActivating(IStormClusterState state, St return isTopologyActive(state, topoName) || state.activeStorms().contains(topoName); } + /** + * Returns the topologyId of the topology using this blob. + * @param state the cluster state + * @param topoCache the topology cache + * @param key the blob key + * @return null or id + */ + private static String topologyUsingThisBlob(IStormClusterState state, TopoCache topoCache, String key) { + for (String topologyId : state.activeStorms()) { + Map<String, Object> topoConf = null; + try { + topoConf = readTopoConfAsNimbus(topologyId, topoCache); + } catch (KeyNotFoundException e) { + continue; + } catch (AuthorizationException e) { + continue; + } catch (IOException e) { + continue; + } Review comment: done ########## File path: storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java ########## @@ -3907,6 +3938,12 @@ public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundExc throw new WrappedIllegalStateException(message); } } + String topoId = topologyUsingThisBlob(stormClusterState, topoCache, key); + if (null != topoId) { Review comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@storm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org