[cvs] bogofilter datastore_db.c,1.23,1.24
matthias.andree at gmx.de
Sun Nov 17 05:34:27 EST 2002
Gyepi SAM <gyepi at praxis-sw.com> writes:
> No. The files are mmaped with the 'PRIVATE' flag, which means that any
> changes to the underlying file will not be seen in the mmaped version,
> which means that a writer will acquire the lock and make changes, but
> those changes will not affect the reader until it closes and reopens
> the database.
> I do, however, see a possible problem with a reader that opens the
> database while a writer is making changes:It may get inconsistent
> I think the correct solution to this locking stuff is not to lock the
> database file itself but rather to create lock files separate from the
> database files.
> This would also re-simplify the locking stuff.
Aren't the concurrent and transactional modes of DB designed to handle
all that without us mocking around with locking ourselves? Still
wondering why we go these lengths.
More information about the Bogofilter-dev