Re: [squid-users] squid.conf: continuation lines?

From: Robert Collins <robert.collins@dont-contact.us>
Date: Sun, 13 May 2001 17:34:57 +1000

----- Original Message -----
From: "Henrik Nordstrom" <hno@hem.passagen.se>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <squid-dev@squid-cache.org>
Sent: Sunday, May 13, 2001 11:27 AM
Subject: Re: [squid-users] squid.conf: continuation lines?

> Robert Collins wrote:
>
> > Cool. The config parser I've mostly built is all refcounted. (Built
as
> > cbdata now, once I've propogated the changes everywhere I'll get
dump
> > going again and then write a proper refcounting equivalent to
cbdata. At
> > that point reconfigure should no longer be broken and I'll look at
> > asking for HEAD inclusion of some of the branch.
>
> Actually for quite many config items it makes sense to use cbdata.
>
> * Main pointer linked in Config
> * Other modules uses a cbdata reference while referring to that
> configuration entry.
> * When the configuration is freed, cbdataFree() is used, making all
> references !cbdataValid().
>
> A good example are peers.

Yes, but. IMO it makes more sense to use refcounted data. The problem
with cbdata is that during reconfigure, any long lived process that is
configuration dependent gets trashed. ACL's are one example. Peers also.
(what happens when we are half way through getting a list of potential
upstreams and the peer we _just selected_ is made invalid. Configuration
data isn't a callback (you now when it becomes valid and when its no
longer needed), but more a reference you know how many users there are
and when that hits 0 you free it (and the parser tree has a reference to
prevent it dropping below 0).

In summary refcounting and cbdata are nearly identical, the difference
being that refcounting allows use after the "config entry" is
reconfigured away, whereas cbdata doesn't (cbdataValid will fail).

stateful authentication (digest & ntlm), helper parameters, acl lists
are all examples where a process will cross a reconfigure.

One goal I have is to make reconfiguring and freeing config dependant
data asynchronous. This should make reconfiguring a) more robust and b)
less interruptive to squid processing. For example we could restart the
helpers once all requests queued to the current set were processed.
(_very_ important to NTLM auth as we may have a large number of deferred
requests that we are waiting on the client to submit the authenticate
packet).

> stat() should be fairly portable (100% within the UNIX world at
least),
> but is not part of standard-C.

Thanks. Still this becomes trivial once the parser supports that sort of
operation. I'll get squid to that point, and then see how much time I
have.

Rob
> --
> Henrik
>
Received on Sun May 13 2001 - 01:36:51 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:01 MST