spring-projects / spring-projects/spring-batch

org.springframework.batch.core.step.tasklet.StoppableTasklet#stop lacks for execution details [BATCH-2827]

Open
#787 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Alexander Andrianov opened BATCH-2827 and commented

Implementations of org.springframework.batch.core.launch.support.SimpleJobOperator#stop take executionId parameter but don't pass stepExecutionDetails into org.springframework.batch.core.step.tasklet.StoppableTasklet#stop of underlying steps because the latter doesn't take any parameters.

On the other hand, the same StoppableTasklet class instance will be used for multiple job instances (or executions) and therefore there is no way to know which execution is really being stopped from within in StoppableTasklet.stop().

 

If StoppableTasklet.stop() had some context, like StepExecution, passed through its parameter, StoppableTasklet implementation would be able figure out which execution of the same class should be stopped.


Affects: 4.1.2

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 SimpleJobOperator#stop and StoppableTasklet#stop in the Spring Batch core APIs to trace how executionId reaches underlying steps. Determine how execution context should be passed to distinguish repeated job executions, then verify that stoppable tasklet implementations can identify the execution being stopped.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Feature
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.