spring-projects / spring-projects/spring-batch

Possible race condition on job restart

Open
#5,397 2 comments 0 reactions 1 assignee View on GitHub

@fmbenhassine is already working on this.

Since May 18, 2026.

status: for-internal-team type: task
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

A fresh job start creates a JobInstance first, and that creation is protected by the SERIALIZABLE + JOB_INST_UN constraint, so only one thread/process wins. However, the restart path does not seem to be protected by that constraint.

This issue is to analyse that and see if this is a valid problem.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.