Description
Heiko Does opened BATCH-2675 and commented
We had a Problem in one of our batch applications, because our queue capacity was too small.
So some of the jobs resulted in an TaskRejectedException and the job was marked as FAILED in the database. After we figured that out we wanted to restarted the failed jobs via JobOperator.restart method. This resulted in an JobExecutionAlreadyRunningException because the job had no end time and thishttps://github.com/spring-projects/spring-batch/blob/master/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/SimpleJobRepository.java#L119 check failed.
I my opinion this behaviour is not correct and i would suggest to add a end time when a task ist rejected (https://github.com/spring-projects/spring-batch/blob/master/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java#L167) so that the job could be restarted.
Affects: 3.0.9, 4.0.1, 4.1.0.RC1
Issue Links:
- BATCH-2760 Failed JobExecution due to unavailable TaskExecutor leaves End Time unpopulated
("is duplicated by")
Referenced from: pull request #659, and commits b28238e, 13ca0e0, f8f8a02
0 votes, 5 watchers