Skip to content

Commit 86ad6d6

Browse files
authored
Merge pull request #1438 from joto/disable-expire-on-create
Disable expire in create mode
2 parents 73064c2 + 78e9feb commit 86ad6d6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/expire-tiles.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ struct expire_tiles
6060
expire_tiles(uint32_t maxzoom, double maxbbox,
6161
const std::shared_ptr<reprojection> &projection);
6262

63+
bool enabled() const noexcept { return maxzoom != 0; }
64+
6365
int from_bbox(double min_lon, double min_lat, double max_lon,
6466
double max_lat);
6567
void from_wkb(char const *wkb, osmid_t osm_id);

src/output-flex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ void output_flex_t::delete_from_table(table_connection_t *table_connection,
12941294
assert(table_connection);
12951295
auto const id = table_connection->table().map_id(type, osm_id);
12961296

1297-
if (table_connection->table().has_geom_column()) {
1297+
if (m_expire.enabled() && table_connection->table().has_geom_column()) {
12981298
auto const result = table_connection->get_geom_by_id(type, id);
12991299

13001300
if (result.num_tuples() == 0) {

0 commit comments

Comments
 (0)