Skip to content

Job Parameter Overwrite Issue [BATCH-2741] #863

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

Closed
spring-projects-issues opened this issue Aug 8, 2018 · 3 comments
Closed

Job Parameter Overwrite Issue [BATCH-2741] #863

spring-projects-issues opened this issue Aug 8, 2018 · 3 comments
Labels
status: duplicate Issues that are duplicates of other issues type: bug

Comments

@spring-projects-issues
Copy link
Collaborator

jojoldu opened BATCH-2741 and commented

Hi
Update to Spring Boot 2.0 and use Spring Boot Batch.
But I have a part that works differently than Sprinb Boot 1.5 (Spring Batch 3.0).
(Maybe the bug is right)

As far as I know, if there is a failed history in Spring Batch, when the same batch job is run
I know that you are using the job parameter of the failed job.
However, I know that if the same key and another value are passed to the Job parameter, it will be executed with the new value replaced.

But now it is not the latest version.
If there is a failure, the new value of the same key is not changed, and the job parameter of the failed job is always used.

So, if you use the latest version of Batch now, you should always delete the job meta table if there are any jobs that failed.
Otherwise, no matter how you change the Job parameter, only the old failed Job parameter will be used.

I found a problem in the Spring Batch code and sent a PR.


Affects: 4.0.1

Issue Links:

  • BATCH-2711 Existing failed job is restarted, even if new job contains different job parameters
    ("duplicates")

Referenced from: pull request #625

@spring-projects-issues
Copy link
Collaborator Author

Mahmoud Ben Hassine commented

Hi,

Thank you for reporting this issue and for opening a PR! Indeed, new (identifying) job parameters are overridden with those of the previous execution if it has failed.

We will include the fix in version 4.1.

Kr,
Mahmoud

@spring-projects-issues
Copy link
Collaborator Author

Mahmoud Ben Hassine commented

I'm resolving this as a duplicate of https://jira.spring.io/browse/BATCH-2711.

jojoldu Please keep your PR open. We will consider merging it for the fix.

@spring-projects-issues
Copy link
Collaborator Author

jojoldu commented

Mahmoud Ben Hassine

Thanks!

I hope you can be Merge.

@spring-projects-issues spring-projects-issues added type: bug status: duplicate Issues that are duplicates of other issues labels Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate Issues that are duplicates of other issues type: bug
Projects
None yet
Development

No branches or pull requests

1 participant