spec: unstable_noStore() on draft-placeholder fallback (kill poisoned aggregate) - #1288
Merged
Conversation
…soned aggregate cache without cache-key bumps)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every SRH stuck-pool incident (twice in 8 days, PR #1190 + #1287) needs a manual cache-key bump + deploy to purge the poisoned aggregate cache. Root cause: when SRH goes stuck,
loadAllBenchmarksCachedthrowsAllBenchmarksDraftError,loadAllBenchmarksSafecatches and returns draft placeholders, homepage renders that as HTML, and Vercel Edge caches that HTML forrevalidate=60seconds — under stale-while-revalidate the poisoned HTML then sits for hours after backend recovery, since SWR only refreshes on cache miss.Fix
When
loadAllBenchmarksSafefalls back to placeholders, callunstable_noStore()first. That marks the render as no-store and instructs Vercel to skip every cache layer (ISR + CDN edge) for this response. Every subsequent hit re-renders server-side, and as soon as SRH is back the next hit produces real HTML immediately.Effect
Follow-up: separate PR will add a VPS cron auto-heal (recreate SRH if Redis client count < 10 for 60s) so the recovery path shortens further.
Cheap-tier roadmap