lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1209663 - /lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java
Date Fri, 02 Dec 2011 19:52:54 GMT
Author: mikemccand
Date: Fri Dec  2 19:52:39 2011
New Revision: 1209663

URL: http://svn.apache.org/viewvc?rev=1209663&view=rev
Log:
LUCENE-3598: fix some accidental behaviour changes here...

Modified:
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java?rev=1209663&r1=1209662&r2=1209663&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java Fri Dec  2 19:52:39
2011
@@ -371,7 +371,9 @@ public class IndexWriter implements Clos
         // never reached but javac disagrees:
         return null;
       } finally {
-        infoStream.message("IW", "hit exception during NRT reader");
+        if (!success && infoStream.isEnabled("IW")) {
+          infoStream.message("IW", "hit exception during NRT reader");
+        }
         // Done: finish the full flush!
         docWriter.finishFullFlush(success);
         doAfterFlush();
@@ -1335,7 +1337,9 @@ public class IndexWriter implements Clos
         anySegmentFlushed = docWriter.updateDocuments(docs, analyzer, delTerm);
         success = true;
       } finally {
-        infoStream.message("IW", "hit exception updating document");
+        if (!success && infoStream.isEnabled("IW")) {
+          infoStream.message("IW", "hit exception updating document");
+        }
       }
       if (anySegmentFlushed) {
         maybeMerge();
@@ -1480,7 +1484,9 @@ public class IndexWriter implements Clos
         anySegmentFlushed = docWriter.updateDocument(doc, analyzer, term);
         success = true;
       } finally {
-        infoStream.message("IW", "hit exception updating document");
+        if (!success && infoStream.isEnabled("IW")) {
+          infoStream.message("IW", "hit exception updating document");
+        }
       }
 
       if (anySegmentFlushed) {
@@ -2043,7 +2049,9 @@ public class IndexWriter implements Clos
     } catch (OutOfMemoryError oom) {
       handleOOM(oom, "deleteAll");
     } finally {
-      infoStream.message("IW", "hit exception during deleteAll");
+      if (!success && infoStream.isEnabled("IW")) {
+        infoStream.message("IW", "hit exception during deleteAll");
+      }
     }
   }
 



Mime
View raw message