narendly commented on a change in pull request #1006:
URL: https://github.com/apache/helix/pull/1006#discussion_r426925697



##########
File path: helix-core/src/main/java/org/apache/helix/task/RuntimeJobDag.java
##########
@@ -145,9 +145,21 @@ public boolean finishJob(String job) {
           String.format("Job: %s has either finished already, never been 
scheduled, or been removed from DAG", job));
     }
     // Add finished job's successors to ready-list
+
+    // If it is a jobQueue, there should be a check to make sure that the a 
job has not been added
+    // to the _readyJobList multiple times. This check is necessary because 
once the controller
+    // switch happens, the _readyJobList and _inflightJobList will be created 
from scratch. In this
+    // case, since there might be many jobs that have been finished before, we 
do not want to have a
+    // job several times to the _readyJobList. If _readyJobList has multiple 
instances of the same
+    // job, it can compromise the functionality of the parallel jobs.

Review comment:
       Have a follow up question. What do you mean the job gets added several 
times to the readyJobList?
   
   If there's a controller switch, we'll be creating 
readyJobList/inflightJobList from scratch, and add everything from the 
beginning (or the first available job from the step-by-step topological sort). 
Then as long as the controller doesn't switch, it only gets added once, right?
   
   In other words, for each controller should add a job exactly once. Is that 
correct?
   
   Also even though a job might get added to readyJobList multiple times 
(exactly once in different controllers), our scheduling logic just skips it I 
believe (if jobState is complete/progress we just skip?). Could you help me 
understand how this could help? It seems that although this wouldn't hurt to 
do...




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