lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r750175 - in /lucene/java/branches/lucene_2_4: ./ CHANGES.txt src/java/org/apache/lucene/index/IndexWriter.java
Date Wed, 04 Mar 2009 21:53:47 GMT
Author: mikemccand
Date: Wed Mar  4 21:53:46 2009
New Revision: 750175

URL: http://svn.apache.org/viewvc?rev=750175&view=rev
Log:
LUCENE-1552: reset success to false in addIndexes(IndexReader[])

Modified:
    lucene/java/branches/lucene_2_4/   (props changed)
    lucene/java/branches/lucene_2_4/CHANGES.txt
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/IndexWriter.java

Propchange: lucene/java/branches/lucene_2_4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar  4 21:53:46 2009
@@ -1 +1 @@
-/lucene/java/trunk:708549,709456,712233,718540,719716,723149,734415,735043,746661,747251,748534,749326
+/lucene/java/trunk:708549,709456,712233,718540,719716,723149,734415,735043,746661,747251,748534,749326,750162

Modified: lucene/java/branches/lucene_2_4/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/CHANGES.txt?rev=750175&r1=750174&r2=750175&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_4/CHANGES.txt Wed Mar  4 21:53:46 2009
@@ -58,6 +58,10 @@
 14. LUCENE-1186: Add Analyzer.close() to free internal ThreadLocal
     resources.  (Christian Kohlschütter via Mike McCandless)
 
+15. LUCENE-1552: Fix IndexWriter.addIndexes(IndexReader[]) to properly
+    rollback IndexWriter's internal state on hitting an
+    exception. (Scott Garland via Mike McCandless)
+
 ======================= Release 2.4.0 2008-10-06 =======================
 
 Changes in backwards compatibility policy

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/IndexWriter.java?rev=750175&r1=750174&r2=750175&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/IndexWriter.java Wed
Mar  4 21:53:46 2009
@@ -3207,6 +3207,8 @@
             sReader = SegmentReader.get(true, segmentInfos.info(0));
           }
         }
+        
+        success = false;
 
         try {
           if (sReader != null)
@@ -4208,8 +4210,6 @@
 
     merger = new SegmentMerger(this, mergedName, merge);
     
-    boolean success = false;
-
     // This is try/finally to make sure merger's readers are
     // closed:
     try {
@@ -4232,8 +4232,6 @@
 
       assert mergedDocCount == totDocCount;
 
-      success = true;
-
     } finally {
       // close readers before we attempt to delete
       // now-obsolete segments
@@ -4258,7 +4256,7 @@
         commit(size);
       }
       
-      success = false;
+      boolean success = false;
       final String compoundFileName = mergedName + "." + IndexFileNames.COMPOUND_FILE_EXTENSION;
 
       try {



Mime
View raw message