Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8AD3371A6 for ; Tue, 13 Dec 2011 18:37:01 +0000 (UTC) Received: (qmail 88726 invoked by uid 500); 13 Dec 2011 18:36:58 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 88653 invoked by uid 500); 13 Dec 2011 18:36:58 -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 88645 invoked by uid 99); 13 Dec 2011 18:36:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 18:36:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.wechner@wyona.com designates 195.226.6.75 as permitted sender) Received: from [195.226.6.75] (HELO mail.wyona.com) (195.226.6.75) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 18:36:50 +0000 Received: from new-host-2.home (191-138.104-92.cust.bluewin.ch [92.104.138.191]) by mail.wyona.com (Postfix) with ESMTPA id 9DD1F2DA077 for ; Tue, 13 Dec 2011 19:38:28 +0100 (CET) Message-ID: <4EE79B27.1010507@wyona.com> Date: Tue, 13 Dec 2011 19:36:23 +0100 From: Michael Wechner User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: How to use setWriteLockTimeout(long) when write.lock already exists Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi According to http://www.gossamer-threads.com/lists/lucene/java-dev/37421 one cannot overwrite the default write lock timeout of 1000ms once a write.lock already exists (for example inside a multi-threaded web-application), because in order to use the method setWriteLockTimeout(long) one would have to first create an instance of IndexWriter, but because write.lock already exists the creation will throw a LockObtainFailedException and hence once does not get an instance. In the link above "Mike" is mentioned that he will create a Jira issue, but it's not clear to me if it ever got created and/or that somebody tried to improve this. Any idea? Just as a suggestions, but I think it would be nice if one could create an IndexWriter instance without actually opening the index in the first place, but rather something like: IndexWriter iWriter = new IndexWriter(); iWriter.setDirectory(...); iWriter.setAnalyzer(....); iWriter.setWriteLockTimeout(75); iWriter.open(); // or iWriter.checkout(); // do something with the index.... iWriter.close(); WDYT? Thanks Michael --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org