spring-projects / spring-projects/spring-batch

Ordering of ChunkListeners does not work in 2.1.9 due to new TerminateOnExceptionChunkListenerDelegate [BATCH-1991]

Open
#1,601 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-reporter type: bug
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

Tobias Flohre opened BATCH-1991 and commented

In Spring Batch 2.1.9 a TerminateOnExceptionChunkListenerDelegate was introduced in the FaultTolerantStepFactoryBean. Every ChunkListener now gets wrapped into that Delegate. Unfortunately the ordering information is lost then, because the Delegate of course never implements the Ordered interface, no matter if the underlying ChunkListener implements Ordered or not. The CompositeChunkListener checks on the Delegates.


Affects: 2.1.9

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 at FaultTolerantStepFactoryBean and trace how ChunkListeners are wrapped in TerminateOnExceptionChunkListenerDelegate before CompositeChunkListener evaluates ordering. Confirm how Ordered is currently detected and define done as preserving the underlying listener ordering through the delegate; the issue does not name a test or file path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.