TDB lockall necessary?

Matthias Andree matthias.andree at gmx.de
Wed Sep 17 22:52:31 CEST 2003


Gyepi Sam <gyepi at praxis-sw.com> writes:

> We need tdb_lockall to ensure that word and message counts are updated
> as part of a transaction, to prevent concurrent bogofilters from
> updating or reading incorrect counts.

Good point that I didn't consider.

> I know it is a performance hog, and had initially used file descriptor
> locking, but that did not work as expected (I forget why, but recall
> that some tests failed.  cvs diff -r 1.1.2.2 -r 1.1.2.3
> datastore_tdb.c). I was less interested in speed than correctness at
> the time, so I switched to tdb_lockall. You may want to review those
> revisions to be sure I did not overlook something simple.

Well, updating everything at once is a valid point that I didn't take
into account, I just looked at the "concurrent writer" issue.



-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95




More information about the bogofilter-dev mailing list