Skip to content

Commit bce9b19

Browse files
committed
Fix state management in chunk oriented step
1 parent 9099a94 commit bce9b19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkOrientedStep.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ private void processChunkConcurrently(TransactionStatus status, StepContribution
421421
// apply contribution and update streams
422422
stepExecution.apply(contribution);
423423
this.compositeItemStream.update(stepExecution.getExecutionContext());
424+
getJobRepository().updateExecutionContext(stepExecution);
424425
}
425426

426427
}
@@ -451,6 +452,7 @@ private void processChunkSequentially(TransactionStatus status, StepContribution
451452
// apply contribution and update streams
452453
stepExecution.apply(contribution);
453454
compositeItemStream.update(stepExecution.getExecutionContext());
455+
getJobRepository().updateExecutionContext(stepExecution);
454456
}
455457
}
456458

0 commit comments

Comments
 (0)