alirezazamani commented on a change in pull request #1520:
URL: https://github.com/apache/helix/pull/1520#discussion_r520936751



##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/TaskGarbageCollectionStage.java
##########
@@ -93,12 +97,18 @@ public void process(ClusterEvent event) throws Exception {
           .equals(TaskUtil.WORKFLOW_CONTEXT_KW)) {
         // Find workflows that need to be purged
         workflowsToBePurged.add(entry.getKey());
+      } else if (jobConfig == null && entry.getValue() != null && 
entry.getValue().getId()

Review comment:
       This follows what we do for expired jobs. Note that in expired jobs we 
do not do that as well because main pipeline is responsible to update workflow 
context. The reason has been also explained in the comments:
   ```
         // Update workflow context will be in main pipeline not here. 
Otherwise, it will cause
         // concurrent write issue. It is possible that jobs got purged but 
there is no event to
         // trigger the pipeline to clean context.
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to