Repository navigation
Conversation
A fault-tolerant chunk step retries a failed page query and then commits that chunk. read() counts the attempt before doRead() returns, while the paging readers leave the page cursor unmoved, so the saved read.count is one ahead of the items actually returned. Restart then skips the next item or rewrites committed JDBC rows and completes, or runs the next JDBC page with an unbound sort-key parameter. The failed query did not consume an item, so that attempt is removed from the count. The page is still read again on the next call. A checkpoint that was already stored is left as it is. Resolves spring-projects#5648 Signed-off-by: WooSeung Kim <wooseung.dev@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fault-tolerant chunk step that retries a failed page query and commits that chunk saves a
read.countthat includes the failed attempt, so a restart resumes at the wrong item. On 6.0.6 and 6.1.0-RC1, a query timeout on the second page makes theJdbcPagingItemReaderrestart rewrite committed rows or lose one, and the job completes.RepositoryItemReaderandPageableItemReaderlose one when the failure does not roll back the chunk. Since #5628JpaPagingItemReaderdoes too.read()counts the call beforedoRead(), which suits readers that consume input before failing, but a failed query leaves the page cursor in place. The paging readers now drop it. A value already saved is not corrected.Resolves #5648