[Tile-serving] [osm2pgsql] use one instance of node-persistant-cache per thread (#257)

Sarah Hoffmann notifications at github.com
Mon Jan 19 22:12:24 UTC 2015


Somehow the way the node-persistent cache was used, was really confused. New instances have been created but not in the new threads but in the old one and, what is worse, before the cache was actually commited to disk, so any reading would have been rather random. This commit now closes the cache used during the reading phase properly and then creates new instances for each thread. That's how the C code did it before.

There is also some strangeness in the way the cache is opened for reading only (using append mode instead of the cache_already_written variable) but that doesn't look fatal, so it's for another pull request.

Hopefully, fixes #229. @simonpoole would you mind trying it out?
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/257

-- Commit Summary --

  * use one instance of node-persistant-cache per thread

-- File Changes --

    M middle-pgsql.cpp (14)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/257.patch
https://github.com/openstreetmap/osm2pgsql/pull/257.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/257
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150119/9c6b75a0/attachment.html>


More information about the Tile-serving mailing list