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
Repetitive execution of FaultTolerantChunkProcessor's method process #4486
Comments
How is the fault-tolerant step configured? Have you added that type of exception to the non-retrybale ones with Please elaborate with a code example to help us reproduce your issue and help you efficiently. |
Dear fmbenhassine, I meet same question with spring batch 4.3.2. The step configuration like bellow:
When an exception was throwed in writer, the FaultTolerantChunkProcessor would recall the writer again by scan method RecoveryCallback interface. I config the step with readerIsTransactionalQueue to make buffering flag to false. It can avoid repetitive execution. The code like bellow:
Looking forward to fixing this issue as soon as possible |
Chunk scanning is activated when a skippable exception is thrown from the chunk processor. In that case, the chunk is resized to 1 and items are reprocessed (process + write) one by one, each one in its own transaction. So you might think items are being retried but it is not the case, this is part of the scanning process. @alappmeng I think this is your case (so it is normal to see the process method being re-executed). I suggest you to check the chunk scanning samples and try out various retry and skip policies. @chengwei710 A skip is a recovery option for an exhausted retry. So setting |
Dear @fmbenhassine, I don't quite understand this point. When chunk size of the job is 1, and got an exact exception in chunk, is it necessary to rescan items to retry. I just want my job to skip the exception without retried. If I config the job without noRetry, it would retry when an exception raised. So how can I config the job? |
Bug description
When FaultTolerantChunkProcessor's method process throw a exeception(not the retriable exception), the method process will execute once more.
Environment
The version of the spring-batch-core that I use is 5.0.3.
Steps to reproduce
Steps to reproduce the issue.
Expected behavior
When method process throws a exception that dont need to retry, do not execute process.
The text was updated successfully, but these errors were encountered: