Repository navigation
Reduce primary-provider retry budget to 3 attempts total - #975
Conversation
Logs on a 272-tile USGS 3DEP run (#971 follow-up) showed the 5-attempt ladder taking ~12 s per tile across three tiles before giving up — feels excessive when the AWS Terrarium fallback is ~2 s away and produces perfectly usable output. Trim to 3 attempts total (initial + 2 retries) so we spend at most ~2.25 s plus jitter on a flaky tile before handing it off. The fallback path already handles persistent upstream failures well: visually-verified recovery on the 1/272 case reported from the field shows no seams or holes in the generated world.
There was a problem hiding this comment.
Pull request overview
Reduces the retry/backoff budget for primary fixed-tile elevation providers (notably USGS 3DEP) so persistent/transient upstream failures fall back to AWS Terrarium sooner, improving end-to-end generation latency on flaky tiles.
Changes:
- Reduced the maximum request attempt budget from 5 total attempts to 3 total attempts.
- Updated the accompanying inline documentation to reflect the new attempt/backoff budget and rationale.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// fallback in `fetch_fixed_tile_grid`, which is cheap enough that we | ||
| /// prefer getting there quickly over retrying the primary provider | ||
| /// for longer. | ||
| const MAX_RETRIES: u32 = 3; |
There was a problem hiding this comment.
MAX_RETRIES now represents the total number of attempts (initial + retries), as indicated by the updated doc comment and the for attempt in 0..MAX_RETRIES loop semantics. The name is misleading and makes it easy to accidentally re-tune the budget incorrectly later; consider renaming to something like MAX_ATTEMPTS/MAX_TOTAL_ATTEMPTS and updating its call sites/log output accordingly.
| const MAX_RETRIES: u32 = 3; | |
| const MAX_ATTEMPTS: u32 = 3; |
|
⏱️ Benchmark run finished in 0m 59s 📈 Compared against baseline: 30s 🟢 Generation time is unchanged. 📅 Last benchmark: 2026-04-23 19:29:35 UTC You can retrigger the benchmark by commenting |
Logs on a 272-tile USGS 3DEP run (#971 follow-up) showed the 5-attempt ladder taking ~12 s per tile across three tiles before giving up — feels excessive when the AWS Terrarium fallback is ~2 s away and produces perfectly usable output. Trim to 3 attempts total (initial + 2 retries) so we spend at most ~2.25 s plus jitter on a flaky tile before handing it off.
The fallback path already handles persistent upstream failures well: visually-verified recovery on the 1/272 case reported from the field shows no seams or holes in the generated world.