Spring Batch v6.0.4 - MongoDB Performance and Chunk Fixes
Spring Batch v6.0.4 arrived on June 10, 2026, delivering performance tuning for MongoDB and critical stability fixes for chunk processing. This maintenance release addresses several regressions and performance bottlenecks introduced in earlier 6.x versions.
The full release notes and downloads are on the GitHub release page.
The project team focused on efficiency for MongoDB based job repositories in this update. One significant change involves MongoStepExecutionDao#getLastStepExecution which now performs filtering and sorting at the database level instead of in memory. This reduces the data transfer load and improves response times for jobs with large execution histories.
Another performance fix addresses an N+1 query issue in MongoJobExecutionDao.findRunningJobExecutions. Prior to this release, the DAO issued separate queries for each execution, creating unnecessary overhead during high volume batch runs. The update consolidates these lookups to improve throughput.
A critical fix in this release targets chunk scan mode. Previously, the system did not isolate each scanned item in its own transaction, which could lead to data integrity issues if a failure occurred mid chunk. The new version ensures proper transaction isolation for scanned items.
The project also resolved an issue in SimpleStepExecutionSplitter where completed partitions would not restart even when the allowStartIfComplete flag was set to true. This fix is vital for complex ETL workflows that require re running specific partitions of a large job.
Data engineers working with varied input formats will find several bug fixes in the mapping layer. RecordFieldSetMapper now correctly handles null values for nullable types following recent nullability refinements. This prevents unexpected rejection of valid data during the mapping phase.
The JSON support received updates to fix a bug where appendAllowed(true) would break the JSON array structure when a writer was cycled multiple times. Additionally, the JacksonJsonObjectReader and GsonJsonObjectReader now include null checks in their close methods to prevent NullPointerException errors when resources are not properly initialized.
The release is available through standard repository channels.
- The release page: v6.0.4
- The GitHub repository: spring-projects/spring-batch
- The version tag:
v6.0.4