Better database??

David Relson relson at osagesoftware.com
Tue Mar 2 13:14:58 CET 2004


On 02 Mar 2004 17:10:15 +1100
m at mo.optusnet.com.au wrote:

> David Relson <relson at osagesoftware.com> writes:
> > Hello Michael,
> [...]
> > I have noticed one anomaly that appears several places in your
> > patch. In the following bit of code:
> > 
> > 	ds_get_msgcounts(dsh, &msgs_good, &msgs_bad);
> > 	msgs_good = val.goodcount;
> > 	msgs_bad  = val.spamcount;
> 
> Silly mistake. the 2nd pair of lines shouldn't be there.
>  
> > The call to ds_get_msgcounts() sets values for msgs_good and
> > msgs_bad. These values are overwritten in the next two statements. 
> > I also wonder why you changed the calling convention from one "dsv_t
> > *" parameter to two "int *" parameters.  Was there a particular
> > reason?  
> 
> No, they should be signed.

Au contraire mon ami.  Since they're counts, they're always positive. In
addition to the counts, because the dsv_t structure contains the
timestamp,  I think that bogofilter needs to use dsv_t.


> [..] 
> > If this relates to your "little rant", the goal was to use a struct
> > so that ham/spam count pairs could be passed as an atomic type.
> 
> Indeed. The change was because I was initally using 16 bit
> counts on tokens (it shrunk the data size significantly)
> and I started re-working things to make that possible.
> 
> In the end it was just too hard to do, so I reverted to 32
> bit counters.

I can see 16 bit counters getting messy.  You were wise to revert :-)

David




More information about the Bogofilter mailing list