[spambayes-dev] Strange performance dipandDBRunRecoveryErrorretreat

Richie Hindle richie at entrian.com
Sun Jan 4 18:23:24 EST 2004


[Tony]
> BTW, what happens if the browser is closed in the middle of a train?  Does
> the onReview code still complete (and therefore save), or does it get
> interrupted?

The code will continue.  It will only find out that anything's wrong when
it tries to write to the browser... ah, wait a minute... Ooo!  Look at
this:

            self.write("Trained on %d message%s. " % (numTrained, plural))
            self._doSave()
            self.write("<br>&nbsp;")

If the browser's gone away, _doSave() will probably *not* get called.  And
I recall a problem with the UI hanging after the browser goes away, so
chances are the user will kill sb_server and restart it, with the database
unsaved.  (Hunt, hunt, hunt) yes - I've fixed that problem, but only
recently, after 1.0a7 went out.

It's late and I have to get up early in the morning (it's my wife's first
day back at work after her maternity leave, and little Jenny's first
proper day at nursery, so I need plenty of sleep before trying to face all
that!).  But as soon as I can I'll see whether I can reproduce the bug
using urllib/urllib2/timeoutsocket/whatever to simulate an impatient user
who sets off a train and then disconnects his browser.

Good thinking - I hope you've hit the nail on the head with this...

-- 
Richie Hindle
richie at entrian.com




More information about the spambayes-dev mailing list