Skip to content

Commit

Permalink
Check dirty flag of step execution context before update in inner loop
Browse files Browse the repository at this point in the history
  • Loading branch information
hpoettker authored and fmbenhassine committed Feb 12, 2024
1 parent fce780f commit 85a84cb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ public RepeatStatus doInTransaction(TransactionStatus status) {
try {
// Going to attempt a commit. If it fails this flag will
// stay false and we can use that later.
getJobRepository().updateExecutionContext(stepExecution);
if (stepExecution.getExecutionContext().isDirty()) {
getJobRepository().updateExecutionContext(stepExecution);
}
stepExecution.incrementCommitCount();
if (logger.isDebugEnabled()) {
logger.debug("Saving step execution before commit: " + stepExecution);
Expand Down

0 comments on commit 85a84cb

Please sign in to comment.