[Tile-serving] [osm2pgsql-dev/osm2pgsql] Introduce per geometry and overall limits on number of expire tiles (PR #2449)

Sarah Hoffmann notifications at github.com
Fri Jan 30 09:08:07 UTC 2026


@lonvia commented on this pull request.



> +        m_overall_tile_limit_reached = true;
+        log_warn("Overall tile limit {} reached for this run!",
+                 m_max_tiles_overall);
+        return;
+    }
+
+    m_tiles.insert(dirty_tiles.cbegin(), dirty_tiles.cend());
+}
+
+bool expire_output_t::empty() noexcept
+{
+    std::lock_guard<std::mutex> const guard{*m_tiles_mutex};
+    return m_tiles.empty();
+}
+
+quadkey_list_t expire_output_t::get_tiles()

Shouldn't that, strictly speaking, go into a mutex as well?

>  
 void expire_tiles_t::expire_tile(uint32_t x, uint32_t y)
 {
-    // Only try to insert to tile into the set if the last inserted tile
-    // is different from this tile.

Any particular reason to drop this optimisation?

> @@ -398,6 +404,12 @@ int main(int argc, char *argv[])
         auto const &suffix = input.back();
         if (suffix == "osm" || suffix == "pbf" || suffix == "opl") {
             // input is an OSM file
+
+            if (cfg.zoom == 0) {
+                throw std::runtime_error{
+                    "You have to set the zoom level ith -z, --zoom"};

ith -> with

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2449#pullrequestreview-3727084158
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2449/review/3727084158 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20260130/095f08ed/attachment.htm>


More information about the Tile-serving mailing list