-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
condfetch: Skip revalidation of an invalidated stale_oc #4082
Draft
dridi
wants to merge
6
commits into
varnishcache:master
Choose a base branch
from
dridi:dying_304
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Jun 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 456a100 - Browse repository at this point
Copy the full SHA 456a100View commit details -
DRAFT: vcl: New restart(fetch) transition
TBD (missing documentation and coverage)
Configuration menu - View commit details
-
Copy full SHA for 6e9b09f - Browse repository at this point
Copy the full SHA 6e9b09fView commit details -
condfetch: Bail out of 304 merger of dying stale_oc
A valid stale objcore may be selected during lookup, enabling a conditional fetch from the backend. Depending on the backend, or the resource being requested, this may leave a long window during which the stale object may be invalidated. In that case, a 304 response would defeat the invalidation, making it possible for invalidated response header fields or bodies to be perpetuated despite Varnish reporting a successful invalidation. We should consider adding this to vcl_backend_error: if (beresp.was_304) { unset bereq.http.If-Modified-Since; unset bereq.http.If-None-Match; return (retry(fetch)); } This would mostly preserve the current behavior, as observed by a client. In particular, when the ETag of the invalidated stale object is still the same when a new copy is fetched, the client side INM processing would remain. Varnish would simply no longer merge and reuse invalidated stale objects internally. From the point of view of an operator, there would of course be a visible change in the presence of a retry.
Configuration menu - View commit details
-
Copy full SHA for 588d103 - Browse repository at this point
Copy the full SHA 588d103View commit details -
condfetch: Demote to fetch for dying stale_oc
When it is time to decide between making a bereq for a regular or conditional fetch, we need to ensure that the stale object is still valid. There is a window between the lookup and the begining of a fetch task during which the object could have been invalidated. The window is in theory much smaller than the one between the lookup and the processing of a 304 response, but it can be significant if the fetch task was queued or restarted. Catching it early allows to proceed with a regular fetch.
Configuration menu - View commit details
-
Copy full SHA for c461fb2 - Browse repository at this point
Copy the full SHA c461fb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0d5920 - Browse repository at this point
Copy the full SHA b0d5920View commit details -
builtin: Retry failed 304s by default
Named after vcl_backend_refresh from varnishcache#3994.
Configuration menu - View commit details
-
Copy full SHA for 2c12ab4 - Browse repository at this point
Copy the full SHA 2c12ab4View commit details
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.