Skip to content

Answer stale PMTiles metadata admissions explicitly and distinguish dropped callbacks from timeouts #2215

Closed

Description

@giswqs

crates/tiles/src/pmtiles.rs::with_info reads archive_epoch, then moves its callback into if_archive_current. If reload advances the epoch between those operations, if_archive_current returns None and drops the closure. The callback is never called. caller_callback only wraps invocation; it has no drop-time terminal answer.

info_blocking consequently receives Disconnected immediately but maps it to “no answer in N s”, even though it did not wait N seconds. Tile Answer drop cleanup prevents a retained fetch, so this is terminal callback/error consistency rather than a hang.

Keep ownership of the callback until admission is known, then answer a stale admission with the explicit dropped/cancelled result. Distinguish receiver disconnection from an actual timeout. Add a deterministic regression that advances the archive epoch between capture and admission, asserting exactly one terminal callback and no stale info publication.

Verified against ce40749:

  • crates/tiles/src/pmtiles.rs:479-529
  • crates/tiles/src/cache.rs:127-136,270-277

Release-sweep source: #1504 (comment)

Duplicate search: all-state PMTiles callback reload found no dedicated issue. Requires a deterministic epoch-admission test hook; obsolete reads must remain unable to publish current metadata.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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