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 893e83e commit 2fbdcd4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,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 2fbdcd4

Please sign in to comment.