| Main Archive Page > Month Archives > spamassassin-users archives |
On Mon, 1 Nov 2010 10:28:43 -0400
Robert Blayzor <rblayzor.bulk@inoc.net> wrote:
> Would it make more sense that when you do a learn_to_journal and a
> sync to make a copy of the bayes_toks database, say to
> "bayes_toks.new" and merge/add tokens from the journal to that?
> Then, once the sync is complete you can lock and copy the .new to the
> current and continue. This should only lockout the database from
> updates for only seconds (if that) rather than locking it out during
> the entire learn/add process.
I don't think it's a matter of locking-out updates - presumably
token updates that occur after the start of a sync should go into the
new journal file.
As I understand it there are two locks here, one is a lock-file that
locks-out other administrative actions (syncs, expires, backups etc),
the other is the reader-writer lock in gdb. I suspect that the spamd
children are locked-out trying to get a read-lock on the DB rather
than on the lock-file. Either way, I think what you are saying makes
sense.