Skip to content

fix(contractor): space exhaustion in linear storage - #7673

Merged
DennisOSRM merged 1 commit into
masterfrom
dlx/fix_7656
Aug 4, 2026
Merged

fix(contractor): space exhaustion in linear storage#7673
DennisOSRM merged 1 commit into
masterfrom
dlx/fix_7656

Conversation

@DennisOSRM

Copy link
Copy Markdown
Collaborator

fixes #7656

Copilot AI review requested due to automatic review settings August 3, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 relaxNode helper to return a boolean “must stop” flag instead of void.
  • Abort the witness search early when heap.Occupancy() reaches RELAXED_NODE_LIMIT, avoiding potential LinearHashStorage full-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

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.15%. Comparing base (9fd8ab9) to head (4989923).

Files with missing lines Patch % Lines
src/contractor/contractor_search.cpp 62.50% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DennisOSRM
DennisOSRM merged commit ccf2a8e into master Aug 4, 2026
28 of 44 checks passed
@DennisOSRM
DennisOSRM deleted the dlx/fix_7656 branch August 4, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants