mirror of https://github.com/apache/lucene.git
SOLR-5453: Raise recovery socket read timeouts.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1542620 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f43a661898
commit
add510e6a9
|
@ -104,6 +104,8 @@ Bug Fixes
|
|||
* SOLR-5451: SyncStrategy closes it's http connection manager before the
|
||||
executor that uses it in it's close method. (Mark Miller)
|
||||
|
||||
* SOLR-5453: Raise recovery socket read timeouts. (Mark Miller)
|
||||
|
||||
Other Changes
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -186,7 +186,6 @@ public class RecoveryStrategy extends Thread implements ClosableThread {
|
|||
HttpSolrServer server = new HttpSolrServer(leaderUrl);
|
||||
try {
|
||||
server.setConnectionTimeout(30000);
|
||||
server.setSoTimeout(60000);
|
||||
UpdateRequest ureq = new UpdateRequest();
|
||||
ureq.setParams(new ModifiableSolrParams());
|
||||
ureq.getParams().set(DistributedUpdateProcessor.COMMIT_END_POINT, true);
|
||||
|
@ -202,8 +201,7 @@ public class RecoveryStrategy extends Thread implements ClosableThread {
|
|||
throws SolrServerException, IOException {
|
||||
HttpSolrServer server = new HttpSolrServer(leaderBaseUrl);
|
||||
try {
|
||||
server.setConnectionTimeout(45000);
|
||||
server.setSoTimeout(120000);
|
||||
server.setConnectionTimeout(30000);
|
||||
WaitForState prepCmd = new WaitForState();
|
||||
prepCmd.setCoreName(leaderCoreName);
|
||||
prepCmd.setNodeName(zkController.getNodeName());
|
||||
|
|
|
@ -67,8 +67,7 @@ public class SyncStrategy {
|
|||
ModifiableSolrParams params = new ModifiableSolrParams();
|
||||
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 10000);
|
||||
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, 20);
|
||||
params.set(HttpClientUtil.PROP_CONNECTION_TIMEOUT, 15000);
|
||||
params.set(HttpClientUtil.PROP_SO_TIMEOUT, 60000);
|
||||
params.set(HttpClientUtil.PROP_CONNECTION_TIMEOUT, 30000);
|
||||
params.set(HttpClientUtil.PROP_USE_RETRY, false);
|
||||
client = HttpClientUtil.createClient(params);
|
||||
}
|
||||
|
@ -284,8 +283,8 @@ public class SyncStrategy {
|
|||
|
||||
HttpSolrServer server = new HttpSolrServer(baseUrl, client);
|
||||
try {
|
||||
server.setConnectionTimeout(15000);
|
||||
server.setSoTimeout(60000);
|
||||
server.setConnectionTimeout(30000);
|
||||
server.setSoTimeout(120000);
|
||||
server.request(recoverRequestCmd);
|
||||
} catch (Throwable t) {
|
||||
SolrException.log(log, ZkCoreNodeProps.getCoreUrl(leaderProps) + ": Could not tell a replica to recover", t);
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
package org.apache.solr.update;
|
||||
|
||||
import static org.apache.solr.update.processor.DistributedUpdateProcessor.DistribPhase.FROMLEADER;
|
||||
import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.ConnectException;
|
||||
import java.net.SocketException;
|
||||
|
@ -37,7 +40,6 @@ import org.apache.solr.cloud.ZkController;
|
|||
import org.apache.solr.common.SolrException;
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.solr.common.util.StrUtils;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
import org.apache.solr.handler.component.HttpShardHandlerFactory;
|
||||
|
@ -48,16 +50,11 @@ import org.apache.solr.handler.component.ShardResponse;
|
|||
import org.apache.solr.request.LocalSolrQueryRequest;
|
||||
import org.apache.solr.request.SolrQueryRequest;
|
||||
import org.apache.solr.response.SolrQueryResponse;
|
||||
import org.apache.solr.update.processor.DistributedUpdateProcessorFactory;
|
||||
import org.apache.solr.update.processor.RunUpdateProcessorFactory;
|
||||
import org.apache.solr.update.processor.UpdateRequestProcessor;
|
||||
import org.apache.solr.update.processor.UpdateRequestProcessorChain;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
|
||||
import static org.apache.solr.update.processor.DistributedUpdateProcessor.DistribPhase.FROMLEADER;
|
||||
|
||||
/** @lucene.experimental */
|
||||
public class PeerSync {
|
||||
public static Logger log = LoggerFactory.getLogger(PeerSync.class);
|
||||
|
@ -88,7 +85,6 @@ public class PeerSync {
|
|||
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, 20);
|
||||
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 10000);
|
||||
params.set(HttpClientUtil.PROP_CONNECTION_TIMEOUT, 30000);
|
||||
params.set(HttpClientUtil.PROP_SO_TIMEOUT, 30000);
|
||||
params.set(HttpClientUtil.PROP_USE_RETRY, false);
|
||||
client = HttpClientUtil.createClient(params);
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ public class StreamingSolrServers {
|
|||
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 128);
|
||||
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, 32);
|
||||
params.set(HttpClientUtil.PROP_FOLLOW_REDIRECTS, false);
|
||||
params.set(HttpClientUtil.PROP_CONNECTION_TIMEOUT, 30000);
|
||||
httpClient = HttpClientUtil.createClient(params);
|
||||
}
|
||||
|
||||
|
|
|
@ -134,8 +134,8 @@ public class SyncSliceTest extends AbstractFullDistribZkTestBase {
|
|||
baseUrl = baseUrl.substring(0, baseUrl.length() - "collection1".length());
|
||||
|
||||
HttpSolrServer baseServer = new HttpSolrServer(baseUrl);
|
||||
// we only set the connect timeout, not so timeout
|
||||
baseServer.setConnectionTimeout(15000);
|
||||
baseServer.setSoTimeout(60000);
|
||||
baseServer.request(request);
|
||||
|
||||
waitForThingsToLevelOut(15);
|
||||
|
|
Loading…
Reference in New Issue