lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: IndexWriters and write locks
Date Wed, 10 Nov 2010 20:02:44 GMT
Windows does not use NFS natively, it’s a network file system for UNIX O/S. 

But can you confirm that you are working on a local filesystem even on windows (NTFS?). Not
something like samba shares?

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Pulkit Singhal [mailto:pulkitsinghal@gmail.com]
> Sent: Wednesday, November 10, 2010 8:55 PM
> To: java-user@lucene.apache.org
> Subject: Re: IndexWriters and write locks
> 
> You know that really confuses me. I've heard that stated a few times and every
> time I just felt that it couldn't possibly be right. Maybe it was meant in some
> very specific manner because otherwise aren't all Windows OSs off-limits to
> Lucene then?
> 
> On Wed, Nov 10, 2010 at 2:40 PM, Uwe Schindler <uwe@thetaphi.de> wrote:
> 
> > Are you using NFS as filesystem? NFS is incompatible to lucene :-)
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> >
> > > -----Original Message-----
> > > From: Pulkit Singhal [mailto:pulkitsinghal@gmail.com]
> > > Sent: Wednesday, November 10, 2010 7:57 PM
> > > To: java-user@lucene.apache.org
> > > Subject: Re: IndexWriters and write locks
> > >
> > > Thanks Uwe, that helps explain why the lock file is still there.
> > >
> > > The last piece of the puzzle is why someone may see exceptions such
> > > as
> > the
> > > following from time to time:
> > >
> > > java.nio.channels.OverlappingFileLockException
> > >     at
> > >
> > sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelIm
> > pl.java
> > > :1176)
> > >     at
> > >
> > sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.jav
> > a:107
> > > 8)
> > >     at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:878)
> > >     at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
> > >     at
> > > org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:236)
> > >     at org.apache.lucene.store.Lock.obtain(Lock.java:72)
> > >     at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1041)
> > >     at
> > > org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:864)
> > >
> > > I suppose this means that the OS itself hasn't released the lock
> > > even
> > after I shut
> > > down my application server and restarted it.
> > > Am I right?
> > >
> > > Or is there something else that can possibly be the culprit (in
> > > anyone's
> > > experience) that I can investigate?
> > >
> > > - Pulkit
> > >
> > > On Wed, Nov 10, 2010 at 12:57 PM, Uwe Schindler <uwe@thetaphi.de>
> wrote:
> > >
> > > > This is because Lucene uses Native Filesystem Locks. The lock file
> > > > itself is just a placeholder which is not cleaned up on Ctrl-C.
> > > > The lock is not the file itself, its *on* the file.
> > > >
> > > > -----
> > > > Uwe Schindler
> > > > H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de
> > > > eMail: uwe@thetaphi.de
> > > >
> > > > > -----Original Message-----
> > > > > From: Pulkit Singhal [mailto:pulkitsinghal@gmail.com]
> > > > > Sent: Wednesday, November 10, 2010 3:38 PM
> > > > > To: java-user@lucene.apache.org
> > > > > Subject: IndexWriters and write locks
> > > > >
> > > > > Hello,
> > > > >
> > > > > 1) On Windows, I often shut down my application server (which
> > > > > has active IndexWriters open) using the ctrl+c keys.
> > > > > 2) I inspect my directories on the file system I see that the
> > > > > write.lock
> > > > file is still
> > > > > there.
> > > > > 3) I start the app server again, and do some operations that
> > > > > would
> > > > require
> > > > > IndexWriters to write to the same directories again and it works!
> > > > >
> > > > > I don't understand why I do not run into any exceptions?
> > > > > I mean there is already a lock file present which should prevent
> > > > > the IndexWriters from getting access to the directories ... no?
> > > > > I should be happy but I'm not because other folks are able to
> > > > > get
> > > > exceptions
> > > > > when they bounce their servers an I'm unable to reproduce the
> > > > > problem and
> > > > I
> > > > > can't help them.
> > > > >
> > > > > Any clues? Anyone?
> > > > >
> > > > > Thank You,
> > > > > - Pulkit
> > > >
> > > >
> > > > ------------------------------------------------------------------
> > > > --- To unsubscribe, e-mail:
> > > > java-user-unsubscribe@lucene.apache.org
> > > > For additional commands, e-mail: java-user-help@lucene.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >


---------------------------------------------------------------------
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