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 06:04:23 +0100


the write process is designed to be transactional. It's implemented and basically tested.

However, as this is an activity highly prone to race conditions, I don't claim that every possible flow of events has been tested.

That said, I would like to tell the idea how it is intended:

a) The update_from_dir process can be killed at any time. This will stop further updates from taking place. These runs will find the .lock file with a PID other then theirs and therefore freeze.

b) You can kill the update_from_dir and restart the dispatcher. On restart, the dispatcher drops the .shadow and .lock files of any previous failed update. This is on database level a rollback. In detail, the algorithm is a little bit more complicated because it does something different in case it was interrupted during copying of the index files. But the idea is to be atomic on commit.

Essentially, scenario a) is designed to stop things if a bug in update_from_dir has been hit. Scenario b) is a safe response to a computer reboot for reasons unrelated to Overpass API.

Both scenarios are somewhat but surely not exhaustively tested.

Best regards,

Archive powered by MHonArc 2.6.18.

Top of Page