lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1393114 - /lucene/dev/branches/lucene4456/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
Date Tue, 02 Oct 2012 19:14:00 GMT
Author: mikemccand
Date: Tue Oct  2 19:13:59 2012
New Revision: 1393114

URL: http://svn.apache.org/viewvc?rev=1393114&view=rev
Log:
LUCENE-4456: fix test

Modified:
    lucene/dev/branches/lucene4456/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/dev/branches/lucene4456/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4456/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1393114&r1=1393113&r2=1393114&view=diff
==============================================================================
--- lucene/dev/branches/lucene4456/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
(original)
+++ lucene/dev/branches/lucene4456/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
Tue Oct  2 19:13:59 2012
@@ -2451,7 +2451,18 @@ public class IndexWriter implements Clos
         merger.add(reader);
       }
 
-      MergeState mergeState = merger.merge();                // merge 'em
+      MergeState mergeState;
+      boolean success = false;
+      try {
+        mergeState = merger.merge();                // merge 'em
+        success = true;
+      } finally {
+        if (!success) { 
+          synchronized(this) {
+            deleter.refresh(info.name);
+          }
+        }
+      }
 
       SegmentInfoPerCommit infoPerCommit = new SegmentInfoPerCommit(info, 0, -1L);
 



Mime
View raw message