Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 95529 invoked from network); 2 Nov 2006 18:47:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Nov 2006 18:47:53 -0000 Received: (qmail 90280 invoked by uid 500); 2 Nov 2006 18:47:57 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 90218 invoked by uid 500); 2 Nov 2006 18:47:57 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 90188 invoked by uid 99); 2 Nov 2006 18:47:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 10:47:57 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 10:47:44 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 01CD97142BF for ; Thu, 2 Nov 2006 10:47:23 -0800 (PST) Message-ID: <20221992.1162493243004.JavaMail.root@brutus> Date: Thu, 2 Nov 2006 10:47:23 -0800 (PST) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-307) Lock obtain time out errors when opening readers and writers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/LUCENE-307?page=comments#action_12446688 ] Michael McCandless commented on LUCENE-307: ------------------------------------------- I think we can close this one? We now have locking implementation (*LockFactory) decoupled from directory implementation, so you can do in-JVM locking with an FSDirectory. We also have a native locking LockFactory implementation (LUCENE-678 ). I'm still surprised that native locking alone would prevent the starvation issue. If you try to open/close readers & writers too frequently against a single index there will inevitably be starvation. Lockless commits (LUCENE-701 ) can help somewhat in that you should not see IOExceptions anymore, but, it will still hit starvation by doing many retries before opening an index. In any event, I think these open rates are far beyond where Lucene would normally be used so I don't think we should spend time fixing starvation. > Lock obtain time out errors when opening readers and writers > ------------------------------------------------------------ > > Key: LUCENE-307 > URL: http://issues.apache.org/jira/browse/LUCENE-307 > Project: Lucene - Java > Issue Type: Bug > Components: Other > Affects Versions: 1.4 > Environment: Operating System: All > Platform: All > Reporter: Reece (YT) > Assigned To: Lucene Developers > Attachments: FSLock.java, TestLuceneLocks.java > > > The attached Java file shows a locking issue that occurs with Lucene 1.4.2. > One thread opens and closes an IndexReader. The other thread opens an > IndexWriter, adds a document and then closes the IndexWriter. I would expect > that this app should be able to happily run without an issues. > It fails with: > java.io.IOException: Lock obtain timed out > Is this expected? I thought a Reader could be opened while a Writer is adding a > document. > I am able to get the error in less than 5 minutes when running this on Windows > XP and Mac OS X. > Any help is appreciated. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org