SOLR-3869: A PeerSync attempt to it's replicas by a candidate leader should not fail on o.a.http.conn.ConnectTimeoutException.

Also turn on the use of jetty test mode with sys prop that was no longer being used - this improves the situation when we restart jetty. Both of these fixes should help our FreeBSD continuous build.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1389160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-09-23 22:58:40 +00:00
parent f025322f81
commit c656ba11bf
3 changed files with 7 additions and 1 deletions

View File

@ -337,6 +337,9 @@ Bug Fixes
* SOLR-3783: Fixed Pivot Faceting to work with facet.missing=true (hossman)
* SOLR-3869: A PeerSync attempt to it's replicas by a candidate leader should
not fail on o.a.http.conn.ConnectTimeoutException. (Mark Miller)
Other Changes
----------------------

View File

@ -28,6 +28,7 @@ import java.util.Set;
import org.apache.http.NoHttpResponseException;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpClientUtil;
@ -299,7 +300,7 @@ public class PeerSync {
if (cantReachIsSuccess && sreq.purpose == 1 && srsp.getException() instanceof SolrServerException) {
Throwable solrException = ((SolrServerException) srsp.getException())
.getRootCause();
if (solrException instanceof ConnectException
if (solrException instanceof ConnectException || solrException instanceof ConnectTimeoutException
|| solrException instanceof NoHttpResponseException) {
log.warn(msg() + " couldn't connect to " + srsp.getShardAddress() + ", counting as success");

View File

@ -81,6 +81,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
@BeforeClass
@SuppressWarnings("unused")
private static void beforeClass() {
System.setProperty("jetty.testMode", "true");
setupLogging();
startTrackingSearchers();
startTrackingZkClients();
@ -95,6 +96,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
endTrackingSearchers();
endTrackingZkClients();
resetFactory();
System.clearProperty("jetty.testMode");
}
private static boolean changedFactory = false;