Reputation: 1263
I use Spring Boot 3 (Batch 5) with Spring Data and Oracle Database.
I have one Job with an Item Reader and a Writer (without a processor)
Everything is working fine, Now to make job process fast, want to add taskExecutor
and added
@Bean
public TaskExecutor taskExecutor() {
SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor();
taskExecutor.setConcurrencyLimit(10);
return taskExecutor;
}
.taskExecutor(taskExecutor())
But after run couple of threads succsfully ,job is failing with error.
OptimisticLockingFailureException Attempt to update step execution after id= with wrong version (1)
Upvotes: 0
Views: 55