Bug 4911

Summary: RFE: Helper process for Bayes expiry
Product: Spamassassin Reporter: Justin Mason <jm>
Component: spamc/spamdAssignee: SpamAssassin Developer Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P5    
Version: SVN Trunk (Latest Devel Version)   
Target Milestone: Undefined   
Hardware: Other   
OS: other   
Whiteboard:
Bug Depends on: 3466    
Bug Blocks: 4560    

Description Justin Mason 2006-05-26 10:11:45 UTC
This was a suggested idea for the Google Summer of Code 2006;
I'm adding it to the bugzilla for future use, and in case anyone feels
like implementing it.

Subject ID: spamassassin-separate-expiry
Keywords: perl, bayes, spamd, processes
Description: Theo said: 'I also suggested having things like Bayes expiry and
such being passed back to the parent who can spawn a helper process to do the
work.  That way the children processes will be able to accept, process, return
the result, notify parent for bayes work, go back to listening.  Right now we
do: accept, process, do bayes work, return result, go back to listening, which
ends up causing timeouts and possibly eats up all processing children.
Possible Mentors: Theo Van Dinter (felicity -at- apache.org)
Comment 1 Theo Van Dinter 2006-12-30 19:03:53 UTC
it's worth noting that this is essentially a duplicate of bug 3466.  I already
put in some code to 3.2 to do this kind of thing -- less about a helper queue to
deal with expiry and such, more about returning the results before doing the
expiry, but same idea.  unless anyone has an issue with it, I'm going to close
this ticket out.
Comment 2 Tom Schulz 2006-12-31 10:13:21 UTC
Is there any provision for having the child that is doing the Bayes work to
signal that the work is being done so that no other child will attempt to do
the same work?  The use of a helper process would seem to take care of this
automatically, as well as preventing any children from being tied up doing
Bayes work.  The important thing, however, is to prevent more than one
child/process from trying to do the same job.  This might not be a problem
with the current SpamAssassin, but it did happen in the past.
Comment 3 Theo Van Dinter 2006-12-31 12:29:07 UTC
(In reply to comment #2)
> Is there any provision for having the child that is doing the Bayes work to
> signal that the work is being done so that no other child will attempt to do
> the same work?

Bayes has had that for ages.  It's a combination of the lock file and the
minimum time between expires.

There's nothing to stop SA from expiring multiple Bayes DBs however.  That was
part of the idea for this ticket to get a queue system built up in the bayes
parent, etc.