From java-commits-kaitlin41@example.org Thu May 01 10:35:14 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 40705 invoked from network); 1 May 2008 10:35:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2008 10:35:14 -0000 Received: (qmail 53255 invoked by uid 500); 1 May 2008 10:35:16 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 53232 invoked by uid 500); 1 May 2008 10:35:15 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 53221 invoked by uid 99); 1 May 2008 10:35:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 03:35:15 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 10:34:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 40E4923889FF; Thu, 1 May 2008 03:34:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r652471 - /lucene/java/trunk/contrib/highlighter/build.xml Date: Thu, 01 May 2008 10:34:51 -0000 To: kaitlin41@example.org From: kaitlin41@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <kaitlin41@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gsingers Date: Thu May 1 03:34:50 2008 New Revision: 652471 URL: http://svn.apache.org/viewvc?rev=652471&view=rev Log: LUCENE-1276: Fixed contrib highlighter build Modified: lucene/java/trunk/contrib/highlighter/build.xml Modified: lucene/java/trunk/contrib/highlighter/build.xml URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/highlighter/build.xml?rev=652471&r1=652470&r2=652471&view=diff ============================================================================== --- lucene/java/trunk/contrib/highlighter/build.xml (original) +++ lucene/java/trunk/contrib/highlighter/build.xml Thu May 1 03:34:50 2008 @@ -1,6 +1,23 @@ <?xml version="1.0"?> -<project name="highlighter" default="buildHighlighter"> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<project name="highlighter" default="default"> <description> Hits highlighter @@ -8,7 +25,7 @@ <import file="../contrib-build.xml"/> - <property name="memory.jar" location="../../build/contrib/memory/lucene-memory-${version}.jar"/> + <property name="memory.jar" location="${common.dir}/build/contrib/memory/lucene-memory-${version}.jar"/> <path id="classpath"> <pathelement path="${lucene.jar}"/> @@ -17,11 +34,13 @@ </path> - <target name="buildHighlighter" depends="buildMemory,default" /> - - <target name="buildMemory" > - <echo>Highlighter building dependency ${memory.jar}</echo> - <ant antfile="../memory/build.xml" target="default" inheritall="false"/> + <target name="buildHighlighter" depends="build-memory,default" /> + <available property="memory.jar.present" type="file" file="${memory.jar}"/> + <target name="compile-core" depends="build-memory, common.compile-core" /> + + <target name="build-memory" unless="memory.jar.present"> + <echo>Highlighter building dependency ${memory.jar}</echo> + <ant antfile="../memory/build.xml" target="default" inheritall="false"/> </target> From java-commits-kaitlin41@example.org Thu May 01 16:51:17 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 38607 invoked from network); 1 May 2008 16:51:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2008 16:51:17 -0000 Received: (qmail 17354 invoked by uid 500); 1 May 2008 16:51:19 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 17328 invoked by uid 500); 1 May 2008 16:51:19 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 17317 invoked by uid 99); 1 May 2008 16:51:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 09:51:19 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eos.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 16:50:22 +0000 Received: from eos.apache.org (localhost [83.161.120.155]) by eos.apache.org (Postfix) with ESMTP id A33F7D2EC for <kaitlin41@example.org>; Thu, 1 May 2008 16:50:43 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <kaitlin41@example.org> To: kaitlin41@example.org Date: Thu, 01 May 2008 16:50:43 -0000 Message-ID: <kaitlin41@example.org> Subject: [Lucene-java Wiki] Update of "Support" by OtisGospodnetic X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification. The following page has been changed by OtisGospodnetic: http://wiki.apache.org/lucene-java/Support The comment on the change is: Self removal ------------------------------------------------------------------------------ * Scott Ganyo <kaitlin41@example.org> * Greg Gershman <kaitlin41@example.org> http://gregword.com/about * Christoph Goller <kaitlin41@example.org> - * Otis Gospodnetic <kaitlin41@example.org> * William Grosso <kaitlin41@example.org> * Tom Hill <kaitlin41@example.org> * I''''''ntraFind Software AG http://www.intrafind.de/ From java-commits-kaitlin41@example.org Thu May 01 18:59:30 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 5154 invoked from network); 1 May 2008 18:59:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2008 18:59:30 -0000 Received: (qmail 73118 invoked by uid 500); 1 May 2008 18:59:31 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 73101 invoked by uid 500); 1 May 2008 18:59:31 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 73090 invoked by uid 99); 1 May 2008 18:59:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 11:59:31 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 18:58:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 23C9B23889FE; Thu, 1 May 2008 11:59:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r652625 - /lucene/java/trunk/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java Date: Thu, 01 May 2008 18:59:06 -0000 To: kaitlin41@example.org From: kaitlin41@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <kaitlin41@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buschmi Date: Thu May 1 11:59:06 2008 New Revision: 652625 URL: http://svn.apache.org/viewvc?rev=652625&view=rev Log: LUCENE-1277: Remove println in highlighter Modified: lucene/java/trunk/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java Modified: lucene/java/trunk/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java?rev=652625&r1=652624&r2=652625&view=diff ============================================================================== --- lucene/java/trunk/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java (original) +++ lucene/java/trunk/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java Thu May 1 11:59:06 2008 @@ -199,10 +199,7 @@ } finally { fir.close(); } - } else { - // NO-OP - System.out.println("found none"); - } + } } /** From java-commits-kaitlin41@example.org Thu May 01 19:07:23 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 7630 invoked from network); 1 May 2008 19:07:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2008 19:07:23 -0000 Received: (qmail 82479 invoked by uid 500); 1 May 2008 19:07:25 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 82455 invoked by uid 500); 1 May 2008 19:07:25 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 82444 invoked by uid 99); 1 May 2008 19:07:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 12:07:25 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,OBSCURED_EMAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 19:06:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7097A23889FE; Thu, 1 May 2008 12:06:59 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r652628 - in /lucene/java/branches/lucene_2_3: ./ docs/ docs/lucene-sandbox/ src/site/src/documentation/content/xdocs/ Date: Thu, 01 May 2008 19:06:57 -0000 To: kaitlin41@example.org From: kaitlin41@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <kaitlin41@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buschmi Date: Thu May 1 12:06:56 2008 New Revision: 652628 URL: http://svn.apache.org/viewvc?rev=652628&view=rev Log: Prepare 2.3.2 release: - set tentative release date to 05/05/08 in CHANGES.txt - update doap.rdf - update docs Modified: lucene/java/branches/lucene_2_3/CHANGES.txt lucene/java/branches/lucene_2_3/docs/benchmarks.html lucene/java/branches/lucene_2_3/docs/contributions.html lucene/java/branches/lucene_2_3/docs/demo.html lucene/java/branches/lucene_2_3/docs/demo2.html lucene/java/branches/lucene_2_3/docs/demo3.html lucene/java/branches/lucene_2_3/docs/demo4.html lucene/java/branches/lucene_2_3/docs/doap.rdf lucene/java/branches/lucene_2_3/docs/fileformats.html lucene/java/branches/lucene_2_3/docs/gettingstarted.html lucene/java/branches/lucene_2_3/docs/index.html lucene/java/branches/lucene_2_3/docs/index.pdf lucene/java/branches/lucene_2_3/docs/linkmap.html lucene/java/branches/lucene_2_3/docs/lucene-sandbox/index.html lucene/java/branches/lucene_2_3/docs/queryparsersyntax.html lucene/java/branches/lucene_2_3/docs/scoring.html lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/index.xml lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/tabs.xml Modified: lucene/java/branches/lucene_2_3/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/CHANGES.txt?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/CHANGES.txt (original) +++ lucene/java/branches/lucene_2_3/CHANGES.txt Thu May 1 12:06:56 2008 @@ -1,6 +1,8 @@ Lucene Change Log $Id$ +======================= Release 2.3.2 2008-05-05 ======================= + Bug fixes 1. LUCENE-1191: On hitting OutOfMemoryError in any index-modifying Modified: lucene/java/branches/lucene_2_3/docs/benchmarks.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/benchmarks.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/benchmarks.html (original) +++ lucene/java/branches/lucene_2_3/docs/benchmarks.html Thu May 1 12:06:56 2008 @@ -68,7 +68,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/contributions.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/contributions.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/contributions.html (original) +++ lucene/java/branches/lucene_2_3/docs/contributions.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/demo.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/demo.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/demo.html (original) +++ lucene/java/branches/lucene_2_3/docs/demo.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/demo2.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/demo2.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/demo2.html (original) +++ lucene/java/branches/lucene_2_3/docs/demo2.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/demo3.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/demo3.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/demo3.html (original) +++ lucene/java/branches/lucene_2_3/docs/demo3.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/demo4.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/demo4.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/demo4.html (original) +++ lucene/java/branches/lucene_2_3/docs/demo4.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/doap.rdf URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/doap.rdf?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/doap.rdf (original) +++ lucene/java/branches/lucene_2_3/docs/doap.rdf Thu May 1 12:06:56 2008 @@ -28,6 +28,11 @@ <category rdf:resource="http://projects.apache.org/category/database" /> <release> <Version> + <name>Lucene 2.3.2</name> + <created>2008-05-05</created> + <revision>2.3.1</revision> + </Version> + <Version> <name>Lucene 2.3.1</name> <created>2008-02-22</created> <revision>2.3.1</revision> Modified: lucene/java/branches/lucene_2_3/docs/fileformats.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/fileformats.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/fileformats.html (original) +++ lucene/java/branches/lucene_2_3/docs/fileformats.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/gettingstarted.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/gettingstarted.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/gettingstarted.html (original) +++ lucene/java/branches/lucene_2_3/docs/gettingstarted.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/index.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/index.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/index.html (original) +++ lucene/java/branches/lucene_2_3/docs/index.html Thu May 1 12:06:56 2008 @@ -68,7 +68,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ @@ -230,7 +230,7 @@ <h1>Lucene Java Documentation</h1> <p> - This is the official documentation for Lucene Java 2.3.1 <BR> + This is the official documentation for Lucene Java 2.3.2 <BR> Please use the menu on the left to access the Javadocs and different documents. </p> Modified: lucene/java/branches/lucene_2_3/docs/index.pdf URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/index.pdf?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/index.pdf (original) +++ lucene/java/branches/lucene_2_3/docs/index.pdf Thu May 1 12:06:56 2008 @@ -8,7 +8,7 @@ << /Length 456 /Filter [ /ASCII85Decode /FlateDecode ] >> stream -Gasak9iHZu&A@Zcp=LFF+XGDU>IB6H#9B6&TH5:&,pO_$%it\`!G&KpG/iJ@D`?ADp@5S*E4LmWEC(i!!UX5s5iE9-5i!*j]!')COsjX&HA&38D3q4o/`D:-/(\"ljbNKlg1K/<<NU(sXd8GXl/#8C#h_a'Rk'YT`0?=(e&!s?*78sGpq&,B#?GW()-Qf.5,Xpng=@<id3G5NO,/pSKHB!88iGmPLVZZCU[=/MlHHM2kn^\nO"YQ-@SZ^ZL!2=&S9(@TmWM':=lm^7UU@+m+28h2aIg[=,&C`FjLON'r.i,`(HG'aPclBrC!O9ZB\prYj<b>mLV+'g6CO!(!$BK`_?A?qFDr=<qj]FnT5qMP#o>"eTb(`T$Wone,i^4Qp@M@S6dbaL4u3ds`$gU.8dgmJbt2La5?Q`jar49'[]Au8&;%'MV$@*HK<T)irLn8=qD[kMf.I~> +Gasak9iHZu&A@Zcp=LFF+XGDU>IB6H#9B6&TH5:&,pO_$%it\`!G&KpG/iJ@D`?ADp@5S*E4LmWEC(i!!UX5s5iE9-5i!*j]!')COsjX&HA&38D3q4o/`D:-/(\"ljbNKlg1K/<<NU(sXd8GXl/#8C#h_a'Rk'YT`0?=(e&!s?*78sGpq&,B#?GW()-Qf.5,Xpng=@<id3G5NO,/pS0G!VE,o^s9_dFh2d<8&aFllf*FGj>ra-X=Q0dhA>6=uX#c8j6eG<;S.XE%j,d9>)GO5CF)jA0CU[\&pGH#@pMs'[V\78B!pj_K]`RWE@/RQ!#/\OhGJ+`E!rO<u4b^kZuq0EJQ_*S^nS5,ZWtVjsnl_?Gg2-j3\n!nIqqagfHX4aklC:p`EVcV0!50hPr:dK4!+F-7E\%p$03Z888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4+MmAbOfKV3*ll+t0k+KQJ]J#F?hrXJDHf.R~> endstream endobj 6 0 obj Modified: lucene/java/branches/lucene_2_3/docs/linkmap.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/linkmap.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/linkmap.html (original) +++ lucene/java/branches/lucene_2_3/docs/linkmap.html Thu May 1 12:06:56 2008 @@ -68,7 +68,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/lucene-sandbox/index.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/lucene-sandbox/index.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/lucene-sandbox/index.html (original) +++ lucene/java/branches/lucene_2_3/docs/lucene-sandbox/index.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="../index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="../index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/queryparsersyntax.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/queryparsersyntax.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/queryparsersyntax.html (original) +++ lucene/java/branches/lucene_2_3/docs/queryparsersyntax.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/docs/scoring.html URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/docs/scoring.html?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/docs/scoring.html (original) +++ lucene/java/branches/lucene_2_3/docs/scoring.html Thu May 1 12:06:56 2008 @@ -70,7 +70,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li class="current"> -<a class="selected" href="index.html">Lucene 2.3.1 Documentation</a> +<a class="selected" href="index.html">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ Modified: lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/index.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/index.xml?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/index.xml (original) +++ lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/index.xml Thu May 1 12:06:56 2008 @@ -6,7 +6,7 @@ <body> <p> - This is the official documentation for Lucene Java 2.3.1 <BR/> + This is the official documentation for Lucene Java 2.3.2 <BR/> Please use the menu on the left to access the Javadocs and different documents. </p> <p> Modified: lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/tabs.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/tabs.xml?rev=652628&r1=652627&r2=652628&view=diff ============================================================================== --- lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/tabs.xml (original) +++ lucene/java/branches/lucene_2_3/src/site/src/documentation/content/xdocs/tabs.xml Thu May 1 12:06:56 2008 @@ -39,7 +39,7 @@ <tab id="" label="Main" href="http://lucene.apache.org/java/docs/"/> <tab id="wiki" label="Wiki" href="http://wiki.apache.org/lucene-java"/> - <tab label="Lucene 2.3.1 Documentation" dir=""/> + <tab label="Lucene 2.3.2 Documentation" dir=""/> <!-- <tab id="samples" label="Samples" dir="samples" indexfile="sample.html"> From java-commits-kaitlin41@example.org Tue May 06 01:07:02 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 5190 invoked from network); 6 May 2008 01:07:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 May 2008 01:07:01 -0000 Received: (qmail 13930 invoked by uid 500); 6 May 2008 01:07:03 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 13903 invoked by uid 500); 6 May 2008 01:07:03 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 13892 invoked by uid 99); 6 May 2008 01:07:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2008 18:07:03 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eos.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 01:06:15 +0000 Received: from eos.apache.org (localhost [83.161.120.155]) by eos.apache.org (Postfix) with ESMTP id DACA3D2F9 for <kaitlin41@example.org>; Tue, 6 May 2008 01:06:29 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Apache Wiki <kaitlin41@example.org> To: kaitlin41@example.org Date: Tue, 06 May 2008 01:06:29 -0000 Message-ID: <kaitlin41@example.org> Subject: [Lucene-java Wiki] Update of "PoweredBy" by JonathanKatzman X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification. The following page has been changed by JonathanKatzman: http://wiki.apache.org/lucene-java/PoweredBy The comment on the change is: Xoopit ------------------------------------------------------------------------------ * [http://www.ufnasoft.com Ufnasoft-DMS] - Java based Document Management System * [http://www.arcetis.com/#Solutions_voilasvn VoilàSVN by Arcetis] - Subversion search engine * [http://www.vyre.com VYRE] - Content management system + * [http://www.xoopit.com/ Xoopit] - Find and share the pictures, videos, and files buried in your inbox. Currently for Gmail. * [http://www.zilverline.org/ Zilverline] - personal/intranet search engine as a complete web application with support for Word, PDF, HTML, Excel, Powerpoint, Text, Java, ZIP, CHM, RAR and more. * [http://www.zefaimages.com zefaimages] - stock images search engine * [http://www.zoomf.com/ zoomf property search] - Property search engine From java-commits-kaitlin41@example.org Tue May 06 04:39:17 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 75638 invoked from network); 6 May 2008 04:39:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 May 2008 04:39:17 -0000 Received: (qmail 31832 invoked by uid 500); 6 May 2008 04:39:19 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 31814 invoked by uid 500); 6 May 2008 04:39:19 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 31803 invoked by uid 99); 6 May 2008 04:39:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2008 21:39:18 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 04:38:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6F5802388A27; Mon, 5 May 2008 21:38:56 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r653677 - /lucene/java/tags/lucene_2_3_2/ Date: Tue, 06 May 2008 04:38:56 -0000 To: kaitlin41@example.org From: kaitlin41@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <kaitlin41@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buschmi Date: Mon May 5 21:38:55 2008 New Revision: 653677 URL: http://svn.apache.org/viewvc?rev=653677&view=rev Log: Lucene Java 2.3.2 release. Added: lucene/java/tags/lucene_2_3_2/ - copied from r653676, lucene/java/branches/lucene_2_3/ From java-commits-kaitlin41@example.org Tue May 06 18:41:45 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 38772 invoked from network); 6 May 2008 18:41:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 May 2008 18:41:45 -0000 Received: (qmail 63960 invoked by uid 500); 6 May 2008 18:41:46 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 63945 invoked by uid 500); 6 May 2008 18:41:46 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 63934 invoked by uid 99); 6 May 2008 18:41:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 11:41:46 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 18:41:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2460C238896D; Tue, 6 May 2008 11:41:15 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r653878 - in /lucene/java/trunk: ./ src/java/org/apache/lucene/index/ src/java/org/apache/lucene/store/ src/test/org/apache/lucene/index/ src/test/org/apache/lucene/store/ Date: Tue, 06 May 2008 18:41:12 -0000 To: kaitlin41@example.org From: kaitlin41@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <kaitlin41@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mikemccand Date: Tue May 6 11:41:10 2008 New Revision: 653878 URL: http://svn.apache.org/viewvc?rev=653878&view=rev Log: LUCENE-1274: add preparCommit() to IW to do phase 1 of 2-phase commit Added: lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactions.java Modified: lucene/java/trunk/CHANGES.txt lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java lucene/java/trunk/src/java/org/apache/lucene/index/DocumentsWriter.java lucene/java/trunk/src/java/org/apache/lucene/index/FieldsWriter.java lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java lucene/java/trunk/src/java/org/apache/lucene/store/ChecksumIndexOutput.java lucene/java/trunk/src/test/org/apache/lucene/index/TestAtomicUpdate.java lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing.java lucene/java/trunk/src/test/org/apache/lucene/store/MockRAMDirectory.java Modified: lucene/java/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/CHANGES.txt (original) +++ lucene/java/trunk/CHANGES.txt Tue May 6 11:41:10 2008 @@ -97,6 +97,12 @@ 8. LUCENE-1267: Added numDocs() and maxDoc() to IndexWriter; deprecated docCount(). (Mike McCandless) + + 9. LUCENE-1274: Added new prepareCommit() method to IndexWriter, + which does phase 1 of a 2-phase commit (commit() does phase 2). + This is needed when you want to update an index as part of a + transaction involving external resources (eg a database). Also + deprecated abort(), renaming it to rollback(). (Mike McCandless) New features Modified: lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java Tue May 6 11:41:10 2008 @@ -138,6 +138,9 @@ public void merge(IndexWriter writer) throws CorruptIndexException, IOException { + // TODO: enable this once we are on JRE 1.5 + // assert !Thread.holdsLock(writer); + this.writer = writer; initMergeThreadPriority(); Modified: lucene/java/trunk/src/java/org/apache/lucene/index/DocumentsWriter.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/DocumentsWriter.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/index/DocumentsWriter.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/index/DocumentsWriter.java Tue May 6 11:41:10 2008 @@ -348,11 +348,12 @@ abortCount++; } - /** Called if we hit an exception when adding docs, - * flushing, etc. This resets our state, discarding any - * docs added since last flush. If ae is non-null, it - * contains the root cause exception (which we re-throw - * after we are done aborting). */ + /** Called if we hit an exception at a bad time (when + * updating the index files) and must discard all + * currently buffered docs. This resets our state, + * discarding any docs added since last flush. If ae is + * non-null, it contains the root cause exception (which + * we re-throw after we are done aborting). */ synchronized void abort(AbortException ae) throws IOException { // Anywhere that throws an AbortException must first Modified: lucene/java/trunk/src/java/org/apache/lucene/index/FieldsWriter.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/FieldsWriter.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/index/FieldsWriter.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/index/FieldsWriter.java Tue May 6 11:41:10 2008 @@ -64,8 +64,16 @@ success = true; } finally { if (!success) { - close(); - d.deleteFile(fieldsName); + try { + close(); + } catch (Throwable t) { + // Suppress so we keep throwing the original exception + } + try { + d.deleteFile(fieldsName); + } catch (Throwable t) { + // Suppress so we keep throwing the original exception + } } } @@ -77,9 +85,20 @@ success = true; } finally { if (!success) { - close(); - d.deleteFile(fieldsName); - d.deleteFile(indexName); + try { + close(); + } catch (IOException ioe) { + } + try { + d.deleteFile(fieldsName); + } catch (Throwable t) { + // Suppress so we keep throwing the original exception + } + try { + d.deleteFile(indexName); + } catch (Throwable t) { + // Suppress so we keep throwing the original exception + } } } Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Tue May 6 11:41:10 2008 @@ -306,6 +306,9 @@ private SegmentInfos rollbackSegmentInfos; // segmentInfos we will fallback to if the commit fails private HashMap rollbackSegments; + volatile SegmentInfos pendingCommit; // set when a commit is pending (after prepareCommit() & before commit()) + volatile long pendingCommitChangeCount; + private SegmentInfos localRollbackSegmentInfos; // segmentInfos we will fallback to if the commit fails private boolean localAutoCommit; // saved autoCommit during local transaction private int localFlushedDocCount; // saved docWriter.getFlushedDocCount during local transaction @@ -364,12 +367,13 @@ infoStream.println("IW " + messageID + " [" + Thread.currentThread().getName() + "]: " + message); } - private synchronized void setMessageID() { + private synchronized void setMessageID(PrintStream infoStream) { if (infoStream != null && messageID == -1) { synchronized(MESSAGE_ID_LOCK) { messageID = MESSAGE_ID++; } } + this.infoStream = infoStream; } /** @@ -1082,9 +1086,8 @@ this.closeDir = closeDir; directory = d; analyzer = a; - this.infoStream = defaultInfoStream; + setMessageID(defaultInfoStream); this.maxFieldLength = maxFieldLength; - setMessageID(); if (create) { // Clear the write lock in case it's leftover: @@ -1496,8 +1499,7 @@ */ public void setInfoStream(PrintStream infoStream) { ensureOpen(); - this.infoStream = infoStream; - setMessageID(); + setMessageID(infoStream); docWriter.setInfoStream(infoStream); deleter.setInfoStream(infoStream); if (infoStream != null) @@ -1672,7 +1674,7 @@ if (infoStream != null) message("now call final commit()"); - commit(true, 0); + commit(0); if (infoStream != null) message("at close: " + segString()); @@ -2571,7 +2573,7 @@ if (autoCommit) { boolean success = false; try { - commit(true, 0); + commit(0); success = true; } finally { if (!success) { @@ -2588,24 +2590,40 @@ } /** + * @deprecated Please use {@link #rollback} instead. + */ + public void abort() throws IOException { + rollback(); + } + + /** * Close the <code>IndexWriter</code> without committing * any of the changes that have occurred since it was * opened. This removes any temporary files that had been * created, after which the state of the index will be the * same as it was when this writer was first opened. This * can only be called when this IndexWriter was opened - * with <code>autoCommit=false</code>. + * with <code>autoCommit=false</code>. This also clears a + * previous call to {@link #prepareCommit}. * @throws IllegalStateException if this is called when * the writer was opened with <code>autoCommit=true</code>. * @throws IOException if there is a low-level IO error */ - public void abort() throws IOException { + public void rollback() throws IOException { ensureOpen(); if (autoCommit) throw new IllegalStateException("abort() can only be called when IndexWriter was opened with autoCommit=false"); boolean doClose; synchronized(this) { + + if (pendingCommit != null) { + pendingCommit.rollbackCommit(directory); + deleter.decRef(pendingCommit); + pendingCommit = null; + notifyAll(); + } + // Ensure that only one thread actually gets to do the closing: if (!closing) { doClose = true; @@ -3113,10 +3131,54 @@ flush(true, false, true); } + /** <p>Expert: prepare for commit. This does the first + * phase of 2-phase commit. You can only call this when + * autoCommit is false. This method does all steps + * necessary to commit changes since this writer was + * opened: flushes pending added and deleted docs, syncs + * the index files, writes most of next segments_N file. + * After calling this you must call either {@link + * #commit()} to finish the commit, or {@link + * #rollback()} to revert the commit and undo all changes + * done since the writer was opened.</p> + * + * You can also just call {@link #commit()} directly + * without prepareCommit first in which case that method + * will internally call prepareCommit. + */ + public final void prepareCommit() throws CorruptIndexException, IOException { + prepareCommit(false); + } + + private final void prepareCommit(boolean internal) throws CorruptIndexException, IOException { + + if (hitOOM) + throw new IllegalStateException("this writer hit an OutOfMemoryError; cannot commit"); + + if (autoCommit && !internal) + throw new IllegalStateException("this method can only be used when autoCommit is false"); + + if (!autoCommit && pendingCommit != null) + throw new IllegalStateException("prepareCommit was already called with no corresponding call to commit"); + + message("prepareCommit: flush"); + + flush(true, true, true); + + startCommit(0); + } + + private void commit(long sizeInBytes) throws IOException { + startCommit(sizeInBytes); + finishCommit(); + } + /** - * <p>Commits all pending updates (added & deleted documents) - * to the index, and syncs all referenced index files, - * such that a reader will see the changes. Note that + * <p>Commits all pending updates (added & deleted + * documents) to the index, and syncs all referenced index + * files, such that a reader will see the changes and the + * index updates will survive an OS or machine crash or + * power loss (though, see the note below). Note that * this does not wait for any running background merges to * finish. This may be a costly operation, so you should * test the cost in your application and do it only when @@ -3135,12 +3197,38 @@ * consistency on such devices. </p> */ public final void commit() throws CorruptIndexException, IOException { - commit(true); + + message("commit: start"); + + if (autoCommit || pendingCommit == null) { + message("commit: now prepare"); + prepareCommit(true); + } else + message("commit: already prepared"); + + finishCommit(); } - private final void commit(boolean triggerMerges) throws CorruptIndexException, IOException { - flush(triggerMerges, true, true); - commit(true, 0); + private synchronized final void finishCommit() throws CorruptIndexException, IOException { + + if (pendingCommit != null) { + try { + message("commit: pendingCommit != null"); + pendingCommit.finishCommit(directory); + lastCommitChangeCount = pendingCommitChangeCount; + segmentInfos.updateGeneration(pendingCommit); + setRollbackSegmentInfos(); + deleter.checkpoint(pendingCommit, true); + } finally { + deleter.decRef(pendingCommit); + pendingCommit = null; + notifyAll(); + } + + } else + message("commit: pendingCommit == null; skip"); + + message("commit: done"); } /** @@ -3176,8 +3264,7 @@ // when flushing a segment; otherwise deletes may become // visible before their corresponding added document // from an updateDocument call - if (autoCommit) - flushDeletes = true; + flushDeletes |= autoCommit; // Returns true if docWriter is currently aborting, in // which case we skip flushing this segment @@ -3935,7 +4022,7 @@ synchronized(this) { size = merge.info.sizeInBytes(); } - commit(false, size); + commit(size); } success = false; @@ -3988,7 +4075,7 @@ synchronized(this) { size = merge.info.sizeInBytes(); } - commit(false, size); + commit(size); } return mergedDocCount; @@ -4151,13 +4238,13 @@ } /** Walk through all files referenced by the current - * segmentInfos, minus flushes, and ask the Directory to - * sync each file, if it wasn't already. If that - * succeeds, then we write a new segments_N file & sync - * that. */ - private void commit(boolean skipWait, long sizeInBytes) throws IOException { + * segmentInfos and ask the Directory to sync each file, + * if it wasn't already. If that succeeds, then we + * prepare a new segments_N file but do not fully commit + * it. */ + private void startCommit(long sizeInBytes) throws IOException { - assert testPoint("startCommit"); + assert testPoint("startStartCommit"); if (hitOOM) return; @@ -4165,9 +4252,9 @@ try { if (infoStream != null) - message("start commit() skipWait=" + skipWait + " sizeInBytes=" + sizeInBytes); + message("startCommit(): start sizeInBytes=" + sizeInBytes); - if (!skipWait) + if (sizeInBytes > 0) syncPause(sizeInBytes); SegmentInfos toSync = null; @@ -4179,7 +4266,7 @@ if (changeCount == lastCommitChangeCount) { if (infoStream != null) - message(" skip commit(): no changes pending"); + message(" skip startCommit(): no changes pending"); return; } @@ -4189,15 +4276,17 @@ // threads can be doing this at once, if say a large // merge and a small merge finish at the same time: + if (infoStream != null) + message("startCommit index=" + segString(segmentInfos) + " changeCount=" + changeCount); + toSync = (SegmentInfos) segmentInfos.clone(); deleter.incRef(toSync, false); myChangeCount = changeCount; } - if (infoStream != null) - message("commit index=" + segString(toSync)); + assert testPoint("midStartCommit"); - assert testPoint("midCommit"); + boolean setPending = false; try { @@ -4237,54 +4326,72 @@ break; } - assert testPoint("midCommit2"); - + assert testPoint("midStartCommit2"); + synchronized(this) { // If someone saved a newer version of segments file // since I first started syncing my version, I can // safely skip saving myself since I've been // superseded: - if (myChangeCount > lastCommitChangeCount) { - + if (myChangeCount > lastCommitChangeCount && (pendingCommit == null || myChangeCount > pendingCommitChangeCount)) { + + // Wait now for any current pending commit to complete: + while(pendingCommit != null) { + message("wait for existing pendingCommit to finish..."); + try { + wait(); + } catch (InterruptedException ie) { + Thread.currentThread().interrupt(); + } + } + if (segmentInfos.getGeneration() > toSync.getGeneration()) toSync.updateGeneration(segmentInfos); boolean success = false; try { - toSync.commit(directory); + + // Exception here means nothing is prepared + // (this method unwinds everything it did on + // an exception) + try { + toSync.prepareCommit(directory); + } finally { + // Have our master segmentInfos record the + // generations we just prepared. We do this + // on error or success so we don't + // double-write a segments_N file. + segmentInfos.updateGeneration(toSync); + } + + assert pendingCommit == null; + setPending = true; + pendingCommit = toSync; + pendingCommitChangeCount = myChangeCount; success = true; } finally { - // Have our master segmentInfos record the - // generations we just sync'd - segmentInfos.updateGeneration(toSync); if (!success) message("hit exception committing segments file"); } - - message("commit complete"); - - lastCommitChangeCount = myChangeCount; - - deleter.checkpoint(toSync, true); - setRollbackSegmentInfos(); } else message("sync superseded by newer infos"); } message("done all syncs"); - assert testPoint("midCommitSuccess"); + assert testPoint("midStartCommitSuccess"); } finally { synchronized(this) { - deleter.decRef(toSync); + if (!setPending) + deleter.decRef(toSync); } } } catch (OutOfMemoryError oom) { hitOOM = true; throw oom; } - assert testPoint("finishCommit"); + assert testPoint("finishStartCommit"); } /** @@ -4377,11 +4484,11 @@ // Used only by assert for testing. Current points: // startDoFlush // startCommitMerge - // startCommit - // midCommit - // midCommit2 - // midCommitSuccess - // finishCommit + // startStartCommit + // midStartCommit + // midStartCommit2 + // midStartCommitSuccess + // finishStartCommit // startCommitMergeDeletes // startMergeInit // startApplyDeletes Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java Tue May 6 11:41:10 2008 @@ -274,6 +274,10 @@ }.run(); } + // Only non-null after prepareCommit has been called and + // before finishCommit is called + ChecksumIndexOutput pendingOutput; + private final void write(Directory directory) throws IOException { String segmentFileName = getNextSegmentFileName(); @@ -298,53 +302,27 @@ for (int i = 0; i < size(); i++) { info(i).write(output); } - final long checksum = output.getChecksum(); - output.writeLong(checksum); + output.prepareCommit(); success = true; + pendingOutput = output; } finally { - boolean success2 = false; - try { - if (!success) { - // We hit an exception above; try to close the file - // but suppress any exception: - try { - output.close(); - success2 = true; - } catch (Throwable t) { - // Suppress so we keep throwing the original exception - } - } else { + if (!success) { + // We hit an exception above; try to close the file + // but suppress any exception: + try { output.close(); - success2 = true; + } catch (Throwable t) { + // Suppress so we keep throwing the original exception } - } finally { - if (!success || !success2) { - try { - // Try not to leave a truncated segments_N file in - // the index: - directory.deleteFile(segmentFileName); - } catch (Throwable t) { - // Suppress so we keep throwing the original exception - } + try { + // Try not to leave a truncated segments_N file in + // the index: + directory.deleteFile(segmentFileName); + } catch (Throwable t) { + // Suppress so we keep throwing the original exception } } } - - try { - IndexOutput genOutput = directory.createOutput(IndexFileNames.SEGMENTS_GEN); - try { - genOutput.writeInt(FORMAT_LOCKLESS); - genOutput.writeLong(generation); - genOutput.writeLong(generation); - } finally { - genOutput.close(); - } - } catch (IOException e) { - // It's OK if we fail to write this file since it's - // used only as one of the retry fallbacks. - } - - lastGeneration = generation; } /** @@ -355,7 +333,7 @@ public Object clone() { SegmentInfos sis = (SegmentInfos) super.clone(); for(int i=0;i<sis.size();i++) { - sis.setElementAt(((SegmentInfo) sis.elementAt(i)).clone(), i); + sis.setElementAt(sis.info(i).clone(), i); } return sis; } @@ -739,45 +717,73 @@ // Carry over generation numbers from another SegmentInfos void updateGeneration(SegmentInfos other) { - assert other.generation > generation; lastGeneration = other.lastGeneration; generation = other.generation; version = other.version; } - /** Writes & syncs to the Directory dir, taking care to - * remove the segments file on exception */ - public final void commit(Directory dir) throws IOException { - boolean success = false; - try { - write(dir); - success = true; - } finally { - if (!success) { - // Must carefully compute fileName from "generation" - // since lastGeneration isn't incremented: + public final void rollbackCommit(Directory dir) throws IOException { + if (pendingOutput != null) { + try { + pendingOutput.close(); + } catch (Throwable t) { + // Suppress so we keep throwing the original exception + // in our caller + } + + // Must carefully compute fileName from "generation" + // since lastGeneration isn't incremented: + try { final String segmentFileName = IndexFileNames.fileNameFromGeneration(IndexFileNames.SEGMENTS, "", generation); - try { - dir.deleteFile(segmentFileName); - } catch (Throwable t) { - // Suppress so we keep throwing the original exception - } + dir.deleteFile(segmentFileName); + } catch (Throwable t) { + // Suppress so we keep throwing the original exception + // in our caller } + pendingOutput = null; + } + } + + /** Call this to start a commit. This writes the new + * segments file, but writes an invalid checksum at the + * end, so that it is not visible to readers. Once this + * is called you must call {@link #finishCommit} to complete + * the commit or {@link #rollbackCommit} to abort it. */ + public final void prepareCommit(Directory dir) throws IOException { + if (pendingOutput != null) + throw new IllegalStateException("prepareCommit was already called"); + write(dir); + } + + public final void finishCommit(Directory dir) throws IOException { + if (pendingOutput == null) + throw new IllegalStateException("prepareCommit was not called"); + boolean success = false; + try { + pendingOutput.finishCommit(); + pendingOutput.close(); + pendingOutput = null; + success = true; + } finally { + if (!success) + rollbackCommit(dir); } // NOTE: if we crash here, we have left a segments_N // file in the directory in a possibly corrupt state (if // some bytes made it to stable storage and others - // didn't). But, the segments_N file now includes - // checksum at the end, which should catch this case. - // So when a reader tries to read it, it will throw a + // didn't). But, the segments_N file includes checksum + // at the end, which should catch this case. So when a + // reader tries to read it, it will throw a // CorruptIndexException, which should cause the retry // logic in SegmentInfos to kick in and load the last // good (previous) segments_N-1 file. - final String fileName = getCurrentSegmentFileName(); + final String fileName = IndexFileNames.fileNameFromGeneration(IndexFileNames.SEGMENTS, + "", + generation); success = false; try { dir.sync(fileName); @@ -791,5 +797,28 @@ } } } + + lastGeneration = generation; + + try { + IndexOutput genOutput = dir.createOutput(IndexFileNames.SEGMENTS_GEN); + try { + genOutput.writeInt(FORMAT_LOCKLESS); + genOutput.writeLong(generation); + genOutput.writeLong(generation); + } finally { + genOutput.close(); + } + } catch (Throwable t) { + // It's OK if we fail to write this file since it's + // used only as one of the retry fallbacks. + } + } + + /** Writes & syncs to the Directory dir, taking care to + * remove the segments file on exception */ + public final void commit(Directory dir) throws IOException { + prepareCommit(dir); + finishCommit(dir); } } Modified: lucene/java/trunk/src/java/org/apache/lucene/store/ChecksumIndexOutput.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/store/ChecksumIndexOutput.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/store/ChecksumIndexOutput.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/store/ChecksumIndexOutput.java Tue May 6 11:41:10 2008 @@ -62,6 +62,30 @@ throw new RuntimeException("not allowed"); } + /** + * Starts but does not complete the commit of this file (= + * writing of the final checksum at the end). After this + * is called must call {@link #finishCommit} and the + * {@link #close} to complete the commit. + */ + public void prepareCommit() throws IOException { + final long checksum = getChecksum(); + // Intentionally write a mismatched checksum. This is + // because we want to 1) test, as best we can, that we + // are able to write a long to the file, but 2) not + // actually "commit" the file yet. This (prepare + // commit) is phase 1 of a two-phase commit. + final long pos = main.getFilePointer(); + main.writeLong(checksum-1); + main.flush(); + main.seek(pos); + } + + /** See {@link #prepareCommit} */ + public void finishCommit() throws IOException { + main.writeLong(getChecksum()); + } + public long length() throws IOException { return main.length(); } Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestAtomicUpdate.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestAtomicUpdate.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/test/org/apache/lucene/index/TestAtomicUpdate.java (original) +++ lucene/java/trunk/src/test/org/apache/lucene/index/TestAtomicUpdate.java Tue May 6 11:41:10 2008 @@ -68,6 +68,7 @@ count++; } } catch (Throwable e) { + System.out.println(Thread.currentThread().getName() + ": exc"); e.printStackTrace(System.out); failed = true; } @@ -111,11 +112,7 @@ public void doWork() throws Throwable { IndexReader r = IndexReader.open(directory); - try { - assertEquals(100, r.numDocs()); - } catch (Throwable t) { - throw t; - } + assertEquals(100, r.numDocs()); r.close(); } } @@ -141,6 +138,10 @@ } writer.commit(); + IndexReader r = IndexReader.open(directory); + assertEquals(100, r.numDocs()); + r.close(); + IndexerThread indexerThread = new IndexerThread(writer, threads); threads[0] = indexerThread; indexerThread.start(); Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java (original) +++ lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java Tue May 6 11:41:10 2008 @@ -3302,7 +3302,7 @@ boolean isCommit = false; boolean isDelete = false; for (int i = 0; i < trace.length; i++) { - if ("org.apache.lucene.index.SegmentInfos".equals(trace[i].getClassName()) && "commit".equals(trace[i].getMethodName())) + if ("org.apache.lucene.index.SegmentInfos".equals(trace[i].getClassName()) && "prepareCommit".equals(trace[i].getMethodName())) isCommit = true; if ("org.apache.lucene.store.MockRAMDirectory".equals(trace[i].getClassName()) && "deleteFile".equals(trace[i].getMethodName())) isDelete = true; @@ -3603,4 +3603,124 @@ s.close(); dir.close(); } + + // LUCENE-1274: test writer.prepareCommit() + public void testPrepareCommit() throws IOException { + Directory dir = new MockRAMDirectory(); + + IndexWriter writer = new IndexWriter(dir, false, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); + writer.setMaxBufferedDocs(2); + writer.setMergeFactor(5); + + for (int i = 0; i < 23; i++) + addDoc(writer); + + IndexReader reader = IndexReader.open(dir); + assertEquals(0, reader.numDocs()); + + writer.prepareCommit(); + + IndexReader reader2 = IndexReader.open(dir); + assertEquals(0, reader2.numDocs()); + + writer.commit(); + + IndexReader reader3 = reader.reopen(); + assertEquals(0, reader.numDocs()); + assertEquals(0, reader2.numDocs()); + assertEquals(23, reader3.numDocs()); + reader.close(); + reader2.close(); + + for (int i = 0; i < 17; i++) + addDoc(writer); + + assertEquals(23, reader3.numDocs()); + reader3.close(); + reader = IndexReader.open(dir); + assertEquals(23, reader.numDocs()); + reader.close(); + + writer.prepareCommit(); + + reader = IndexReader.open(dir); + assertEquals(23, reader.numDocs()); + reader.close(); + + writer.commit(); + reader = IndexReader.open(dir); + assertEquals(40, reader.numDocs()); + reader.close(); + writer.close(); + dir.close(); + } + + // LUCENE-1274: test writer.prepareCommit() + public void testPrepareCommitRollback() throws IOException { + MockRAMDirectory dir = new MockRAMDirectory(); + dir.setPreventDoubleWrite(false); + + IndexWriter writer = new IndexWriter(dir, false, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); + + writer.setMaxBufferedDocs(2); + writer.setMergeFactor(5); + + for (int i = 0; i < 23; i++) + addDoc(writer); + + IndexReader reader = IndexReader.open(dir); + assertEquals(0, reader.numDocs()); + + writer.prepareCommit(); + + IndexReader reader2 = IndexReader.open(dir); + assertEquals(0, reader2.numDocs()); + + writer.rollback(); + + IndexReader reader3 = reader.reopen(); + assertEquals(0, reader.numDocs()); + assertEquals(0, reader2.numDocs()); + assertEquals(0, reader3.numDocs()); + reader.close(); + reader2.close(); + + writer = new IndexWriter(dir, false, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); + for (int i = 0; i < 17; i++) + addDoc(writer); + + assertEquals(0, reader3.numDocs()); + reader3.close(); + reader = IndexReader.open(dir); + assertEquals(0, reader.numDocs()); + reader.close(); + + writer.prepareCommit(); + + reader = IndexReader.open(dir); + assertEquals(0, reader.numDocs()); + reader.close(); + + writer.commit(); + reader = IndexReader.open(dir); + assertEquals(17, reader.numDocs()); + reader.close(); + writer.close(); + dir.close(); + } + + // LUCENE-1274 + public void testPrepareCommitNoChanges() throws IOException { + MockRAMDirectory dir = new MockRAMDirectory(); + + IndexWriter writer = new IndexWriter(dir, false, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); + writer.prepareCommit(); + writer.commit(); + writer.close(); + + IndexReader reader = IndexReader.open(dir); + assertEquals(0, reader.numDocs()); + reader.close(); + dir.close(); + } } Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing.java (original) +++ lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing.java Tue May 6 11:41:10 2008 @@ -53,6 +53,7 @@ count++; } } catch (Throwable e) { + System.out.println(Thread.currentThread() + ": exc"); e.printStackTrace(System.out); failed = true; } Added: lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactions.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactions.java?rev=653878&view=auto ============================================================================== --- lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactions.java (added) +++ lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactions.java Tue May 6 11:41:10 2008 @@ -0,0 +1,217 @@ +package org.apache.lucene.index; + +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.IOException; +import java.util.Random; +import org.apache.lucene.store.*; +import org.apache.lucene.util.*; +import org.apache.lucene.analysis.*; +import org.apache.lucene.document.*; + +public class TestTransactions extends LuceneTestCase +{ + private static final Random RANDOM = new Random(); + private static volatile boolean doFail; + + private class RandomFailure extends MockRAMDirectory.Failure { + public void eval(MockRAMDirectory dir) throws IOException { + if (TestTransactions.doFail && RANDOM.nextInt() % 10 <= 3) + throw new IOException("now failing randomly but on purpose"); + } + } + + private static abstract class TimedThread extends Thread { + boolean failed; + private static int RUN_TIME_SEC = 6; + private TimedThread[] allThreads; + + abstract public void doWork() throws Throwable; + + TimedThread(TimedThread[] threads) { + this.allThreads = threads; + } + + public void run() { + final long stopTime = System.currentTimeMillis() + 1000*RUN_TIME_SEC; + + try { + while(System.currentTimeMillis() < stopTime && !anyErrors()) + doWork(); + } catch (Throwable e) { + System.out.println(Thread.currentThread() + ": exc"); + e.printStackTrace(System.out); + failed = true; + } + } + + private boolean anyErrors() { + for(int i=0;i<allThreads.length;i++) + if (allThreads[i] != null && allThreads[i].failed) + return true; + return false; + } + } + + private static class IndexerThread extends TimedThread { + Directory dir1; + Directory dir2; + Object lock; + int nextID; + + public IndexerThread(Object lock, Directory dir1, Directory dir2, TimedThread[] threads) { + super(threads); + this.lock = lock; + this.dir1 = dir1; + this.dir2 = dir2; + } + + public void doWork() throws Throwable { + + IndexWriter writer1 = new IndexWriter(dir1, false, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); + writer1.setMaxBufferedDocs(3); + writer1.setMergeFactor(2); + ((ConcurrentMergeScheduler) writer1.getMergeScheduler()).setSuppressExceptions(); + + IndexWriter writer2 = new IndexWriter(dir2, false, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); + // Intentionally use different params so flush/merge + // happen @ different times + writer2.setMaxBufferedDocs(2); + writer2.setMergeFactor(3); + ((ConcurrentMergeScheduler) writer2.getMergeScheduler()).setSuppressExceptions(); + + update(writer1); + update(writer2); + + TestTransactions.doFail = true; + try { + synchronized(lock) { + try { + writer1.prepareCommit(); + } catch (Throwable t) { + writer1.rollback(); + writer2.rollback(); + return; + } + try { + writer2.prepareCommit(); + } catch (Throwable t) { + writer1.rollback(); + writer2.rollback(); + return; + } + + writer1.commit(); + writer2.commit(); + } + } finally { + TestTransactions.doFail = false; + } + + writer1.close(); + writer2.close(); + } + + public void update(IndexWriter writer) throws IOException { + // Add 10 docs: + for(int j=0; j<10; j++) { + Document d = new Document(); + int n = RANDOM.nextInt(); + d.add(new Field("id", Integer.toString(nextID++), Field.Store.YES, Field.Index.UN_TOKENIZED)); + d.add(new Field("contents", English.intToEnglish(n), Field.Store.NO, Field.Index.TOKENIZED)); + writer.addDocument(d); + } + + // Delete 5 docs: + int deleteID = nextID-1; + for(int j=0; j<5; j++) { + writer.deleteDocuments(new Term("id", ""+deleteID)); + deleteID -= 2; + } + } + } + + private static class SearcherThread extends TimedThread { + Directory dir1; + Directory dir2; + Object lock; + + public SearcherThread(Object lock, Directory dir1, Directory dir2, TimedThread[] threads) { + super(threads); + this.lock = lock; + this.dir1 = dir1; + this.dir2 = dir2; + } + + public void doWork() throws Throwable { + IndexReader r1, r2; + synchronized(lock) { + r1 = IndexReader.open(dir1); + r2 = IndexReader.open(dir2); + } + if (r1.numDocs() != r2.numDocs()) + throw new RuntimeException("doc counts differ: r1=" + r1.numDocs() + " r2=" + r2.numDocs()); + r1.close(); + r2.close(); + } + } + + public void initIndex(Directory dir) throws Throwable { + IndexWriter writer = new IndexWriter(dir, false, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); + for(int j=0; j<7; j++) { + Document d = new Document(); + int n = RANDOM.nextInt(); + d.add(new Field("contents", English.intToEnglish(n), Field.Store.NO, Field.Index.TOKENIZED)); + writer.addDocument(d); + } + writer.close(); + } + + public void testTransactions() throws Throwable { + MockRAMDirectory dir1 = new MockRAMDirectory(); + MockRAMDirectory dir2 = new MockRAMDirectory(); + dir1.setPreventDoubleWrite(false); + dir2.setPreventDoubleWrite(false); + dir1.failOn(new RandomFailure()); + dir2.failOn(new RandomFailure()); + + initIndex(dir1); + initIndex(dir2); + + TimedThread[] threads = new TimedThread[3]; + int numThread = 0; + + IndexerThread indexerThread = new IndexerThread(this, dir1, dir2, threads); + threads[numThread++] = indexerThread; + indexerThread.start(); + + SearcherThread searcherThread1 = new SearcherThread(this, dir1, dir2, threads); + threads[numThread++] = searcherThread1; + searcherThread1.start(); + + SearcherThread searcherThread2 = new SearcherThread(this, dir1, dir2, threads); + threads[numThread++] = searcherThread2; + searcherThread2.start(); + + for(int i=0;i<numThread;i++) + threads[i].join(); + + for(int i=0;i<numThread;i++) + assertTrue(!((TimedThread) threads[i]).failed); + } +} Modified: lucene/java/trunk/src/test/org/apache/lucene/store/MockRAMDirectory.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/store/MockRAMDirectory.java?rev=653878&r1=653877&r2=653878&view=diff ============================================================================== --- lucene/java/trunk/src/test/org/apache/lucene/store/MockRAMDirectory.java (original) +++ lucene/java/trunk/src/test/org/apache/lucene/store/MockRAMDirectory.java Tue May 6 11:41:10 2008 @@ -209,7 +209,7 @@ throw new IOException("cannot createOutput after crash"); init(); synchronized(openFiles) { - if (preventDoubleWrite && createdFiles.contains(name)) + if (preventDoubleWrite && createdFiles.contains(name) && !name.equals("segments.gen")) throw new IOException("file \"" + name + "\" was already written to"); if (noDeleteOpenFile && openFiles.containsKey(name)) throw new IOException("MockRAMDirectory: file \"" + name + "\" is still open: cannot overwrite"); From java-commits-kaitlin41@example.org Wed May 07 03:36:32 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 82649 invoked from network); 7 May 2008 03:36:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 May 2008 03:36:32 -0000 Received: (qmail 13983 invoked by uid 500); 7 May 2008 03:36:34 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 13957 invoked by uid 500); 7 May 2008 03:36:34 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 13945 invoked by uid 99); 7 May 2008 03:36:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 20:36:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eos.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 May 2008 03:35:37 +0000 Received: from eos.apache.org (localhost [83.161.120.155]) by eos.apache.org (Postfix) with ESMTP id D2260D2EC for <kaitlin41@example.org>; Wed, 7 May 2008 03:35:57 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <kaitlin41@example.org> To: kaitlin41@example.org Date: Wed, 07 May 2008 03:35:57 -0000 Message-ID: <kaitlin41@example.org> Subject: [Lucene-java Wiki] Update of "Support" by OtisGospodnetic X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification. The following page has been changed by OtisGospodnetic: http://wiki.apache.org/lucene-java/Support ------------------------------------------------------------------------------ * Tom Hill <kaitlin41@example.org> * I''''''ntraFind Software AG http://www.intrafind.de/ * Digital Pebble http://www.digitalpebble.com - * Lucene Consulting http://www.lucene-consulting.com/ + * [http://www.lucene-consulting.com/ Lucene Consulting] - Lucene,Solr, Nutch, Hadoop consulting and development. Founded by Otis Gospodnetic, [http://www.amazon.com/Lucene-Action-Otis-Gospodnetic/dp/1932394281 Lucene in Action] co-author. * [http://www.lucidimagination.com Lucid Imagination]: Lucene/Solr based product and services. The founding team includes Erik Hatcher, Grant Ingersoll and Yonik Seeley. * Mark Miller kaitlin41@example.org * Moongate Technologies http://www.moongatetechnologies.com/ From java-commits-kaitlin41@example.org Wed May 07 23:07:29 2008 Return-Path: <java-commits-kaitlin41@example.org> Delivered-To: kaitlin41@example.org Received: (qmail 54192 invoked from network); 7 May 2008 23:07:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 May 2008 23:07:29 -0000 Received: (qmail 66414 invoked by uid 500); 7 May 2008 23:07:30 -0000 Delivered-To: kaitlin41@example.org Received: (qmail 66386 invoked by uid 500); 7 May 2008 23:07:30 -0000 Mailing-List: contact kaitlin41@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:kaitlin41@example.org> List-Unsubscribe: <mailto:kaitlin41@example.org> List-Post: <mailto:kaitlin41@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: kaitlin41@example.org Delivered-To: mailing list kaitlin41@example.org Received: (qmail 66353 invoked by uid 99); 7 May 2008 23:07:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 May 2008 16:07:30 -0700 X-ASF-Spam-Status: No, hits=-1999.0 required=10.0 tests=ALL_TRUSTED,FUZZY_AMBIEN,OBSCURED_EMAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 May 2008 23:06:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A2B4823889FE; Wed, 7 May 2008 16:06:57 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r654316 - in /lucene/java/site: docs/ src/documentation/content/xdocs/ Date: Wed, 07 May 2008 23:06:55 -0000 To: kaitlin41@example.org From: kaitlin41@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <kaitlin41@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buschmi Date: Wed May 7 16:06:52 2008 New Revision: 654316 URL: http://svn.apache.org/viewvc?rev=654316&view=rev Log: Update website for Lucene 2.3.2 release Modified: lucene/java/site/docs/developer-resources.html lucene/java/site/docs/features.html lucene/java/site/docs/index.html lucene/java/site/docs/index.pdf lucene/java/site/docs/linkmap.html lucene/java/site/docs/linkmap.pdf lucene/java/site/docs/mailinglists.html lucene/java/site/docs/releases.html lucene/java/site/docs/systemrequirements.html lucene/java/site/docs/whoweare.html lucene/java/site/src/documentation/content/xdocs/index.xml lucene/java/site/src/documentation/content/xdocs/site.xml lucene/java/site/src/documentation/content/xdocs/tabs.xml Modified: lucene/java/site/docs/developer-resources.html URL: http://svn.apache.org/viewvc/lucene/java/site/docs/developer-resources.html?rev=654316&r1=654315&r2=654316&view=diff ============================================================================== --- lucene/java/site/docs/developer-resources.html (original) +++ lucene/java/site/docs/developer-resources.html Wed May 7 16:06:52 2008 @@ -68,7 +68,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li> -<a class="unselected" href="http://lucene.apache.org/java/2_3_1/">Lucene 2.3.1 Documentation</a> +<a class="unselected" href="http://lucene.apache.org/java/2_3_2/">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ @@ -121,6 +121,9 @@ <div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Documentation</div> <div id="menu_1.2" class="menuitemgroup"> <div class="menuitem"> +<a href="http://lucene.apache.org/java/2_3_2/">Release 2.3.2</a> +</div> +<div class="menuitem"> <a href="http://lucene.apache.org/java/2_3_1/">Release 2.3.1</a> </div> <div class="menuitem"> Modified: lucene/java/site/docs/features.html URL: http://svn.apache.org/viewvc/lucene/java/site/docs/features.html?rev=654316&r1=654315&r2=654316&view=diff ============================================================================== --- lucene/java/site/docs/features.html (original) +++ lucene/java/site/docs/features.html Wed May 7 16:06:52 2008 @@ -68,7 +68,7 @@ <a class="unselected" href="http://wiki.apache.org/lucene-java">Wiki</a> </li> <li> -<a class="unselected" href="http://lucene.apache.org/java/2_3_1/">Lucene 2.3.1 Documentation</a> +<a class="unselected" href="http://lucene.apache.org/java/2_3_2/">Lucene 2.3.2 Documentation</a> </li> </ul> <!--+ @@ -121,6 +121,9 @@ <div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Documentation</div> <div id="menu_1.2" class="menuitemgroup"> <div class="menuitem"> +<a href="http://lucene.apache.org/java/2_3_2/">Release 2.3.2</a> +</div> +<div class="menuitem"> <a href="http://lucene.apache.org/java/2_3_1/">Release 2.3.1</a> </div> <div class="menuitem"> Modified: lucene/java/site/docs/index.html URL: http://svn.apache.org/viewvc/lucene/java/site/docs/index.html?rev=654316&r1=654315&r2=654316&view=diff ============================================================================== --- lucene/java/site/docs/index.html (original) +++ lucene/java/site/docs/index.html Wed May 7 16:06:52 2008 @@ -70,7 +70,7
{'source': 'Apache Software Foundation Public Mail Archives'}