NealSun96 commented on a change in pull request #1326:
URL: https://github.com/apache/helix/pull/1326#discussion_r486561603



##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/ResourceComputationStage.java
##########
@@ -98,6 +102,15 @@ public void process(ClusterEvent event) throws Exception {
       }
     }

Review comment:
       I wouldn't say it's interleaved, it's just how the logic should look. 
With what you proposed, it looks like:
   ```
   if (taskCache) {
     processIdealStates();
     processWorkflowConfigs();
     processJobConfigs();
   } else {
     processIdealStates();
   }
   backfillCurrentStates();
   ```
   If we take out the common factor, we have:
   ```
   processIdealStates();
   if (taskCache) {
     processWorkflowConfigs();
     processJobConfigs();
   }
   backfillCurrentStates();
   ```
   which is exactly what it is now. I think it's clear enough (especially given 
that we may remove the if block altogether later). 




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