Skip to content

Fix incorrect behaviour of RepositoryItemReader#jumpToItem() on restart #443

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

Closed
wants to merge 2 commits into from
Closed

Fix incorrect behaviour of RepositoryItemReader#jumpToItem() on restart #443

wants to merge 2 commits into from

Conversation

akapps
Copy link
Contributor

@akapps akapps commented Dec 20, 2016

RepositoryItemReader reads the latest already processed item when initialized with "jumpToItem" :

  • tests correction (confusion between indices and values)
  • jumpToItem(..) reimplemented to load the expected value on the next "read()" call

  Creates integration tests highlighting Hibernate lazy-loading failure if the reader has requested the page on open().
Corrects jumpToItem(..) so that it next reads the requested item, not the previous one.
Page is actually requested on "read()" rather than on "jumpToItem(..)"
@akapps
Copy link
Contributor Author

akapps commented Dec 22, 2016

I completed and reorganized my PR.
A first commit corrects the unit tests with the expected behavior (see BATCH-2526). I also added integration tests using entities with a lazy-loaded association. Tests are red with the current reader's implementation.
The 2nd commit adapts the reader.

@fmbenhassine fmbenhassine added in: infrastructure status: waiting-for-triage Issues that we did not analyse yet labels Nov 9, 2020
@fmbenhassine fmbenhassine changed the title Batch 2526 jump to item Fix incorrect behaviour of RepositoryItemReader#jumpToItem() on restart Nov 19, 2020
@fmbenhassine fmbenhassine removed the status: waiting-for-triage Issues that we did not analyse yet label Nov 19, 2020
@fmbenhassine
Copy link
Contributor

LGTM, rebased and merged as cbdb251. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behaviour of RepositoryItemReader#jumpToItem() on restart
2 participants