[PATCH] backend conditional requests 5th release

Dmitry Panov dmitry.panov at yahoo.co.uk
Wed Mar 9 15:17:50 CET 2011


Hi Geoff,

Just a heads up, I'm getting assertion failures when running a rather 
simple testcase: using local apache that serves /user/share/doc as the 
backend and running wget -r http://localhost:6802/doc Shortly after that 
the following errors start to appear:

Child (11125) Panic message: Assert error in http_Write(), cache_http.c 
line 1181:
   Condition((hp->hd[HTTP_HDR_STATUS].b) != 0) not true.
thread = (cache-worker)

I have been able to reproduce it on 2 different machines with very 
different hardware configurations which makes hardware problem quite 
unlikely. Also

httperf --server localhost --port 6802 --uri /  --num-conns 1 --num-calls 4000

runs without a problem.

These 2 machines both run 32bit linux kernel. I haven't been able to 
reproduce the problem in a 64bit environment.

Unfortunately I haven't got time to try the unpatched trunk (I tried it 
with revisions 3 and 4 of the patch) or do any further experiments but 
I'll try to do so in the next couple of days and then post more details.

On 09/03/2011 10:57, Geoff Simmons wrote:
> Hello again,
>
> And yet another version (v5) of the patch for conditional backend
> requests. Like the last version, this is one is to keep pace with recent
> commits to the trunk. The patch applies to:
>
> commit 13c60b522a6c7abe9cc1052c2a244f25f2ba5227
> Date:   Tue Mar 8 14:47:57 2011 +0100
>
> phk committed some changes related to this feature, mainly the addition
> of the new timer variable to VCL. There are also some changes in the way
> that previous version of the patch worked.
>
> - The name of the timer for conditional requests changed again, now to
> "keep". The management parameter is "default_keep".
>
> - In addition to beresp.keep, obj.keep and stale_obj.keep, there is now
> req.keep, which sets an upper bound for the keep time within a session.
> (Like req.ttl, which phk added yesterday.)
>
> - The keep interval now begins after ttl and grace have elapsed, so an
> object is available for conditional requests after obj.ttl + obj.grace,
> and is scheduled for eviction after obj.ttl + obj.grace + obj.keep. (In
> previous versions of the patch, the keep interval began after ttl
> elapses, independent of grace, and object were evicted after obj.ttl +
> max(obj.grace, obj.keep).)
>
> - The default value default_keep is now 0, so you need to set a non-zero
> default_keep, or set keep in VCL, to make the conditional requests happen.
>
> The Wiki page has been updated to reflect all of this:
>
> http://www.varnish-cache.org/trac/wiki/BackendConditionalRequests
>
> @phk: I made one change in the commits from yesterday. Since
> default_keep = 0 and EXP_get_*() was returning -1 for any timer = 0,
> *.keep was always -1 unless it was changed in VCL. I think VCL authors
> wouldn't expect that; I got feedback about an earlier version in which
> beresp.keep was -1 after a backend validation, which both the reporter
> and I thought was wrong, so I fixed it in the next version.
>
> Now I have this in cache_expire.c:
>
>          double                                                  \
>          EXP_Get_##fld(const struct exp *e)                      \
>          {                                                       \
> -               return (e->fld>  0. ? e->fld : -1.);            \
> +               return (e->fld>  0. ? e->fld : 0.);             \
>          }                                                       \
>
> This required a change in test case b00040.vtc, which expects req.grace
> == -1, but that doesn't seem to be a critical value there.
>
>
Best regards,

-- 
Dmitry Panov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20110309/db3981ce/attachment-0003.html>


More information about the varnish-dev mailing list