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 2012/01/05 01:34:21 UTC
svn commit: r1227413 - in
/lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update:
SolrCmdDistributor.java processor/DistributedUpdateProcessor.java
Author: markrmiller
Date: Thu Jan 5 00:34:21 2012
New Revision: 1227413
URL: http://svn.apache.org/viewvc?rev=1227413&view=rev
Log:
only retry forwards when the URL has actually changed for the retry
Modified:
lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
Modified: lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java?rev=1227413&r1=1227412&r2=1227413&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java (original)
+++ lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java Thu Jan 5 00:34:21 2012
@@ -346,8 +346,7 @@ public class SolrCmdDistributor {
if (sreq.rspCode != 0) {
// error during request
- // if there is a retry url, we want to retry...
- // TODO: but we really should only retry on connection errors...
+ // if there is a retry impl that returns true, we want to retry...
if (sreq.retries < 5 && sreq.node.checkRetry()) {
sreq.retries++;
sreq.rspCode = 0;
Modified: lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1227413&r1=1227412&r2=1227413&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java (original)
+++ lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java Thu Jan 5 00:34:21 2012
@@ -280,11 +280,11 @@ public class DistributedUpdateProcessor
server.request(recoverRequestCmd);
} catch (MalformedURLException e) {
- log.error("", e);
+ log.warn("Problem trying to tell a replica to recover", e);
} catch (SolrServerException e) {
- log.error("", e);
+ log.warn("Problem trying to tell a replica to recover", e);
} catch (IOException e) {
- log.error("", e);
+ log.warn("Problem trying to tell a replica to recover", e);
}
}
}
@@ -733,10 +733,12 @@ public class DistributedUpdateProcessor
Thread.currentThread().interrupt();
return false;
}
-
- this.url = leaderProps.getCoreUrl();
-
- return true;
+ String newUrl = leaderProps.getCoreUrl();
+ if (!this.url.equals(newUrl)) {
+ this.url = newUrl;
+ return true;
+ }
+ return false;
}
}