Repository navigation
fix: preserve graced pages on origin 5xx refreshes - #164
Merged
Merged
Conversation
Abandon failed background fetches instead of delivering a replacement object. Deliver cold origin errors as uncacheable responses and remove ineffective error grace. Cover 500/502/503, recovery, storage headers and mandatory revalidation with real HTTP traffic.
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.
Summary
A delivered background 5xx replaced the graced 200. Handle errors before other storage-policy returns, remove ineffective 24h error grace, and document the behavior. Add a real HTTP regression with a scriptable origin fixture.
Fixes #161
Evidence
IMAGE=varnish-161:run python3 test/e2e/assert-grace-5xx.pyfailed twice: first expired request200 HIT Age: 2, next request500 MISS Age: 0.After:
make test-grace-5xxpasses for 500/502/503, including error-only no-store/Set-Cookie, recovery, cold misses, and must-revalidate.200 HITresponses with the same origin ID and Age increasing from 3 to 7.COMPOSE_PARALLEL_LIMIT=1 make -j1 test test-e2e-hardpassed, serially.Merge Danger
Door: two-way
Revert the cache policy change to roll back; no data migration.
Blast Radius: caching
All origin 5xx responses are uncacheable. Failed background refreshes preserve only the existing grace window, without extending it. Cold errors still reach clients; revalidation directives still prohibit stale serving.