Resume interrupted imports instead of DROP DATABASE on restart#661
Open
zebernst wants to merge 3 commits into
Open
Resume interrupted imports instead of DROP DATABASE on restart#661zebernst wants to merge 3 commits into
zebernst wants to merge 3 commits into
Conversation
Detect Nominatim import stage in init.sh and continue via nominatim import --continue when a persistent Postgres volume has partial progress. Fail closed on probe errors and flatnode/DB inconsistency. Document the restart behavior and cover marker-lost and mid-import resume in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid mapping the postcodes/early-index window to --continue load-data (Nominatim truncates placex), keep Tiger archives until loaded, and make CI prove a real --continue path without Mac port / pipefail false fails. Co-authored-by: Cursor <cursoragent@cursor.com>
The helper was a thin wrapper around a single nominatim import --continue call; keep detect-and-act in one place. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
import-finished, detect the Nominatim import stage from Postgres and continue or skip instead of alwaysDROP DATABASE(#660).freshmismatch, mid-osm2pgsql, postcodes/pre-index without a safe continue target).donepath: still import if the archive is present and Tiger rows are missing; only delete the archive after Tiger is loaded.done) and a deterministic--continue db-postprocesspath; assert helper retries until the API is up.Motivation
With a persistent
/var/lib/postgresql/16/mainvolume, any container restart beforeimport-finishedpreviously wiped osm2pgsql/indexing progress. Related: #342, #350, #332.Behavior
freshDROP+ full import (refuse if flatnode is non-empty)load-datanominatim import --continue load-data(empty placex only)indexing/db-postprocessnominatim import --continue <stage>doneOperators restart the same container with the same volumes — no special resume CMD.
Test plan
Detected import stage: done, noDROP DATABASE, search worksDetected import stage: db-postprocessand--continue db-postprocess, noDROP DATABASE, search worksnominatim:5.3.2; marker-loss done-path and db-postprocess continue both passed against MonacoMade with Cursor