Skip to content

Conversation

@lonvia
Copy link
Member

@lonvia lonvia commented Oct 10, 2025

The geofabrik and openstreetmap.fr replication severs only keep diffs for the last couple of months. This can lead to strange behaviour when trying to download older diffs or trying to update an older extract.

This PR adds a couple of changes to improve handling with these kind of servers:

  • New parameter for timestamp_to_sequence to refuse returning sequence numbers for timestamps older than the oldest available change.
  • collect_diffs() now errors out when the first diff to be downloaded returns a 4xx error. Before it wold just signal that not all diffs could be downloaded, sending the caller potentially in an infinite retry loop.
  • pyosmium_get_changes and pyosmium_up_to_date will now detect when diffs are no longer available and properly error out.

Fixes #257.

@lonvia lonvia merged commit 785aae6 into osmcode:master Oct 10, 2025
28 checks passed
@lonvia lonvia deleted the past-replication branch October 10, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Improve error handling during replication download

1 participant