From 246ad4dd572e9ac68060f6af381dca313e84582a Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Sun, 29 Apr 2007 14:05:21 +0000 Subject: [PATCH] make writeLockTimeout work: SOLR-222 git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@533507 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/java/org/apache/solr/core/SolrCore.java | 2 ++ src/java/org/apache/solr/update/SolrIndexWriter.java | 3 +-- 3 files changed, 6 insertions(+), 2 deletions(-) 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); } }