Skip to content
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

Skanetrafiken speed test fails with A Stop model can only be merged with its parent, this is done to avoid duplicates/gaps in the stopIndex #5497

Closed
leonardehrenfried opened this issue Nov 9, 2023 · 2 comments · Fixed by #5504
Assignees
Labels

Comments

@leonardehrenfried
Copy link
Member

Ever since merging the stop model refactoring in #5488, the speed test for Skane fails with the following exception:

17:59:17.972 ERROR [main]  (OTPMain.java:60) An uncaught error occurred inside OTP: java.lang.IllegalArgumentException: A Stop model can only be merged with its parent, this is done to avoid duplicates/gaps in the stopIndex.
java.lang.RuntimeException: java.lang.IllegalArgumentException: A Stop model can only be merged with its parent, this is done to avoid duplicates/gaps in the stopIndex.
	at org.opentripplanner.netex.NetexModule.buildGraph(NetexModule.java:107)
	at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:187)
	at org.opentripplanner.standalone.OTPMain.startOTPServer(OTPMain.java:141)
	at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:55)

https://github.com/opentripplanner/OpenTripPlanner/actions/runs/6813663808/job/18528764419#step:6:687

Other speed tests are unaffected.

This leads me to speculate that it has something to do with Skane mixing GTFS and Netex which no other speed test does.

cc @jtorin @Bartosz-Kruba @habrahamsson-skanetrafiken @t2gran

@leonardehrenfried leonardehrenfried changed the title Skanetrafiken speed test fails with java.lang.IllegalArgumentException: A Stop model can only be merged with its parent, this is done to avoid duplicates/gaps in the stopIndex` Skanetrafiken speed test fails with A Stop model can only be merged with its parent, this is done to avoid duplicates/gaps in the stopIndex Nov 9, 2023
@leonardehrenfried
Copy link
Member Author

I'm also expecting the production Skane graph build to break because of this.

@t2gran
Copy link
Member

t2gran commented Nov 10, 2023

I will take a look at it.

t2gran added a commit to entur/OpenTripPlanner-LegacyHSLFork that referenced this issue Nov 13, 2023
…5497)

The problem with the current code is that the stop model builders are created at the same
time as the GraphBuilderModules. When the models are merged back the StopModel change, and
only the first GraphBuilderModule is allowed to merge its result - this happens, because a
stop model is only allowed to be merged with the model it originated from.

To solve this, we can create a stop model builder late to allow other graph builder models
to complete their work before we continue. Or, we can change the stop model builder and
stop model merge so more than one builder can exist at once. This commit take the second
approach.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants