Ian> But, in fact I already have a cronjob running "sa-learn Ian> --force-expire". The reason I would prefer to remove it (and so Ian> the reason for my original post) is that it does a journal sync as Ian> well, which I didn't intend and which interferes with other things.
On 2015-05-25 09:43 +0200, Matus UHLAR - fantomas wrote: Matus> what other things? Journal is here to fasten database updates, Matus> not to avoid database writes. too big journal slows things down. Matus> The main reason to use manual expire is to avoid ocassional Matus> delays with automatic expire noted in the bugreport you posted Matus> link to. Matus> so, again, what are reasons you want to avoid journal syncs?
On 25.05.15 09:47, Ian Zimmerman wrote:
I do the database updates in a batch fashion, learning each input message with --no-sync, then doing a --sync at the end.
how this does differ from running sa-learn over multiple mail, e.g. mailbox or maildir?
This --sync cannot wait too long because I want to defend against current spam.
I'd say the more messages are learned, the more time sync takes. Did you measure the times to see the differencies?
That is, it cannot wait as long as the typical time between expires. But if an explicit expiry happens to run at the same time, the result is a mess.
explicit expiry happens when you run it. If you do stuff in batch mode, you can call sa-learn --force-expire at the very end, which should not cause mess...
Of course there is a simple solution, have a single job which decides by itself if it's time to expire or not, rather than rely on the cron schedule. But it seemed to me that the two tasks were independent and so should be in separate jobs. As it was explained in the other subthread, I was wrong with that assumption.
another simple solution is use SQL or redis storage for bayes database :-) -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. A day without sunshine is like, night.