lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1063936 - in /lucene/dev/trunk: ./ lucene/ lucene/src/java/org/apache/lucene/index/IndexWriter.java solr/
Date Thu, 27 Jan 2011 00:42:58 GMT
Author: mikemccand
Date: Thu Jan 27 00:42:58 2011
New Revision: 1063936

URL: http://svn.apache.org/viewvc?rev=1063936&view=rev
Log:
LUCENE-2680: deletes were being double-applied

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/lucene/   (props changed)
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/dev/trunk/solr/   (props changed)

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=1063936&r1=1063935&r2=1063936&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 Thu Jan 27 00:42:58
2011
@@ -2895,10 +2895,6 @@ public class IndexWriter implements Clos
   final synchronized void mergeInit(MergePolicy.OneMerge merge) throws IOException {
     boolean success = false;
     try {
-      // Lock order: IW -> BD
-      if (bufferedDeletes.applyDeletes(readerPool, segmentInfos, merge.segments)) {
-        checkpoint();
-      }
       _mergeInit(merge);
       success = true;
     } finally {
@@ -2929,6 +2925,11 @@ public class IndexWriter implements Clos
     if (merge.isAborted())
       return;
 
+    // Lock order: IW -> BD
+    if (bufferedDeletes.applyDeletes(readerPool, segmentInfos, merge.segments)) {
+      checkpoint();
+    }
+
     // Bind a new segment name here so even with
     // ConcurrentMergePolicy we keep deterministic segment
     // names.



Mime
View raw message