> 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.) _______________________________________________ Lucene-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/lucene-dev
