Should the ItemWriter be invoked if the chunk is fully filtered or skipped?
#5298
-
|
Imagine a step where there is an
So far, everything looks good. Now imagine a step where there is an
Is the writer's invocation with an empty chunk really intended? The same behavior also occurs in a fault-tolerant step when skipping all items rather than filtering them. The background of this question is whether custom writer implementations should expect potential empty chunks. If yes, it might be good to emphasize this in the We detected it in Spring Batch 4.3.10 and confirmed that 6.0.0 shows the same behavior. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, and most of item writers provided by Spring Batch check if the chunk is empty before actually writing items. I will turn this into an issue to clarify that detail in the contract of |
Beta Was this translation helpful? Give feedback.
Yes, and most of item writers provided by Spring Batch check if the chunk is empty before actually writing items. I will turn this into an issue to clarify that detail in the contract of
ItemWriter.