fix(contractor): space exhaustion in linear storage - #7673
Conversation
There was a problem hiding this comment.
🟡 Human review recommended
The change impacts core contraction-path witness search behavior and, while plausibly correct, warrants human verification on real-world datasets/regression scenarios due to potential knock-on effects (e.g., increased shortcuts).
Pull request overview
This PR addresses an intermittent osrm-contract failure (hang/segfault/assert) by adding a hard stop to the contractor’s witness search when the fixed-capacity LinearHashStorage backing the ContractorHeap approaches saturation, preventing the linear-probing hash from ever becoming completely full (which would otherwise risk an infinite probe loop).
Changes:
- Change the internal
relaxNodehelper to return a boolean “must stop” flag instead ofvoid. - Abort the witness search early when
heap.Occupancy()reachesRELAXED_NODE_LIMIT, avoiding potentialLinearHashStoragefull-table linear-probing livelocks.
File summaries
| File | Description |
|---|---|
| src/contractor/contractor_search.cpp | Adds an early-exit condition to prevent fixed-capacity heap storage saturation during contraction witness searches. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7673 +/- ##
==========================================
+ Coverage 90.74% 94.15% +3.41%
==========================================
Files 484 484
Lines 37688 37694 +6
==========================================
+ Hits 34201 35492 +1291
+ Misses 3487 2202 -1285 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fixes #7656