http://bugzilla.spamassassin.org/show_bug.cgi?id=3471 ------- Additional Comments From felicity@kluge.net 2004-06-04 19:43 -------
Subject: Re: add sanity check so too many tokens don't get expired
On Fri, Jun 04, 2004 at 06:35:31PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> We should be figuring out the optimal atime value that doesn't expire
> too many tokens. So is that part of the code doing the wrong thing?
it's all documented in the sa-learn docs. ;)
the expiry works in 2 passes. the first pass is what generates the
atime to use, and the second pass actually does the removal.
to make expiry go faster, the first pass will try to estimate what the
atime value should be based on what the last expiry run found, as long
as they are similar enough in what they want to accomplish (ie: if you
previously expired 5000 tokens, and you now want to expire 5000 tokens,
you can probably use the same atime delta as last time...). this works
on the idea that message flow is relatively constant.
if estimation shouldn't be used (it's rather picky), the first pass will
actually go through all the tokens to figure out what atime value should
be used based on an exponential scale (12 hours, 24 hours, up through
256 days).
the problem is that doing estimation gives you, well, an estimate.
most of the time it's right, and sometimes it's wrong. it's the reason
why people don't like the weatherman on tv.
so to answer your question, we can always use a better estimation
algorithm/equation, but the nature of the beast is that estimations will
sometimes be wrong so we should just put a sanity check in the bottom
to make sure we're not about to shoot off our own foot.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.