Matus UHLAR - fantomas wrote:
>
> On 20.01.09 19:45, Matt Kettler wrote:
>   
>> Yes, more specifically, it's mostly going to be updating the "atime", or
>> time of last access, records for tokens. This time is used by the expiry
>> process to drop the least recently used tokens.
>>     
>
> What does SA do, if it can't r/w open bayes database? Will it skip BAYES
> checks or just tie it r/o ?
>
> (I notice ocasional missing BAYES in X-Spam headers)
>   
Well, first let's be clear.. it's R/W opening the journal, not the
database itself.

The main _toks and _seen files are only locked R/W if there's one of the
following going on:
     learning without bayes_learn_to_journal set
     a journal sync
     token expiry is running

As for write locks to the journal, if for some reason there's a
conflict, the update is just dropped with a warning. This isn't
incredibly likely unless your bayes is really busy, as journal updates
are pretty short in nature.

If you look at /lib/Mail/SpamAssassin/BayesStore/DBM.pm and find "sub
cleanup" in it.

Snippets of that code:

  my $path = $self->_get_journal_filename();
  ...

  if (!open (OUT, ">>".$path)) {
    warn "bayes: cannot write to $path, bayes db update ignored: $!\n";
    umask $umask; # reset umask
    return;
   }



Reply via email to