You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2005/04/15 01:31:30 UTC

Re: Storable and 3.1.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Theo Van Dinter writes:
> On Thu, Apr 14, 2005 at 12:07:00PM -0700, Justin Mason wrote:
> > On top of that, I don't see exactly *why* Storable is required to
> > implement what it's doing (keeping a copy of the basic system-wide Conf
> > object's data).  as far as I can see, we can do that a la
> > 
> >     %{$conf->{tests}} = %{$basic_conf->{tests}}
> > 
> > ie. direct copying and assignment, in pretty much exactly the same
> > way we use Storable, but without the worries.
> 
> Well, the short version is that it works fine for simple scalars, but any
> form of reference breaks things horribly.  For example:
> 
> # perl -e 'use Data::Dumper; $conf{a}={foo=>bar}; $conf{b}={bar=>baz}; %back = %conf; $conf{b}->{baz} = "schmoo"; print Dumper(\%back);'
> $VAR1 = {
>           'a' => {
>                    'foo' => 'bar'
>                  },
>           'b' => {
>                    'bar' => 'baz',
>                    'baz' => 'schmoo'
>                  }
>         };
> 
> copy_config() goes through %conf one at a time and copies, but there's no
> guarantee the lower data structures are simple.  We wanted dclone() since
> it'll copy complex structures recursively.  We don't need to worry about
> references, etc.
> 
> > We have spamd reliability issues, I think, in the field -- and
> > cutting out one possible cause of that seems like a very good idea.
> > thoughts?
> 
> I'm +1 for getting rid of Storable in general, and we've even discussed
> how to do this before so as to get rid of Storable, increase memory
> sharing between parent and client, decrease usage (via not needing a
> backup conf hash), etc.
> 
> I think that's going to be a bit of work for 3.1, especially if we want
> it out sooner rather than later.

I think we can do a "quick fix" that just replaces use of Storable with a
similar non-Storable copying system, keeping the "backup conf hash" model.
the full hog of increasing RAM sharing etc. is certainly a longer-term
thing that shouldn't be put into 3.1.

- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFCXv1SMJF5cimLx9ARArkLAJoDv8UGyo6pyA4Q6WlHaIEJh+20NgCZAQY6
2c8yJwAJR2zrAK1NigudVao=
=Vb+E
-----END PGP SIGNATURE-----