We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fce780f commit 85a84cbCopy full SHA for 85a84cb
spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java
@@ -430,7 +430,9 @@ public RepeatStatus doInTransaction(TransactionStatus status) {
430
try {
431
// Going to attempt a commit. If it fails this flag will
432
// stay false and we can use that later.
433
- getJobRepository().updateExecutionContext(stepExecution);
+ if (stepExecution.getExecutionContext().isDirty()) {
434
+ getJobRepository().updateExecutionContext(stepExecution);
435
+ }
436
stepExecution.incrementCommitCount();
437
if (logger.isDebugEnabled()) {
438
logger.debug("Saving step execution before commit: " + stepExecution);
0 commit comments