Skip to content

Tiles can get marked as dirty twice #494

@SomeoneElseOSM

Description

@SomeoneElseOSM

https://github.com/openstreetmap/mod_tile/blob/master/src/store_file.c#L281

has

if (touchCalendar.tm_year > 105) { // Tile hasn't already been marked as expired

the logic here was that when tiles are marked dirty, their mod time was set back 20 years. "tm_year" is years since 1900, so this works find until 2025 (20 years before 2024 is before 2005). However, it is now 2026. Tiles can get set "dirty" twice:

ls -alt /var/cache/renderd/tiles/ajt/18/0/0/17/244/200/252/128.meta
-rw-r--r-- 1 _renderd _renderd 373630 Mar 14 1986 /var/cache/renderd/tiles/ajt/18/0/0/17/244/200/252/128.meta

A "cludge" might just nudge 105 up a bit; a better fix would calculate the replacement for "105" based on the current wall clock date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions