Github user kongweihan commented on a diff in the pull request:

    https://github.com/apache/helix/pull/89#discussion_r116566511
  
    --- Diff: 
helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
 ---
    @@ -90,60 +96,86 @@ private BestPossibleStateOutput compute(ClusterEvent 
event, Map<String, Resource
     
         BestPossibleStateOutput output = new BestPossibleStateOutput();
     
    -    for (String resourceName : resourceMap.keySet()) {
    -      logger.debug("Processing resource:" + resourceName);
    +    // Reset current INIT/RUNNING tasks on participants for throttling
    +    JobRebalancer.resetActiveTaskCount(cache.getLiveInstances().keySet(), 
currentStateOutput);
     
    -      Resource resource = resourceMap.get(resourceName);
    -      // Ideal state may be gone. In that case we need to get the state 
model name
    -      // from the current state
    -      IdealState idealState = cache.getIdealState(resourceName);
    +    PriorityQueue<JobResourcePriority> jobResourceQueue = new 
PriorityQueue<JobResourcePriority>();
    --- End diff --
    
    What I meant was, I don't seem to see any usage of a "queue".
    Right now we're not producing jobs into the queue while at the same time 
consuming jobs from the queue. Right now we have a pre-created set of jobs, 
sorted by priority, then just looped once. I don't see the necessity of using a 
priority queue.
    Does it make sense?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to