Skip to content
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

RetryTemplate causes rollback exceptions to fail whole chunk [BATCH-2298] #1305

Closed
spring-issuemaster opened this issue Aug 29, 2014 · 2 comments
Closed

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Aug 29, 2014

Chris Shumaker opened BATCH-2298 and commented

When an exception occurs in a chunk, the retry template will maintain the last exception thrown.

Given a recurrent exception, like a validation exception in a processor, Spring Batch will handle each record in the chunk as a skip and reuse the first exception as the throwable. I believe this is because of the Retry Template's reuse of the lastException variable.

It is hard for me to say if this applies to 3.x versions of Spring Batch. It looks like Spring Retry was separated into it's own project but I'm not sure if this behavior still exists in Spring Batch after 2.x versions.

I'm not sure if 2.x is still maintained but if so, I can provide more details and have ideas on a potential resolution. For example, a configurable ChunkException which wraps the lastException instead of rethrowing it. That would at least make the error apparent to the developer and creates awareness by documenting the feature.


Affects: 2.2.0.RC2

Reference URL: https://github.com/spring-projects/spring-retry/blob/master/src/main/java/org/springframework/retry/support/RetryTemplate.java

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jan 14, 2018

Arthur Portas commented

2.x.x version is no longer actively maintained.
This issue can be closed

@benas

This comment has been minimized.

Copy link
Contributor

@benas benas commented Jan 21, 2020

I'm not sure if 2.x is still maintained

No, Spring Batch v2 and v3 are not maintained anymore.

It is hard for me to say if this applies to 3.x versions of Spring Batch.

It is hard to say from what you shared if this applies to v4.2. Please provide a minimal example that reproduces the problem and we can re-open this issue if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.