Skip to content

JBERET-655: Handle the job execution status during a server crash gra… - #741

Draft
theashiot wants to merge 1 commit into
jberet:mainfrom
theashiot:JBERET-655
Draft

JBERET-655: Handle the job execution status during a server crash gra…#741
theashiot wants to merge 1 commit into
jberet:mainfrom
theashiot:JBERET-655

Conversation

@theashiot

Copy link
Copy Markdown
Contributor

@theashiot

theashiot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Please note that this is only an initial step towards a fix. What this update provides:

  • If you restart WildFly that crashed while a job was still in progress, the updated code detects unfinished jobs and puts them in a "stopped" state. In the HAL console, the job no longer displays an "unkown" state.
  • However, at this point, if you press the "Restart" button, which is not greyed-out anymore, the job does not restart and you get a " JBERET000601: Failed to get job xml file for job bst1083-restartable.xml" exception.

The following work is still required to be done:

  • Make the job restartable; ie when a user presses the "Restart" button in the HAL console, a new job execution should start.
  • Replicate the updates for other supported repositories like mongo, in-memory etc where applicable.
  • Refine the SQL queries used: filter in SQL for unfinished jobs rather than fetching all and filtering in code.
  • Update the code to work in the case multiple nodes use the same job repository.
  • Add tests.

best,
ashwin

Comment on lines +258 to +259
// At this point we are sure about the existence of tables, so check for crashed jobs
findCrashedJobs();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the BatchEnvironment.getJobXmlResolver() we might want to filter the selection based on the jobs defined within the current environment and only changes those.

My thought is if this is a shared database with other batch jobs in different services, we don't want to update the state of those jobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants