Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.1-incubating
-
None
-
none
Description
In LRUScheduler:
public void run()
{ .... exec = myJobQueue.getNextJob(); .... (on failure) myJobQueue.addJob(spec); }In myJobQueue.getNextJob() (where myJobQueue is instanceof JobStack) the JobSpec is deleted and in myJobQueue.addJob(spec) repo.addJob(JobSpec) is called as shown:
public String addJob(JobSpec spec) throws JobQueueException
{ String jobId = safeAddJob(spec); .... }private String safeAddJob(JobSpec spec)
{ .... return this.repo.addJob(spec); .... }- Point being: JobStack's addJob(JobSpec) should not be called by LRUScheduler when adding a job back to the JobStack because the jobspec is already stored in JobRepository and everytime addJob(JobSpec) is called the JobSpec is given a new JobId
- Patch will introduce a new method to JobQueue called: requeueJob(JobSpec) which will add the JobSpec to the back of the JobQueue and update the JobRepo.