-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improve paging - avoid duplicates and missed itineraries when paging #5551
Conversation
Removing itineraries outside the search-window is the responsibility of another filter.
� Conflicts: � src/test/java/org/opentripplanner/model/plan/pagecursor/DeduplicationPageCutTest.java
� Conflicts: � src/test/java/org/opentripplanner/model/plan/pagecursor/DeduplicationPageCutTest.java
� Conflicts: � src/test/java/org/opentripplanner/model/plan/pagecursor/DeduplicationPageCutTest.java
This will allow us to write a proper unit test on the paging logic.
This is used to allow a function can save a result in the box.
…tests. Turn on debug using the system property on the cmd line: "-DtestDebug"
…ng into PagingServiceFactory This will enable us to write unit test on the mapping and module test on the paging.
Co-authored-by: Leonard Ehrenfried <[email protected]>
Can you resolve the conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not finished the whole PR yet, will continue in another session.
src/main/java/org/opentripplanner/framework/text/CharacterEscapeFormatter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/framework/text/CharacterEscapeFormatter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/model/plan/paging/cursor/PageCursorInput.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/model/plan/paging/cursor/PageCursorInput.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/model/plan/paging/cursor/PageCursorSerializer.java
Outdated
Show resolved
Hide resolved
.../java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java
Outdated
Show resolved
Hide resolved
.../opentripplanner/routing/algorithm/filterchain/deletionflagger/ItineraryDeletionFlagger.java
Show resolved
Hide resolved
Co-authored-by: Johan Torin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second and last batch of review comments.
(It was like being on a quest with Falkor... 😅)
src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/service/paging/PagingService.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/service/paging/PagingService.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/_support/debug/TestDebug.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/_support/debug/TestDebug.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/framework/text/CharacterEscapeFormatterTest.java
Show resolved
Hide resolved
src/test/java/org/opentripplanner/framework/token/TokenTypeTest.java
Outdated
Show resolved
Hide resolved
...java/org/opentripplanner/routing/algorithm/filterchain/deletionflagger/PagingFilterTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/service/paging/PS1_LegacyMetaDataTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/service/paging/PS1_LegacyMetaDataTest.java
Outdated
Show resolved
Hide resolved
The unit-test for CharacterEscapeFormatter is also improved.
Co-authored-by: Johan Torin <[email protected]>
This also address a few comments from the review. More unit-tests are added and a few is cleaned. # Conflicts: # src/test/java/org/opentripplanner/framework/token/TokenTypeTest.java
….java Co-authored-by: Johan Torin <[email protected]>
@jtorin Thank you for a very good review! I think I have fixed all issues now, except one comment I did not understand. |
…ed all commits including a5caefb)
- plus a small cleanup in PagingServiceFactory.
74156d0
to
ad2e35d
Compare
src/main/java/org/opentripplanner/routing/api/response/TripSearchMetadata.java
Show resolved
Hide resolved
...opentripplanner/routing/algorithm/filterchain/deletionflagger/OutsideSearchWindowFilter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit that this code goes a little over my head but the code quality is solid. I've picked up on a typo but overall this looks good.
…n/deletionflagger/OutsideSearchWindowFilter.java Co-authored-by: Leonard Ehrenfried <[email protected]>
Summary
There was a few smaller issues with the paging. This PR clean up the code and fixes a few bugs. It also improve the token serialization framework. Ideally this PR could be split in at least 3 PRs, but that would lead to problems with the forward and backward compatibility.
Overview
PagingService
the entry pointIssue
Closes #5040
Unit tests
✅ Unit-test
✅ Module test
Documentation
The JavaDoc is updated, but the paging design doc is not - we will do that in another PR.
Changelog
✅
Bumping the serialization version id
Not requiered.