Skip to content

fix(hl-history): raise staleness threshold to 2h - #1934

Merged
Flotapponnier merged 1 commit into
devfrom
fix/hl-history-max-age
Aug 13, 2026
Merged

fix(hl-history): raise staleness threshold to 2h#1934
Flotapponnier merged 1 commit into
devfrom
fix/hl-history-max-age

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • readCohortSnapshot for the hl-history blob used the default 10-min max age
  • History data is daily-stepped (changes once per day), so 10 min is too tight
  • When stale, Vercel triggers fetchHlHistoryFresh() which does ~200 Prom range queries — expensive and slow
  • Raises the threshold to 2h so the blob is reused as long as it's recent enough

Effect

  • Fewer unnecessary full history rebuilds from Vercel
  • Reduces flicker where history = null during the rebuild window → placeholder shown
  • The HlBuilderNoHistory fallback (already on dev) handles the rare case where history is genuinely absent

@Flotapponnier
Flotapponnier merged commit 6810bed into dev Aug 13, 2026
1 check failed
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.

1 participant