Migration to spring-boot 4+ and spring-batch 6+ ... concurrency effects with OptimisticLockingFailureException #5121
Replies: 1 comment
-
|
Hi Andreas, Thank you for opening this discussion. I will help you with your migration to Spring Boot 4 / Spring Batch 6.
This was already the case in Spring Boot 3: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#enablebatchprocessing-is-now-discouraged Are you upgrading from an earlier version of Spring Boot? I really recommend to first upgrade to the latest Spring Boot 3.x before migrating to v4 (ie one major at a time)
This might be an issue in v6 indeed: #5106. I planned to fix in the upcoming 6.0.2
Best regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm currently migrate my service from springboot 3.5.x to 4.0.0 and so also springbatch to 6+.
And I'm struggle little bit with the "new" setup :-)
One thing I can't get working is a random effect if I'm using my own BatchTaskExecutor.
My old configuration was like this:
Now I have this configuration. If I keep my own "batchTaskExecutor" then I have random "OptimisticLockingFailureException"
like this ...
I also need to remove "@EnableBatchProcessing" at all .. if not other effects happens .. i.e. database is not initialized ... because "BatchDataSourceScriptDatabaseInitializer " is also gone.
Where can I check for more docu about migration ... the 6+ version have a lot of deprecated classes etc. I can't find a clean example etc. May someone can guide me to a docu?
My main concern is that if I'm using the default "SyncTaskExecutor" is my rest-api (which starts my jobs) are still parallel?
Kind regards
Andreas
Beta Was this translation helpful? Give feedback.
All reactions