Skip to content
Discussion options

You must be logged in to vote

The flush is done during the commit, and indeed, if the commit fails, an OLFE is thrown and the state is corrupted (there is an old known issue for this, see #1826, which I attempted to fix many years ago #591 (comment), but I gave up because the current implementation of the chunk-oriented step was not straightforward to update, see #3950 ).

Like the documentation mentions, the recommendation is to perform the flush in the writer (see #1826 (comment) as well). For example, the JpaItemWriter does that, and so should the RepositoryItemWriter. So your concern is valid and I think we need to update it to use an interface that has a saveAllAndFlush method, like org.springframework.data.jpa.re…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Walnussbaer
Comment options

Answer selected by Walnussbaer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants