Skip to content

Fix slow retry replaying full fast-retry cycle (~34s lag)#213

Merged
stef-k merged 1 commit intomainfrom
fix/tile-slow-retry-single-shot
Mar 26, 2026
Merged

Fix slow retry replaying full fast-retry cycle (~34s lag)#213
stef-k merged 1 commit intomainfrom
fix/tile-slow-retry-single-shot

Conversation

@stef-k
Copy link
Copy Markdown
Owner

@stef-k stef-k commented Mar 26, 2026

Summary

  • Slow retry previously reset to _fetchWithRetry(attempt=0), replaying a full 5-attempt fast-retry cycle on each poll — causing ~34s lag between visible attempts and 6 per-IP budget hits per cycle
  • Now uses _slowRetryOnce: single fetch per slow poll (~15s interval with jitter), reschedule on 503, 1 budget hit per poll
  • Permanent errors (404, 500) still fail immediately in slow phase
  • Network errors reschedule another slow poll (transient)

Closes #206

Test plan

  • dotnet build passes (0 errors)
  • dotnet test passes (1407 tests)
  • Cold-cache zoom 18→10: gray tiles should fill in at ~15s intervals (not ~34s)
  • Panning/zooming away cancels slow retry timers

_scheduleSlowRetry previously reset to attempt 0, triggering a full
5-attempt fast-retry cycle on each slow poll. With Retry-After: 5s per
attempt, that's ~30s of wasted retries before the next meaningful poll,
plus 6 per-IP budget hits per cycle.

Now uses _slowRetryOnce: single fetch per slow poll, reschedule on 503.
Each slow attempt takes ~15s (just the poll interval) and costs 1 budget
hit instead of 6.

Closes #206
@stef-k stef-k merged commit 789679a into main Mar 26, 2026
@stef-k stef-k deleted the fix/tile-slow-retry-single-shot branch March 26, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cold-cache tile loading returns gray areas instead of progressively filling tiles

1 participant