You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by mi...@apache.org on 2010/11/16 17:54:26 UTC
svn commit: r1035693 - in /lucene/java/branches/lucene_3_0: CHANGES.txt
src/java/org/apache/lucene/index/IndexWriter.java
Author: mikemccand
Date: Tue Nov 16 16:54:26 2010
New Revision: 1035693
URL: http://svn.apache.org/viewvc?rev=1035693&view=rev
Log:
LUCENE-2767: add 2 missing sync's in IW when it invokes IFD
Modified:
lucene/java/branches/lucene_3_0/CHANGES.txt
lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/index/IndexWriter.java
Modified: lucene/java/branches/lucene_3_0/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/CHANGES.txt?rev=1035693&r1=1035692&r2=1035693&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/CHANGES.txt (original)
+++ lucene/java/branches/lucene_3_0/CHANGES.txt Tue Nov 16 16:54:26 2010
@@ -87,6 +87,10 @@ Bug fixes
IndexWriter.optimize could sometimes return even though the index
wasn't fully optimized (Mike McCandless)
+* LUCENE-2767: Fix thread safety issue in addIndexes(IndexReader[])
+ that could potentially result in index corruption. (Mike
+ McCandless)
+
Optimizations
* LUCENE-2556: Improve memory usage after cloning TermAttribute.
Modified: lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/index/IndexWriter.java?rev=1035693&r1=1035692&r2=1035693&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/index/IndexWriter.java Tue Nov 16 16:54:26 2010
@@ -3361,7 +3361,9 @@ public class IndexWriter implements Clos
} finally {
- deleter.decRef(files);
+ synchronized(this) {
+ deleter.decRef(files);
+ }
if (!success) {
if (infoStream != null)
@@ -4533,7 +4535,9 @@ public class IndexWriter implements Clos
if (merge.isAborted()) {
if (infoStream != null)
message("abort merge after building CFS");
- deleter.deleteFile(compoundFileName);
+ synchronized(this) {
+ deleter.deleteFile(compoundFileName);
+ }
return 0;
}