[squid-dev] Ctx cleanup

Alex Rousskov rousskov at measurement-factory.com
Thu Mar 18 02:13:07 UTC 2021


On 3/17/21 7:40 PM, Joshua Rogers wrote:

> I am currently looking at how Squid handles the so-called entering and
> exiting of contexts: ctx_enter, ctx_exit.

That legacy API should be removed soon. You can see a rough preview of
the removal proposal, including motivation, at the following unofficial
commit: https://github.com/measurement-factory/squid/commit/944cb4c


> My question is: what happens if this context is not cleaned up/ctx_exit
> is not called? Is there some other handler which removes stale contexts?

No, there is not. Stale context will stay cached. I am not sure when/if
it will be dropped/forgotten. That known problem is one of the reasons
that legacy API should be removed. Modern Squids use CodeContext API
instead. CodeContext is exception-aware and solves a few other problems.


HTH,

Alex.


More information about the squid-dev mailing list