spring-projects / spring-projects/spring-batch
Multithreaded step reprocess chunk in violation of RetryPolicy [BATCH-2199]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
Andrea Polci opened BATCH-2199 and commented
Similar problem to BATCH-1724, but affecting FaultTolerantChunkProcessor instead of SimpleChunkProcessor.
When the step use FaultTolerantChunkProcessor but the exception is not one that need to be retried the chunk is retried.
For example if I add a skippable-exception to a step, this cause the FaultTolerantChunkProcessor to be used. In the single threaded case any exception will not cause a retry because the retry limit is 0, but when the step is multithreaded the failing chunk will be reprocessed for the same problem that has been fixed in SimpleChunkProcessor.
Affects: 2.2.5
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.
Research direction
Start by reading FaultTolerantChunkProcessor and comparing its multithreaded path with the behavior described for SimpleChunkProcessor. Trace how RetryPolicy handles a non-retryable exception when a skippable exception is configured. Done means the multithreaded step does not reprocess the failing chunk when the retry limit is zero, while intended retry behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, data-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100