-
Notifications
You must be signed in to change notification settings - Fork 1
MongoStepExecutionDao
returns an different stepExecution if a job has multiple steps
#3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
Something isn't working
Comments
Thank you for reporting this! Appreciated the detailed bug report 👍 Indeed, this seems like a bug in the current implementation. I will plan the fix in the merged version. FYI, this prototype should be included in the upcoming v5.2.0-M2 next week (otherwise in the GA in November). Keep tuned ;-) |
Open
1 task
1 task
1 task
1 task
1 task
FBibonne
pushed a commit
to FBibonne/spring-batch
that referenced
this issue
Feb 2, 2025
Resolves spring-projects-experimental/spring-batch-experimental#3 Signed-off-by: Fabrice Bibonne <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Team,
I found this project when I wanted to try using
Spring Batch
withMongoDB
.Thank you for your wonderful experiment.
I noticed a behavior like a bug, so I'm reporting it.
Version
spring-batch-experimental:0.3.0
description
MongoStepExecutionDao
getLastStepExecution(JobInstance jobInstance, String stepName)
method returns a different stepExecution if a job has multiple steps. It requires astepName
argument but is not used. To get the correct step,stepName
must be used.I actually tried running the below job.
If the job retry (with the same
jobParameters
), typically only the 'failedStep2
' will be re-executed.However, when I actually did this, the job succeeded without any steps.
The cause was that when calling the above method with the name of
Step2
as an argument, it was supposed to returnStep2
, but instead it returnedStep1
as thelastStepExecution
.Below is MongoDB's documents of the
BATCH_JOB_EXECUTION
after execution.1st execution
2nd execution
log: Step1 is returned as 'lastStepExecution' in each step
Thanks,
The text was updated successfully, but these errors were encountered: