manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1435852 - in /manifoldcf/trunk: connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
Date Sun, 20 Jan 2013 14:35:05 GMT
Author: kwright
Date: Sun Jan 20 14:35:04 2013
New Revision: 1435852

URL: http://svn.apache.org/viewvc?rev=1435852&view=rev
Log:
More fixes related to CONNECTORS-616.

Modified:
    manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java

Modified: manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java?rev=1435852&r1=1435851&r2=1435852&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
(original)
+++ manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Sun Jan 20 14:35:04 2013
@@ -411,7 +411,9 @@ public class HttpPoster
       // to have a bug where it drops the connection when two simultaneous documents come
in
       // at the same time.  This is the final version of Solr 4.0 so we need to deal with
       // this.
-      if (e.getMessage().toLowerCase().indexOf("broken pipe") != -1)
+      if (e.getMessage().toLowerCase(Locale.ROOT).indexOf("broken pipe") != -1 ||
+        e.getMessage().toLowerCase(Locale.ROOT).indexOf("connection reset") != -1 ||
+        e.getMessage().toLowerCase(Locale.ROOT).indexOf("target server failed to respond")
!= -1)
         // Treat it as a service interruption, but with a limited number of retries.
         // In that way we won't burden the user with a huge retry interval; it should
         // give up fairly quickly, and yet NOT give up if the error was merely transient
@@ -784,7 +786,7 @@ public class HttpPoster
               newFieldName = fieldName;
             if (newFieldName.length() > 0)
             {
-              if (newFieldName.toLowerCase().equals(idAttributeName.toLowerCase()))
+              if (newFieldName.toLowerCase(Locale.ROOT).equals(idAttributeName.toLowerCase(Locale.ROOT)))
                 newFieldName = ID_METADATA;
               String[] values = document.getFieldAsStrings(fieldName);
               writeField(out,LITERAL+newFieldName,values);
@@ -827,7 +829,9 @@ public class HttpPoster
             // Broken pipe exceptions we log specially because they usually mean
             // Solr has rejected the document, and the user will want to know that.
             if (e.getCause() != null && e.getCause().getClass().getName().equals("java.net.SocketException")
&&
-              activityDetails.indexOf("broken pipe") != -1)
+              (activityDetails.toLowerCase(Locale.ROOT).indexOf("broken pipe") != -1 ||
+                activityDetails.toLowerCase(Locale.ROOT).indexOf("connection reset") != -1
||
+                activityDetails.toLowerCase(Locale.ROOT).indexOf("target server failed to
respond") != -1))
               activityCode = "SOLR REJECT";
             else
               activityCode = "FAILED";

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java?rev=1435852&r1=1435851&r2=1435852&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
Sun Jan 20 14:35:04 2013
@@ -581,9 +581,6 @@ public class WorkerThread extends Thread
                               deleteList.clear();
                               ArrayList requeueList = new ArrayList();
 
-                              if (e.isAbortOnFail())
-                                abortOnFail = new ManifoldCFException("Repeated service interruptions
- failure processing document"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause());
-
                               Set<String> fetchDocuments = new HashSet<String>();
                               for (int i = 0; i < fetchList.size(); i++)
                               {
@@ -603,6 +600,8 @@ public class WorkerThread extends Thread
                                     if (e.isAbortOnFail())
                                     {
                                       rescanList.add(qd);
+                                      // The job when we are done updating all the tables
+                                      abortOnFail = new ManifoldCFException("Repeated service
interruptions - failure processing document"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause());
                                     }
                                     else
                                     {



Mime
View raw message