Clear added patterns in TimetableSnapshot#6141
Merged
Merged
Conversation
2491e22 to
8c4f01e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6141 +/- ##
=============================================
- Coverage 69.90% 69.89% -0.01%
- Complexity 17708 17711 +3
=============================================
Files 1996 1996
Lines 75334 75348 +14
Branches 7713 7713
=============================================
+ Hits 52660 52668 +8
- Misses 19997 20000 +3
- Partials 2677 2680 +3 ☔ View full report in Codecov by Sentry. |
8c4f01e to
11f0123
Compare
leonardehrenfried
previously approved these changes
Oct 10, 2024
leonardehrenfried
previously approved these changes
Oct 10, 2024
habrahamsson-skanetrafiken
requested changes
Oct 11, 2024
| .keySet() | ||
| .removeIf(route -> feedId.equals(route.getId().getFeedId())); | ||
| realtimeAddedRoutes.keySet().removeIf(id -> feedId.equals(id.getFeedId())); | ||
| return removedEntry; |
Contributor
There was a problem hiding this comment.
This removedEntry parameter is only set if trips were removed, not the other entries. If that is on purpose it would be nice with a comment explaining why that is valid.
Contributor
Author
There was a problem hiding this comment.
Indeed this is on purpose. Comment added.
| * Clear all realtime added routes, trip patterns and trips matching the provided feed id. | ||
| * | ||
| * */ | ||
| private boolean clearRealtimeAddedTripPatterns(String feedId) { |
Contributor
There was a problem hiding this comment.
Maybe a better name would be clearEntriesForRealtimeAddedTrips() ?
# Conflicts: # application/src/test/java/org/opentripplanner/model/TimetableSnapshotTest.java
leonardehrenfried
approved these changes
Oct 17, 2024
habrahamsson-skanetrafiken
approved these changes
Oct 17, 2024
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.
Summary
#6007 moved the indexes for real-time added trips from the transit model index to the timetable snapshot.
However the code for clearing these indexes, which is required when the feed uses the incrementality mode FULL_DATASET, was missing.
This PR adds the logic for clearing these indexes.
Issue
No
Unit tests
Added unit test.
Documentation
No