jiajunwang commented on a change in pull request #1076:
URL: https://github.com/apache/helix/pull/1076#discussion_r437770467



##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/TaskGarbageCollectionStage.java
##########
@@ -23,34 +27,53 @@ public AsyncWorkerType getAsyncWorkerType() {
   }
 
   @Override
-  public void execute(ClusterEvent event) {
+  public void process(ClusterEvent event) throws Exception {
     WorkflowControllerDataProvider dataProvider =
         event.getAttribute(AttributeName.ControllerDataProvider.name());
+    event.addAttribute(AttributeName.WORKFLOW_CONFIG_MAP.name(),
+        dataProvider.getWorkflowConfigMap());

Review comment:
       > I prefer doing the calculation in GarbageCollectionStage for code 
clarity, and the overhead isn't much because it's 1 loop through workflows 
using in-memory operations. What do you think?
   
   As long as there is no duplicate logic, I'm fine. The concern is that in 
TaskSchedulingStage, we may have the logic to loop all the tasks for the 
non-removable ones, then in the GarbageCollectionStage, we loop all the tasks 
for the removable ones. That would be concerning because of the duplicate logic 
and potential conflicts.




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