I wrote:
I'd be cool with making it impossible to put an index on an NFS volume prior to version 4.

Elaborating and clarifying...

IndexReader attempts to establish a read lock on the relevant segments_N file. It doesn't bother to see whether the locking attempt succeeds, though.

IndexFileDeleter, before deleting any files, always touches a test file, attempts to lock it, and verifies that the lock succeeds. If the locking test fails, it throws an exception rather than proceed.

In addition, the locking test is run at index creation time, so that the user knows as soon as possible that their index is in a problematic location.

I think the only way this would fail under NFS is if the client machine with the reader is using NFS version 3, while the machine with the writer is using version 4. But before this issue arose I didn't have that much experience with the intricacies of NFS, so I could be off-base.

This does bring back the permissions issue with IndexReader. A search app may not have permission to establish a read lock on a file within the index directory, and in that case, an IndexFileDeleter could delete files out from under it.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to