Objects for ESI includes incorrectly miss (Solved / Patch)
jt at endpoint.com
Tue May 20 18:45:01 CEST 2008
JT Justman wrote:
> Hi, everyone. I've been doing my best to dig into the bug I opened:
> Basically, every object is inserted, but the second and subsiquent
> objects always miss.
I have found the cause for the bug, and a potential fix.
In cache_hash.c function HSH_Lookup, there is a ttl check:
if (o->ttl >= sp->t_req)
This test passes on the first ESI and fails on the others. Debugging
shows that the ttl is correct, but t_req is NAN. It seems that t_req is
cleared, and needs to be reset somewhere in ESI or the step flow.
My solution is to set sp->t_req = TIM_real() in ESI_Deliver. (See patch).
Not being intimate with the program flow or timing, I don't know what
other implications this could have. Suggestions?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 410 bytes
Desc: not available
More information about the varnish-dev