Skip to content

Commit 4034f26

Browse files
KMGeonfmbenhassine
authored andcommitted
Fix step execution update to handle stopping state
Resolves #5217 Signed-off-by: mugeon <pos04167@kakao.com>
1 parent 5642911 commit 4034f26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/SimpleJobRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public void update(StepExecution stepExecution) {
163163
Assert.state(latestStepExecution != null,
164164
"StepExecution with id " + stepExecution.getId() + "not found. Batch metadata state may be corrupted.");
165165

166-
if (latestStepExecution.getJobExecution().isStopped()) {
166+
if (latestStepExecution.getJobExecution().isStopped() || latestStepExecution.getJobExecution().isStopping()) {
167167
Integer version = latestStepExecution.getVersion();
168168
if (version != null) {
169169
stepExecution.setVersion(version);

0 commit comments

Comments
 (0)