RuiLi8080 commented on a change in pull request #3336:
URL: https://github.com/apache/storm/pull/3336#discussion_r489756042
##########
File path:
storm-server/src/main/java/org/apache/storm/localizer/AsyncLocalizer.java
##########
@@ -641,7 +642,12 @@ void cleanup() {
try {
forEachTopologyDistDir((p, topologyId) -> {
- if (!safeTopologyIds.contains(topologyId)) {
+ String topoJarKey =
ConfigUtils.masterStormJarKey(topologyId);
+ String topoCodeKey =
ConfigUtils.masterStormCodeKey(topologyId);
+ String topoConfKey =
ConfigUtils.masterStormConfKey(topologyId);
+ if (!topologyBlobs.containsKey(topoJarKey)
Review comment:
My understanding is topo dir is always created after the entries of
`topologyBlobs` are added. So whenever the topology entry is found, we should
not delete the dir.
Also, `topologyBlobs` is `ConcurrentHashMap` which allows the slot and
cleanup/update threads to access in parallel.
If we added synchronization, the file system dir cleanup might take seconds
and block the slot threads to progress.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]