Skip to content

Add regression tests for zero-speed segment updates#7341

Open
afarber wants to merge 5 commits intoProject-OSRM:masterfrom
afarber:7332-track-closed-segments
Open

Add regression tests for zero-speed segment updates#7341
afarber wants to merge 5 commits intoProject-OSRM:masterfrom
afarber:7332-track-closed-segments

Conversation

@afarber
Copy link
Contributor

@afarber afarber commented Jan 23, 2026

Issue

Add Cucumber scenarios to verify that closing segments via --segment-speed-file doesn't incorrectly block turns at unrelated intersections or cascade to parallel routes.

Also add a unit test documenting the turn_id uniqueness invariant and improves the turn penalty warning log.

Tasklist

Requirements / Relations

Related to #7332

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes incorrect routing/turn behavior when closing segments via --segment-speed-file during MLD customization, attributed to concurrent turn-penalty updates.

Changes:

  • Add mutex-based synchronization around a turn-penalty write during parallel edge updates in the updater.
  • Add Cucumber scenarios covering “closure shouldn’t cascade” routing regressions.
  • Add an Unreleased changelog entry for the fix.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/updater/updater.cpp Introduces mutex/lock guard around a turn_weight_penalties update during tbb::parallel_for.
features/testbot/zero-speed-updates.feature Adds regression scenarios to ensure closures don’t block turns at unrelated intersections or cascade to parallel routes.
CHANGELOG.md Adds an Unreleased entry describing the fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@afarber afarber changed the title Fix data race in turn penalty updates during customization Add regression tests for zero-speed segment updates Jan 29, 2026
@afarber
Copy link
Contributor Author

afarber commented Jan 29, 2026

Hi, I misunderstood how tbb::parallel_for with blocked_range works and have reverted the mutex.

I have updated the PR title and description and feel free to close if not useful.

@afarber afarber force-pushed the 7332-track-closed-segments branch from fb424df to 4c14513 Compare February 6, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant