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