- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.5k
Overhaul MongoDB Dao to fix various bugs #4898
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
base: main
Are you sure you want to change the base?
Conversation
| Thank you for the PR! I think that is the right fix. However, can you please add a test that covers the case? With that in place, the PR should be good merge. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you check the feedbacks? :)
        
          
                ...c/main/java/org/springframework/batch/core/repository/dao/mongodb/MongoStepExecutionDao.java
          
            Show resolved
            Hide resolved
        
      MongoStepExecutionDao::getLastStepExecution| 
 @fmbenhassine Please review. | 
| Very interesting fixes in this PR! However, I was not sure about the change of  I wanted to cherry-pick the change to fix #4896 but I couldn't as this PR has a single commit and I didn't want to amend yours. I took the patch in 845f2c3 and gave you credits, thank you! So please remove that part from the PR and I will merge the remaining changes in RC2. This PR addresses different things (adds missing methods like  | 
| 
 Should I close this PR and create other PRs? | 
| As you wish. You can keep a single PR with different commits so I can cherry pick what can be back-ported to 5.2.x. Otherwise you can open separate PRs if you want. Many thanks upfront 🙏 | 
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
1. Implement method `deleteJobInstance()` 2. Fix missing range check for `List.subList()` 3. Introduce MongoJobInstanceDaoIntegrationTests Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
1. Implement method `deleteJobExecution()` 2. Fix find job executions ordering 3. Convert Date to LocalDate/LocalTime/LocalDateTime 4. Introduce MongoJobExecutionDaoIntegrationTests Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
1. Implement method `deleteStepExecution()` 2. Fix NPE if stepExecutionId not exists when get step execution 3. Fix count step executions by step name 4. Introduce MongoStepExecutionDaoIntegrationTests Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
| 
 @fmbenhassine I break it down to 4 commits. | 
| Thank you for the updates! However, I meant to break the PR down to a commit per feature/fix, not per class. But that is not a problem, I am looking if I can merge this PR as is in  I created a couple issues to track the bugs this PR addresses, see #5060, #5061 and #5062. However, can you please create an issue to explain the problem addressed by https://github.com/spring-projects/spring-batch/pull/4898/files#diff-207077ea36f0c4881806491fff426dd74819f8e9fb1d0966b229e910d00c134eR167? | 
| 
 Created #5063 | 
Now it's covered by tests copied from JDBC implementation.
See GH-4896