Bugzilla – Full Text Bug Listing
|Summary:||A JobExecution should be abandoned, not a JobInstance|
Description mminella 2013-01-18 16:23:47 UTC
In section 7.8.10 on page 100, JobOperator#abandon(JobInstance instance) is defined. A JobExecution should be what is being abandoned. This method in SB is used to mark a job that didn't exit gracefully as abandoned so that it can be restarted (job instances that have an execution in something other than stopped or abandoned cannot be restarted). Abandoned provides a way of indicating a job was stopped but not gracefully for historic reasons.
Comment 1 cvignola 2013-01-23 21:44:26 UTC
Your comment is confusing to me. You seem to be saying that a failed job execution is not restartable until you first mark it abandoned. That does not make sense.
Comment 2 mminella 2013-01-23 21:56:53 UTC
A JobInstace should not be able to be run if it has a JobExecution in a state other than STOPPED, ABANDONED or FAILED. In Spring Batch, JobOperator#abandon() used to mark JobExecutions that are stuck in the STOPPING status to ABANDONED since a JobInstance cannot be retried with a JobExecution still in the STOPPING state.
Comment 3 cvignola 2013-01-24 20:22:34 UTC
(In reply to comment #2) That almost makes sense. I thought you were going to say that a job with an ABANDONED execution could not be restarted. Since it had an execution that never exited STOPPING state, I would think the potential for integrity loss to great to allow restart. > A JobInstace should not be able to be run if it has a JobExecution in a state > other than STOPPED, ABANDONED or FAILED. In Spring Batch, > JobOperator#abandon() used to mark JobExecutions that are stuck in the STOPPING > status to ABANDONED since a JobInstance cannot be retried with a JobExecution > still in the STOPPING state.
Comment 4 cvignola 2013-02-14 18:47:07 UTC
Changed in PFD v1.4