-
Couldn't load subscription status.
- Fork 2.4k
Description
Krishna Bhamidipati opened BATCH-2716 and commented
Each time partitions are created, SimpleStepExecutionSplitter#split queries the Spring Batch tables to double check if the partitioned step is a restart. This originally scanned the entire table for each time.
The patched approach uses a new method on JobRepository which allows SimpleStepExecutionSplitter to retreive all the step executions at the time of partitioning. By assuming there are no other threads creating conflicting partitions for the same job instance, the splitting is more efficient.
The performance improvement is easily an order of magnitude better (26x from initial benchmarks, attached) and works well for jobs with > 1000 steps.
Patched source is attached and also available on https://github.com/NaanProphet/spring-batch-large-step-perf-fix
Affects: 3.0.3
Attachments:
- benchmark.png (35.19 kB)
- spring-batch-large-step-perf-fix-master-3cff84b.zip (625.48 kB)
Referenced from: pull request #716, and commits 62a8f44
Backported to: 4.2.0.RC1