Intermittent FatalStepExecutionException: JopRepository failure forcing rollback for Multi-threaded Step
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start at JdbcStepExecutionDao.java:294 and the getDetailsStep configuration, then reproduce the multithreaded chunk step with the provided TaskExecutor, H2, and Java 17 setup. Compare the step-execution version conflict with the ConcurrentModificationException; done means the intermittent failure is explained and a verified resolution or expected behavior is documented.
Written by the indexing model from the issue text.
Description
Bug description
Facing Intermittent FatalStepExecutionException: JopRepository failure forcing rollback Exception for Multi-threaded Step
Below is the error message:
org.springframework.batch.core.step.FatalStepExecutionException: JopRepository failure forcing rollback
java.util.ConcurrentModificationException: null
org.springframework.dao.OptimisticLockingFailureException: Attempt to update step execution id=24 with wrong version (376), where current version is 377
org.springframework.batch.core.repository.dao.JdbcStepExecutionDao.updateStepExecution(JdbcStepExecution.java:294)
Environment
Spring Batch version: 5.13, Java 17, H2 database
Steps to reproduce
We have a step like below with taskExecutor
TaskExecutor taskExecutor, JobRepository jobRepository, PlatformTransactionManager transactionManager Beans are autowired.
StepBuilder getStepBuilder(){
new StepBuilder("sampleStep", jobRepository);
}
@Bean
public Step getDetailsStep() {
return getStepBuilder()
.<String, String>chunk(10, transactionManager)
.reader(itemReader())
.processor(itemProcessor)
.writer(itemWriter())
.taskExecutor(taskExecutor)
.build();
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spring-projects/spring-batch
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
spring-projects/spring-batch#5539 · 1 comment ·
-
status: waiting-for-triage type: feature
Difficulty 1/5 Under an hour Newbie friendliness 90/100
spring-projects/spring-batch#5538 ·
-
status: waiting-for-triage type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
spring-projects/spring-batch#5537 ·
-
in: infrastructure type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spring-projects/spring-batch#5520 ·
-
in: infrastructure type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
spring-projects/spring-batch#5519 ·
All issues in spring-projects/spring-batch
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-modulith#1895 ·