Bug 4911 - RFE: Helper process for Bayes expiry
Summary: RFE: Helper process for Bayes expiry
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P5 enhancement
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on: 3466
Blocks: 4560
  Show dependency tree
 
Reported: 2006-05-26 10:11 UTC by Justin Mason
Modified: 2006-12-31 12:29 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
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.