Skip to content

Conversation

baezzys
Copy link
Contributor

@baezzys baezzys commented Aug 20, 2025

Fixes #4943 where job restart fails after abrupt shutdown because getLastStepExecution() only checks the empty stepExecutions array in BATCH_JOB_EXECUTION instead of the BATCH_STEP_EXECUTION collection.

Changes:

  • getLastStepExecution(): Query BATCH_STEP_EXECUTION collection directly
  • countStepExecutions(): Query collection instead of embedded array
  • Align with JDBC implementation behavior

@baezzys baezzys force-pushed the fix/mongodb-abrupt-shutdown-empty-stepexecutions branch from 4407326 to 8531cfb Compare August 20, 2025 15:33
Fixes bug where job restart fails after abrupt shutdown because
getLastStepExecution() only checks the empty stepExecutions array
in BATCH_JOB_EXECUTION instead of the BATCH_STEP_EXECUTION collection.

Changes:
- getLastStepExecution(): Query BATCH_STEP_EXECUTION collection directly
- countStepExecutions(): Query collection instead of embedded array
- Align with JDBC implementation behavior

Signed-off-by: baezzys <[email protected]>
@baezzys baezzys force-pushed the fix/mongodb-abrupt-shutdown-empty-stepexecutions branch from ad65cbf to aa584e3 Compare August 21, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With MongoDb as job repository, restarting Abrupt Shutdown does not work as expected
1 participant