Need some understanding on expiry thread

Guillaume Quintard guillaume at varnish-software.com
Wed Jul 25 21:26:27 UTC 2018


Hi,

There are people better suited to answer this, but hopefully, they'll yell
if I'm saying anything stupid.

After a cursory glance at the code, I'd say that objcores can be expired
either from the inbox or from the binheap and that if you find a "posted"
oc on the binheap, it's the inbox turf, so we null the oc to not handle it
in the rest of the function.

-- 
Guillaume Quintard

On Wed, Jul 25, 2018 at 9:49 AM, Prem Kumar <n.premkumar.me at gmail.com>
wrote:

> exp_expire(struct exp_priv *ep, double now)
> {
> ..
>  if (oc->timer_when > now)
>                 return (oc->timer_when);
>
>
>
>
>   if (oc->exp_flags & OC_EF_POSTED) {
>                 oc->exp_flags |= OC_EF_REMOVE;
>                 oc = NULL;
>         } else {
>
>
> why do we need to set to oc to NULL after marking it as NULL. How does the
> object will be removed from hash and free'd from respective storage backend.
>
>
> Thanks,
> Prem
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20180725/db27b867/attachment.html>


More information about the varnish-misc mailing list