Skip to Content.
Sympa Menu

overpass - Re: [overpass] transactions

Subject: Overpass API developpement

List archive

Re: [overpass] transactions

Chronological Thread 
  • From: Roland Olbricht <>
  • To:
  • Subject: Re: [overpass] transactions
  • Date: Mon, 21 Nov 2016 12:17:44 +0100

Hi mmd,

can you maybe also elaborate a bit what happens if: :copy_shadows_to_mains()
gets aborted somewhere in the middle?

The steps are as follows:
- The lock file "osm_base_shadow" is created
- copy_shadows_to_mains() runs
- The lock file "osm_base_shadow" is deleted
- The .shadow files are deleted

The semantics are:
- if "osm_base_shadow" is present, then the ".shadow" files are authorative
- otherwise the standard index files are authorative. If .shadow files exist then they are only authorative for the write process.

In particular the database is never invalid. A file can have no other state then "present" or "absent". And the state of the (very shortlived) file "osm_base_shadow" determines which of the two sets of index files are valid.

From this one can conclude the right approach on restart:
- if "osm_base_shadow" is present then first copy_shadows_to_mains(), afterwards delete "osm_base_shadow"
- if .shadow files are (still) present, then delete them

The dispatcher does that for you. Hence, it should be impossible to get the database corrupted this way.

Best regards,


Archive powered by MHonArc 2.6.18.

Top of Page