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