When writer throw non skippable exception(i.e. StringIndexOutOfBoundsException) then processor going infinite loop #4536
Labels
status: waiting-for-reporter
Issues for which we are waiting for feedback from the reporter
type: bug
When writer throw non skippable exception(i.e. StringIndexOutOfBoundsException) then processor going infinite loop
This is processor:
if i see the code of FaultTolerantChunkProcessor only retryCallback is happening its not going in recoveryCallback.
Spring boot 3.1.6 and java 17
Steps to reproduce
its happening after migration from spring boot 2.7.13 to 3.16
Expected behavior
if any non-skippable error thrown from Item writer it should go in recoveryCallback(i.e. exausted) instead retryCall back. Here from StepContextRepeatCallback its should go to FaultTolerantChunkProcessor but its going to stagingToBatchDetailProcessor then scan is happening which is causing infinite loop.
While migration only change that we have made we used @JobScope only for late binding only we made the change.
When i debug i found that retryContextCache.get(key) always return null but i can value is there seems something wrong with hascode. this condition always gets satisfied while (canRetry(retryPolicy, context) && !context.isExhaustedOnly())
This infinite loop getting resolved only when doing faultTolerant().processorNonTransactional() or when returning new object from processor as below :
I have checked every thing but don't see any issue, Just wondering there two solution what makes difference processorNonTransactional or retuning new Object from processor. I don't want to go with both solution as how it will impact on without transaction and with new object may leads to out of memory issue. As data is related to payment need to processed.
The text was updated successfully, but these errors were encountered: