lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Multi process writer access to an index
Date Wed, 19 Mar 2008 14:08:54 GMT

Are you using multiple computers?

Probably what's happening is: because older versions of Lucene store  
the lock file in the /tmp directory by default, multiple computers  
sharing an index will be able to open multiple writers because they  
have their own /tmp directories.  They don't see each other's lock.

Newer versions of Lucene store the write lock in the directory  
itself, which resolves this.  You can also change the lock directory  
to a shared mount point.

But ... are you using NFS?

Mike

Eran Sevi wrote:
> Hi,
>
> I'm trying to write to a specific index from several different  
> processes and
> encounter problems with locked files (deletable for example).
> I don't perform any specific locking because as I understand it  
> there should
> be file-specific locking mechanism used by lucene API. This doesn't  
> seem to
> be working as I am able to instantiate an IndexWriter on the same  
> index
> simultaneously, but I encounter problems when I try to close/ 
> optimize it .
>
> Please help me understand if lucene doesn't support this kind of  
> access, and
> what's the proper way to write to the same index from two or more  
> different
> processes/computers.
>
> Thanks,
> Eran.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message