diff --git a/CHANGES.txt b/CHANGES.txt index 1b47f18fd75..cd2823cf770 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -245,6 +245,9 @@ Bug Fixes and avoid use of "find -maxdepth" on platforms where it is not supported. (yonik) +12. SOLR-222: Changing writeLockTimeout in solrconfig.xml did not + change the effective timeout. (Koji Sekiguchi via yonik) + Other Changes 1. Updated to Lucene 2.1 diff --git a/src/java/org/apache/solr/core/SolrCore.java b/src/java/org/apache/solr/core/SolrCore.java index 8918b6d073c..52038408709 100644 --- a/src/java/org/apache/solr/core/SolrCore.java +++ b/src/java/org/apache/solr/core/SolrCore.java @@ -32,6 +32,7 @@ import java.util.logging.Logger; import javax.xml.xpath.XPathConstants; import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.IndexWriter; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; @@ -84,6 +85,7 @@ public final class SolrCore { static { BooleanQuery.setMaxClauseCount(SolrConfig.config.getInt("query/maxBooleanClauses",BooleanQuery.getMaxClauseCount())); + if (mainIndexConfig.writeLockTimeout != -1) IndexWriter.setDefaultWriteLockTimeout(mainIndexConfig.writeLockTimeout); } diff --git a/src/java/org/apache/solr/update/SolrIndexWriter.java b/src/java/org/apache/solr/update/SolrIndexWriter.java index 1c3a530737b..39c8477a977 100644 --- a/src/java/org/apache/solr/update/SolrIndexWriter.java +++ b/src/java/org/apache/solr/update/SolrIndexWriter.java @@ -51,8 +51,7 @@ public class SolrIndexWriter extends IndexWriter { if (config.maxMergeDocs != -1) setMaxMergeDocs(config.maxMergeDocs); if (config.mergeFactor != -1) setMergeFactor(config.mergeFactor); if (config.maxFieldLength != -1) setMaxFieldLength(config.maxFieldLength); - if (config.writeLockTimeout != -1) setWriteLockTimeout(config.writeLockTimeout); - if (config.commitLockTimeout != -1) setWriteLockTimeout(config.commitLockTimeout); + //if (config.commitLockTimeout != -1) setWriteLockTimeout(config.commitLockTimeout); } }