lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Locks and Readers and Writers
Date Sat, 06 Nov 2004 00:35:26 GMT
Ok, I simplified my test case a little...  I removed the UNC share which is
a remote file share that Windows supports.

I have two processes running
on the same Windows XP machine.
1) The first process uses an IndexWriter
to writes to the index and then closes the IndexWriter.  
2) The first process
sends a multicast event to the other process.
3) The other process opens
an IndexReader.
4) Meanwhile, the first process tries to open the index again
to do a write.
5) Often the IndexWriter gets an error: Lock obtain timed

Any advice?  Is this only a problem on Windows?

Here's the stack
trace: Lock obtain timed out: Lock@C:\WINDOWS\TEMP\lucene-9906f192fb41cc8775cf839213997b7e-commit.lock


	at org.apache.lucene.index.IndexWriter.mergeSegments(

	at org.apache.lucene.index.IndexWriter.maybeMergeSegments(

	at org.apache.lucene.index.IndexWriter.addDocument(

--- Lucene Users List" < wrote:
> > Hi Christoph,
> > 
> > Thats what I thought.  But what I'm
seeing is this:
> > - open
> > reader for searching
> > (the reader is
opening an index on a remote machine
> > (via UNC) which takes a couple seconds)

> > - meanwhile the other service opens
> > an IndexWriter and adds a document

> > (the index writer determines that it needs
> > to merge so it tries
to get a lock.  since the reader is still opening, the
> > IO exception is
> > 
> > I believe that increasing the merge factor will
> > reduce
the opportunity for this to occur.  But it will still occur at some
> > point.

> > 
> I'm not sure what you mean by `opening an index on a remote machine
> UNC)' but have you made sure that lock files are put in the same
> for both processes (see the mailing list archive for details)?

> Also note, that lucene's locking is known not to work on NFS (also see
> list archive). I don't know if it works on SMB mounts.
> Morus

> ---------------------------------------------------------------------

> To unsubscribe, e-mail:
> For
additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message