SA Bugzilla – Bug 1732
sa-learn is not releasing bayes.lock
Last modified: 2003-04-05 02:57:01 UTC
running 'sa-learn --ham' or 'sa-learn --spam' does not delete the bayes.lock file when it terminates.
what version are you seeing this with? there was a bug in 2.51 which had this problem, but it was fixed in 2.52 per bug 1672.
I am running the CVS HEAD which was current at the time I raised the bug. I am using Perl 5.8.0.
Created attachment 859 [details] Output showing bug
The problem only seems to happen when '-no-rebuild' is specified
ok, so digging into this a little bit: if we do a rebuild, sync_journal() is called, and it always calls untie_db(), even if caller_will_untie is set (which it is). if we don't do a rebuild, we end up calling finish_learner, which calls finish, which checks caller_will_untie, and doesn't actually untie. so I removed the check from finish() since it is the sub we call when we want to finish with the learner and do an untie. I added the check to sync_journal and expire_old_tokens since they shouldn't untie if caller_will_untie is set. it fixed the problem for me, so closing the ticket. :)