openstreetmap / osmdbt

OSM Database Replication Tools
GNU General Public License v3.0
24 stars 6 forks source link

Log file format #2

Closed mmd-osm closed 4 years ago

mmd-osm commented 4 years ago

I know this may sound unlikely, however there’s no easy way for the create diff tool to validate if the log file is in fact complete and not corrupted in any way.

joto commented 4 years ago

The way this is supposed to work, the log file is written to disk and synced and then renamed atomically to the final file name. If anything goes wrong, the file will not be available under the final file name and osmdbt-create-diff will not "see" it. That should be good enough to make sure that nothing can go wrong. Adding something like a CRC is overkill, I would think, considering all the other places where we assume that data on disk will not change.