[Tile-serving] [openstreetmap/osm2pgsql] Various Cleanups (#1350)

Sarah Hoffmann notifications at github.com
Tue Dec 1 10:24:44 UTC 2020


@lonvia commented on this pull request.



> @@ -240,14 +240,6 @@ void node_ram_cache::set_dense(osmid_t id, osmium::Location location)
         }
 
         if (queue[expectedpos] != &blocks[block]) {
-            if (m_warn_node_order) {
-                log_warn("Found out of order node {}"
-                         " ({},{}) - this will impact the cache efficiency",
-                         id, block, offset);
-
-                // Only warn once
-                m_warn_node_order = false;
-            }

This leaves us with an odd 'if' check that is not quite understandable. If you don't want to touch the code any further than removing the check, I would suggest to add a comment about what used to be here aka 'This can only happen if the node is out of order. Ignore the node.'

>      // zoom level 31 is the technical limit because we use 32-bit integers for the x and y index of a tile ID
-    if (expire_tiles_zoom_min >= 32) {
+    if (expire_tiles_zoom_min > 32) {

Did you mean to change the 32 to 31?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1350#pullrequestreview-541754277
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20201201/3867e89e/attachment.htm>


More information about the Tile-serving mailing list