You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing some behaviour which I don't think is intended/appropriate, I thought I'd raise a issue here to see if it merits further investigation (or if I've got the wrong end of the stick).
It appears that updating a job from scheduled to dependent causes the original schedule to remain intact, resulting in the job firing twice: triggered once by the schedule, and once by the parent job completing successfully.
Result
The test_A job executes at the correct time, and kicks off test_B after it succeeds. But test_B then executes exactly 1 minute after test_A, which matches the original schedule set.
As soon as I update test_B to be dependent, I can no longer see any mention of the schedule being held in the job state either through the chronos REST api or by manually inspecting the state of the attached zookeeper; so, from my point of view, this isn't the expected behaviour.
I've had a look at the api resources in the code base (specifically the DependentJobResource & JobScheduler) but can't see anything obvious, could someone shed some light on what's going on here?
Setup
I'm using chronos-2.4.0 & mesos-0.24.1 installed via-yum, & running chronos with the following command:
`val parents = jobGraph.parentJobs(newJob)
oldJob match {
case j: DependencyBasedJob =>
val newParentNames = parents.map(.name)
val oldParentNames = jobGraph.parentJobs(j).map(.name)
if (newParentNames != oldParentNames) {
oldParentNames.foreach(jobGraph.removeDependency(_, oldJob.name))
newParentNames.foreach(jobGraph.addDependency(_, newJob.name))
}
jobScheduler.removeSchedule(j)
case j: ScheduleBasedJob =>
parents.foreach(p => jobGraph.addDependency(p.name, newJob.name))
}`
It seems the jobScheduler.removeSchedule(j) should be on the case j where the old job was a ScheduleBasedJob not when it was a dependent based job.
Hi Guys,
I'm seeing some behaviour which I don't think is intended/appropriate, I thought I'd raise a issue here to see if it merits further investigation (or if I've got the wrong end of the stick).
It appears that updating a job from scheduled to dependent causes the original schedule to remain intact, resulting in the job firing twice: triggered once by the schedule, and once by the parent job completing successfully.
Scenario
I add the following 2 scheduled jobs:
I then update test_B to be a dependent job of test_A:
testdependentB.json
Result
The test_A job executes at the correct time, and kicks off test_B after it succeeds. But test_B then executes exactly 1 minute after test_A, which matches the original schedule set.
As soon as I update test_B to be dependent, I can no longer see any mention of the schedule being held in the job state either through the chronos REST api or by manually inspecting the state of the attached zookeeper; so, from my point of view, this isn't the expected behaviour.
I've had a look at the api resources in the code base (specifically the DependentJobResource & JobScheduler) but can't see anything obvious, could someone shed some light on what's going on here?
Setup
I'm using chronos-2.4.0 & mesos-0.24.1 installed via-yum, & running chronos with the following command:
The output of
java -version
is:Thanks for your time and the awesome tool, chronos rocks,
Ioan
The text was updated successfully, but these errors were encountered: