Re: switch to native locks by default?

2007-01-15 Thread Michael McCandless

Chris Hostetter wrote:

: Ah, I hadn't realized that they might not be supported everywhere... I

I'm just trusting the javadoc for NativeFSLockFactory ... i have no idea
if it's accurate or not.


Hi!  I had added the caveat about native locks based on my dicey
experience getting them working over NFS (NFS locking was not "turned
on" by default in my setup; and, frustratingly, it would take ~35
seconds for a timeout to tell me this).

I don't have any specific evidence that other OS/filesystems are
problematic but then again I haven't done much research to understand
overall portability of Java's native lock interface.  It would not
surprise me if other OS/filesystems had issues.

I was hoping by getting the NativeFSLockFactory out there that it
would get some healthy testing first and then we could use that
feedback to decide whether benefits outweigh the risks of making it
the default.  It's not clear how many people have actually tested it
at this point, though!


: The current locking can also guard against mistakes though (multiple
: instances of Solr trying to write to the same dir, someone opening a
: Luke index on it, etc).

right ... but it's only useful if all of the potential clients are using
the same locking mechanism ... right now it's only safe to do any of those
things if all the apps use SimpleFSLockFactory.  all the more reason to
make the factory and the lockDir configurable in Solr i guess.


Mike


Re: switch to native locks by default?

2007-01-14 Thread Chris Hostetter

: Ah, I hadn't realized that they might not be supported everywhere... I

I'm just trusting the javadoc for NativeFSLockFactory ... i have no idea
if it's accurate or not.

: The current locking can also guard against mistakes though (multiple
: instances of Solr trying to write to the same dir, someone opening a
: Luke index on it, etc).

right ... but it's only useful if all of the potential clients are using
the same locking mechanism ... right now it's only safe to do any of those
things if all the apps use SimpleFSLockFactory.  all the more reason to
make the factory and the lockDir configurable in Solr i guess.


-Hoss



Re: switch to native locks by default?

2007-01-14 Thread Yonik Seeley

On 1/14/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:

: Any reason we shouldn't switch to native locks by default?
: In the future, read-only readers won't lock at all, but there will
: still be a write lock for writers.

just to clarify for people who may not be familiar (i had to go reread the
LockFactory docs to remember) Native Locks may not be supported on all
OSes, but have the perk of being cleaned up automatically in the event of
a JVM crash.


Ah, I hadn't realized that they might not be supported everywhere... I
thought I saw some comments about switching Lucene to use that by
default.


Are you thinking we would add a new solrconfig.xml option to control this
and default it to native locks?


Not a bad idea...


this is the first time i've noticed the SingleInstanceLockFactory ... in
most cases couldn't we use that for Solr?  I imagine we'll always need to
support lock files if we wanted to make sure we can do some of hte "can i
point Solr and an index created by _" use cases people have been
asking about lately, ... but for the "normal" usage of Solr, isn't that
good enough?


The current locking can also guard against mistakes though (multiple
instances of Solr trying to write to the same dir, someone opening a
Luke index on it, etc).

-Yonik


Re: switch to native locks by default?

2007-01-14 Thread Chris Hostetter

: Any reason we shouldn't switch to native locks by default?
: In the future, read-only readers won't lock at all, but there will
: still be a write lock for writers.

just to clarify for people who may not be familiar (i had to go reread the
LockFactory docs to remember) Native Locks may not be supported on all
OSes, but have the perk of being cleaned up automatically in the event of
a JVM crash.

Are you thinking we would add a new solrconfig.xml option to control this
and default it to native locks?

this is the first time i've noticed the SingleInstanceLockFactory ... in
most cases couldn't we use that for Solr?  I imagine we'll always need to
support lock files if we wanted to make sure we can do some of hte "can i
point Solr and an index created by _" use cases people have been
asking about lately, ... but for the "normal" usage of Solr, isn't that
good enough?



-Hoss



switch to native locks by default?

2007-01-12 Thread Yonik Seeley

Any reason we shouldn't switch to native locks by default?
In the future, read-only readers won't lock at all, but there will
still be a write lock for writers.

-Yonik