Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 48075 invoked from network); 10 Nov 2010 20:13:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Nov 2010 20:13:23 -0000 Received: (qmail 24551 invoked by uid 500); 10 Nov 2010 20:13:42 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 24485 invoked by uid 500); 10 Nov 2010 20:13:42 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 24474 invoked by uid 99); 10 Nov 2010 20:13:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Nov 2010 20:13:42 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pulkitsinghal@gmail.com designates 74.125.83.48 as permitted sender) Received: from [74.125.83.48] (HELO mail-gw0-f48.google.com) (74.125.83.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Nov 2010 20:13:35 +0000 Received: by gwj15 with SMTP id 15so775936gwj.35 for ; Wed, 10 Nov 2010 12:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=4PcqxMJFbTg9F4XH9QRicvUo8hsVQOgxfdMdXQnwBXM=; b=l4Pf17lc1iMrq5snJNPiGkamBdjFYda3MB07M9mo9Hwzp1GFRG+IUIOqFyQKs1vzyI yV5bdzvNRH+sP5y2zSsE1VQm5pLz/BFZ6MU/kBHHHguA6jq3zVyLgaDzFM5RH83KuFQr 6hh72X2NhJHXvdH/8l45wdoHvuOx3kXu3BwXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BvV6iU7za9XN7+vnzkVv8kCj0NtrCHKN0xExBZzJcFDmb/Ta27LTV4mjRemQSJiMoA h5o38sd6gBEOQA17qHHcERmVxhrkD9kEyx04kzpz+jRHZppyPsclVFbt4HR1oec7vy1c alyHFjteXUSP16TtH7TP6Z2oY7wSHIzKLIJpg= MIME-Version: 1.0 Received: by 10.151.41.3 with SMTP id t3mr200805ybj.36.1289419994523; Wed, 10 Nov 2010 12:13:14 -0800 (PST) Received: by 10.150.147.1 with HTTP; Wed, 10 Nov 2010 12:13:14 -0800 (PST) In-Reply-To: <2D127F11DC79714E9B6A43AC9458147F805F1513@suex07-mbx-03.ad.syr.edu> References: <001201cb8100$c804ec20$580ec460$@thetaphi.de> <003801cb810f$2fc25ab0$8f471010$@thetaphi.de> <2D127F11DC79714E9B6A43AC9458147F805F1513@suex07-mbx-03.ad.syr.edu> Date: Wed, 10 Nov 2010 15:13:14 -0500 Message-ID: Subject: Re: IndexWriters and write locks From: Pulkit Singhal To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=00151750dd7abd6af00494b87c38 X-Virus-Checked: Checked by ClamAV on apache.org --00151750dd7abd6af00494b87c38 Content-Type: text/plain; charset=UTF-8 Ah exactly the kind of wake-up call that I was looking for! Thank You :) On Wed, Nov 10, 2010 at 3:01 PM, Steven A Rowe wrote: > NFS[1] != NTFS[2] > > [1] NFS: > [2] NTFS: > > > -----Original Message----- > > From: Pulkit Singhal [mailto:pulkitsinghal@gmail.com] > > Sent: Wednesday, November 10, 2010 2: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 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(FileChannelImpl.j > > ava > > > > :1176) > > > > at > > > > > > > > > > sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:10 > > 7 > > > > 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.(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 > > 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 > > > > > > > --00151750dd7abd6af00494b87c38--