spring-projects / spring-projects/spring-batch

Multithreaded step reprocess chunk in violation of RetryPolicy [BATCH-2199]

Open
#1,401 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

related-to: multi-threading status: waiting-for-triage type: bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.