Emit warning when osrm-extract encounters ways referencing missing nodes#7351
Open
afarber wants to merge 3 commits intoProject-OSRM:masterfrom
Open
Emit warning when osrm-extract encounters ways referencing missing nodes#7351afarber wants to merge 3 commits intoProject-OSRM:masterfrom
afarber wants to merge 3 commits intoProject-OSRM:masterfrom
Conversation
DennisOSRM
reviewed
Feb 8, 2026
Collaborator
DennisOSRM
left a comment
There was a problem hiding this comment.
The change looks good to me. I think I remember a discussion on the topic where someone raised a concern that this could turn into log spewing on planet files.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a user-visible warning during extraction when OSM <way> elements reference missing <node> elements, improving diagnosability of malformed or clipped input data while keeping extraction successful.
Changes:
- Emit a
logWARNINGinExtractionContainers::PrepareNodes()reporting how many referenced nodes were dropped as missing. - Add a cucumber step to remove a node from generated OSM test data.
- Add a new feature test covering the warning behavior, plus a CHANGELOG entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/extractor/extraction_containers.cpp | Logs a warning when referenced nodes are missing after node intersection/filtering. |
| features/step_definitions/data.js | Adds a test step to remove a node from the synthetic OSM DB. |
| features/options/extract/missing_nodes.feature | New scenario asserting the warning appears on stderr for missing node references. |
| CHANGELOG.md | Documents the new extraction warning behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@DennisOSRM the warning is a single summary line with the count, not per-node, so it shouldn't spam the planet logs |
DennisOSRM
approved these changes
Feb 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #1596
When an OSM file has
<way>elements referencing<node>elements that don't exist,osrm-extractprocesses the file silently. Users get no indication their input data has problems, making it difficult to diagnose issues in later pipeline stages.The extractor already handles this correctly at the code level --
PrepareNodes()filters out missing node references andPrepareEdges()marks edges with invalid nodes asSPECIAL_NODEID. However, the existing debug-level messages are only visible with--verbosity DEBUG.This PR adds a
logWARNINGthat is visible at the default log level.Missing boundary nodes are expected for bounding-box extracts, so extraction still succeeds -- the warning simply informs the user about the count of dropped nodes.
Tasklist
Requirements / Relations
None