Fix two-stage processing when flat node file is used#2303
Merged
lonvia merged 2 commits intoosm2pgsql-dev:masterfrom Feb 16, 2025
Merged
Fix two-stage processing when flat node file is used#2303lonvia merged 2 commits intoosm2pgsql-dev:masterfrom
lonvia merged 2 commits intoosm2pgsql-dev:masterfrom
Conversation
This is an additional fix to the fix in 8d1a55e. If a flat node file is used, nodes are not stored in the database (unless --middle-with-nodes is specified, but also then only nodes with tags are stored in the database). There are two problems here: 1. The "get_node" prepared statement was not prepared in this case, so it fails when executes. This is fixed by only executing that statement if m_store_options.nodes is set in the middle. 2. If there is no node in the database, there might still be one in the flat node file. So we need to try this and create the node from the information in there. (It will only have the node id and location in it, but at least we get the location.) This commit contains both fixes.
Another addition to the same issue as in the previews commit: In non-slim mode look for node locations in the (on disk and ram) caches and create a node from there is a node is requested for further processing in two-stage processing.
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.
This is an additional fix to the fix in 8d1a55e. If a flat node file is used, nodes are not stored in the database (unless
--middle-with-nodesis specified, but also then only nodes with tags are stored in the database).There are two problems here:
m_store_options.nodesis set in the middle.The second commit fixes essentially the same problem for non-slim mode. In that case we look into the (disk and/or ram) caches for the node location if the node is not in our object store.