alirezazamani commented on a change in pull request #1006:
URL: https://github.com/apache/helix/pull/1006#discussion_r426945168
##########
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:
Please note that if we have a lot of jobs in the queue and restart the
controller, if we have for example 1000 jobs already in the queue and
completed, how many times we have to loop through each job for the first
pipelines after the switch. It will make the controller very slow (for the fist
pipeline) because each job will go to _readyList multiple times.
----------------------------------------------------------------
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]