This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Commit 671b93b
condfetch: Test retrying a bereq on a dying stale object
The built-in vcl_refresh_valid returns a 503 error if the stale object used for
revalidation gets invalidated while the backend fetch is in progress.
One alternative is to not dismiss the stale object, but that can lead to
invalidated objects being re-instantiated through concurrent refreshes (#4082).
This test case covers the other alternative, which is to retry the fetch. We
could use
sub vcl_refresh_valid {
if (!obj_stale.is_valid) {
# core code removes conditional headers INM/IMS
return (retry);
}
}
but more realisticly, real world VCL will retry in v_b_e, so we take that route
and keep the built-in vcl_refresh_valid {}
The plain retry works because core code detects the invalidated stale object and
removes the conditional headers.
Committer edit: Removed code change from original commit, edited test case and,
rewrote commit message. See
#4400 (comment)1 parent 8802338 commit 671b93b
1 file changed
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments