Skip to content

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

@afarber afarber marked this pull request as ready for review January 24, 2026 14:34
@afarber afarber force-pushed the 7332-track-closed-segments branch 3 times, most recently from bc89327 to f0eddec Compare January 28, 2026 07:37
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.

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