lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Goetz <>
Subject Re: [Lucene-dev] Re: FW: Lucene 1.2 and directory write permissio ns?
Date Sat, 06 Oct 2001 01:07:58 GMT
> What if we make the location of the locks a property of the index iteslf 
> (meaning that it is stored in some file in the index directory)? If the 
> index is trully read-only (as in a CD-ROM), we don't need locks at all 
> and this property can be set to a special value indicating that index is 
> read-only or that no locking should be used. Would this be the same as 
> indicating that the index is process-safe?

I think having the lock be a proprty of the Directory interface makes
a whole lot more sense than using "lock files" as locks.  Trying to
use lock files not only pushes more error-recovery responsibility to
the indexing code, but also imposes semantic requirements on how
Directory implementations handle file operations.  Much more sensible
to make the Lock a distinguished property of the Directory interface
(like it has been) and let users elect which Directory to use (locking
FS-based, nonlocking FS-based, memory based, etc.)

View raw message