I would have thought that simultaneous cross-JVM access to an index was
outside of scope of the core Lucene API (although it would be great), but
maybe the file system basis allows for this (?).

I like the idea of catching IOExceptions and returning false.  Conceptually,
failing to obtain a lock due to any reason can be thought of as the same
thing, regardless of the reason (so long as its logged).

Seems like the simplest solution too.

On 8/28/06, Yonik Seeley <[EMAIL PROTECTED]> wrote:

On 8/26/06, Jason Polites <[EMAIL PROTECTED]> wrote:
> Synchronization at this low level would ensure that outer application
layers
> would be guaranteed of IO isolation.

That still wouldn't solve two JVMs (or even two webapps) trying to
grab the same lock and getting an exception, correct?

It seems like it's possible to immediately get an IOException while
opening an IndexReader or IndexWriter w/o the wait/retry logic kicking
in.  So perhaps IOException should be caught by obtain() and false
returned (i.e. treated as a failure to aquire)?

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search
server

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


Reply via email to