You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2015/01/10 17:58:37 UTC
svn commit: r1650768 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/core/ConfigSolr.java
core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
server/solr/solr.xml
Author: markrmiller
Date: Sat Jan 10 16:58:36 2015
New Revision: 1650768
URL: http://svn.apache.org/r1650768
Log:
SOLR-6324: Set finite default timeouts for select and update.
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/ConfigSolr.java
lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
lucene/dev/trunk/solr/server/solr/solr.xml
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1650768&r1=1650767&r2=1650768&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sat Jan 10 16:58:36 2015
@@ -660,6 +660,8 @@ Other Changes
* SOLR-1723: VelocityResponseWriter improvements (Erik Hatcher)
+* SOLR-6324: Set finite default timeouts for select and update. (Ramkumar Aiyengar via Mark Miller)
+
================== 4.10.3 ==================
Bug Fixes
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/ConfigSolr.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/ConfigSolr.java?rev=1650768&r1=1650767&r2=1650768&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/ConfigSolr.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/ConfigSolr.java Sat Jan 10 16:58:36 2015
@@ -33,6 +33,7 @@ import org.xml.sax.InputSource;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
+
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
@@ -142,6 +143,9 @@ public abstract class ConfigSolr {
private static final int DEFAULT_AUTO_REPLICA_FAILOVER_WAIT_AFTER_EXPIRATION = 30000;
private static final int DEFAULT_AUTO_REPLICA_FAILOVER_WORKLOOP_DELAY = 10000;
private static final int DEFAULT_AUTO_REPLICA_FAILOVER_BAD_NODE_EXPIRATION = 60000;
+
+ public static final int DEFAULT_DISTRIBUPDATECONNTIMEOUT = 60000;
+ public static final int DEFAULT_DISTRIBUPDATESOTIMEOUT = 600000;
protected static final String DEFAULT_CORE_ADMIN_PATH = "/admin/cores";
@@ -182,11 +186,11 @@ public abstract class ConfigSolr {
}
public int getDistributedConnectionTimeout() {
- return get(CfgProp.SOLR_DISTRIBUPDATECONNTIMEOUT, 0);
+ return get(CfgProp.SOLR_DISTRIBUPDATECONNTIMEOUT, DEFAULT_DISTRIBUPDATECONNTIMEOUT);
}
public int getDistributedSocketTimeout() {
- return get(CfgProp.SOLR_DISTRIBUPDATESOTIMEOUT, 0);
+ return get(CfgProp.SOLR_DISTRIBUPDATESOTIMEOUT, DEFAULT_DISTRIBUPDATESOTIMEOUT);
}
public int getMaxUpdateConnections() {
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java?rev=1650768&r1=1650767&r2=1650768&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java Sat Jan 10 16:58:36 2015
@@ -27,6 +27,7 @@ import org.apache.solr.common.util.Execu
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.common.util.URLUtil;
+import org.apache.solr.core.ConfigSolr;
import org.apache.solr.core.PluginInfo;
import org.apache.solr.util.DefaultSolrThreadFactory;
import org.slf4j.Logger;
@@ -66,8 +67,8 @@ public class HttpShardHandlerFactory ext
protected HttpClient defaultClient;
private LBHttpSolrClient loadbalancer;
//default values:
- int soTimeout = 0;
- int connectionTimeout = 0;
+ int soTimeout = ConfigSolr.DEFAULT_DISTRIBUPDATESOTIMEOUT;
+ int connectionTimeout = ConfigSolr.DEFAULT_DISTRIBUPDATECONNTIMEOUT;
int maxConnectionsPerHost = 20;
int maxConnections = 10000;
int corePoolSize = 0;
Modified: lucene/dev/trunk/solr/server/solr/solr.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/server/solr/solr.xml?rev=1650768&r1=1650767&r2=1650768&view=diff
==============================================================================
--- lucene/dev/trunk/solr/server/solr/solr.xml (original)
+++ lucene/dev/trunk/solr/server/solr/solr.xml Sat Jan 10 16:58:36 2015
@@ -29,17 +29,23 @@
<solr>
<solrcloud>
+
<str name="host">${host:}</str>
<int name="hostPort">${jetty.port:8983}</int>
<str name="hostContext">${hostContext:solr}</str>
- <int name="zkClientTimeout">${zkClientTimeout:30000}</int>
+
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
+
+ <int name="zkClientTimeout">${zkClientTimeout:30000}</int>
+ <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int>
+ <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int>
+
</solrcloud>
<shardHandlerFactory name="shardHandlerFactory"
class="HttpShardHandlerFactory">
- <int name="socketTimeout">${socketTimeout:0}</int>
- <int name="connTimeout">${connTimeout:0}</int>
+ <int name="socketTimeout">${socketTimeout:600000}</int>
+ <int name="connTimeout">${connTimeout:60000}</int>
</shardHandlerFactory>
</solr>