[Spambayes] Error from pop3proxy
tim.one at comcast.net
Tue Sep 30 20:41:23 EDT 2003
> For the spambayes-dev folks: If we're not properly mediating access
> to the on-disk version of the DBDictClassifier, we're probably not
> mediating access to the in-memory PickledClassifier either. Maybe
> all we need to do is add a little bit of locking to the Classifier
> class or its subclasses.
We don't do any locking in storage.py, mainly because that wasn't intended
to be thread-safe. Before trying to make it thread-safe, someone has to
identify the specific use cases in which the API has to support concurrent
access. I really don't know what they may be, and low-level locking can be
very expensive. If it amounts to no more than making training mutually
exclusive with scoring, then some gross locks at a higher level would be a
lot cheaper. But, so far, nobody has identified a specific sequence of
actions leading to DBRunRecoveryError.
I'll speculate about one possible problem with Berkeley: if it isn't shut
down cleanly, DBRunRecoveryError may well be an *expected* exception when
you next start it, and running recovery at such times would then be a normal
part of using Berkeley. Until we know what's triggering DBRunRecoveryError,
I'm just as inclined to believe it can't be fixed without incorporating
recovery as I am to believe it's due to a thread race.
More information about the Spambayes