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
Abrupt shutdowns of Spring Batch jobs leave the job execution in a running status at the job repository level as Spring Batch doesn't have a change to update the status correctly (see Aborting a Job). Restarting such failed jobs requires a manual database update as follows:
> update BATCH_JOB_EXECUTION set status = 'FAILED', END_TIME = 'non null value' where job_execution_id = X;
> update BATCH_STEP_EXECUTION set status = 'FAILED' where job_execution_id = X and step_name='failed step name';
There is already an API in the JobOperator to abandon a job execution, so it would be great to provide a new method to mark a job as failed to be able to restart it. The goal is to provide an API to mark a job as failed as opposed to asking users to manually execute SQL statements against the database. Providing an API is also necessary to support that feature consistently with other job repositories as well (thinking about No SQL stores for instances).
The text was updated successfully, but these errors were encountered:
This was initially discussed with @Nhoutain in #4831
Abrupt shutdowns of Spring Batch jobs leave the job execution in a running status at the job repository level as Spring Batch doesn't have a change to update the status correctly (see Aborting a Job). Restarting such failed jobs requires a manual database update as follows:
There is already an API in the
JobOperator
to abandon a job execution, so it would be great to provide a new method to mark a job as failed to be able to restart it. The goal is to provide an API to mark a job as failed as opposed to asking users to manually execute SQL statements against the database. Providing an API is also necessary to support that feature consistently with other job repositories as well (thinking about No SQL stores for instances).The text was updated successfully, but these errors were encountered: