On Jan 18, 2007, at 2:17 PM, Michael McCandless wrote:
How about if each reader were assigned a unique ID (eg hostname) by the application, and wrote a file ($ID.inuse or something) into the index dir referencing the segments_N that it's currently using?
It would have to go in the old /tmp lock dir to deal with the permissions issue.
I really prefer to have locking managed via the index dir rather than a shared dir within /tmp.
Without that, multiple machines attempting to write to an index on a shared volume don't know about each other unless you specifically manage the locking mechanism -- and thus may corrupt an index.
Plus, it's simpler and better for all the reasons outlined a couple weeks ago.
This wouldn't require locking (which scares me on NFS)
Well, the thing about the scheme using file locking is that it tests the locking mechanism once per Directory per session before executing any delete ops. There's a cost for doing this, but I don't think it's significant in the grand scheme.
The touching mechanism scares me. :) It's hard to guarantee that it will always occur in a timely manner.
Marvin Humphrey Rectangular Research http://www.rectangular.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
