lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Supun Edirisinghe <su...@office.vtourist.com>
Subject Re: commit.lock file
Date Wed, 11 Feb 2004 21:40:27 GMT
thanks otis

you are right. Is there a way the thread using isLock and unlock know
how old the lock is?

my assumption is that if it is older than a couple seconds it is from
something dying or some branch where something is uncaught.

I guess I can try looking at the timestamp of the commit.lock file using
IO. I'm worried that that read of the lock file will be many times the
time
searching. I guess I won't know until I test and that time will only
come in cases where the lock is set. I didn't see any methods in the API
for 
finding the age of the lock. am I wrong?

thanks again


On Wed, 2004-02-11 at 03:33, Otis Gospodnetic wrote:
> If there are commit.lock files being left over, you should really
> investigate why that is happening.  Something is probaly dying, and you
> are not catching it and cleaning up by closing things like IndexReader
> or IndexWriter.
> If you want to forcefully unlock the index, use isLocked and unlock
> methods in IndexWriter.  Not recommended, though.
> 
> Otis
> 
> 
> --- Supun Edirisinghe <supun@office.vtourist.com> wrote:
> > Hi everybody, I'm new to the mail list.
> > 
> > I'm also new to using Lucene.
> > 
> > We use lucene to index some of our pages.
> > 
> > sometimes (for a reason unknown to us) a commit.lock file is left and
> > 
> > searches using the index  don't work.
> > 
> > what are some of the causes for this commit.lock file to persist.
> > 
> > I've read in the faq that it is written so that access to the
> > segments 
> > is synchronized correctly.
> > 
> > What are some good strategies to make make this file go away? Would
> > it 
> > be a good idea to assign a  program to  just check the timestamp on 
> > that file and just delete it if it has been there for a long time?
> > 
> > all comments are welcome.
> > 
> > thanks
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


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


Mime
View raw message