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 2011/12/31 02:05:28 UTC
svn commit: r1226004 - in
/lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update:
SolrCmdDistributor.java processor/DistributedUpdateProcessor.java
Author: markrmiller
Date: Sat Dec 31 01:05:28 2011
New Revision: 1226004
URL: http://svn.apache.org/viewvc?rev=1226004&view=rev
Log:
tweak failure reporting to be 'closer to correct'
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=1226004&r1=1226003&r2=1226004&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 Sat Dec 31 01:05:28 2011
@@ -342,8 +342,7 @@ public class SolrCmdDistributor {
pending.add(completionService.submit(task));
}
-
- // TODO: need to consider those that call this with block=false now...
+
void checkResponses(boolean block) {
while (pending != null && pending.size() > 0) {
@@ -360,7 +359,7 @@ public class SolrCmdDistributor {
// if there is a retry url, we want to retry...
// TODO: but we really should only retry on connection errors...
- if (sreq.retries < 5 && sreq.url.checkRetry()) {
+ if (sreq.retries < 10 && sreq.url.checkRetry()) {
sreq.retries++;
sreq.rspCode = 0;
sreq.exception = null;
@@ -368,6 +367,7 @@ public class SolrCmdDistributor {
submit(sreq);
checkResponses(block);
} else {
+ System.out.println("legit error:" + sreq.retries);
Exception e = sreq.exception;
Error error = new Error();
error.e = e;
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=1226004&r1=1226003&r2=1226004&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 Sat Dec 31 01:05:28 2011
@@ -260,7 +260,11 @@ public class DistributedUpdateProcessor
cmdDistrib.finish(urls);
Response response = cmdDistrib.getResponse();
// nocommit - we may need to tell about more than one error...
- if (response.errors.size() > 0) {
+
+ // if its a forward, any fail is a problem -
+ // otherwise we assume things are fine if we got it locally
+ // until we start allowing min replication param
+ if (forwardToLeader && response.errors.size() > 0) {
// nocommit: set first error...?
rsp.setException(response.errors.get(0).e);
} else {