manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1585924 - /manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Date Wed, 09 Apr 2014 09:56:11 GMT
Author: kwright
Date: Wed Apr  9 09:56:10 2014
New Revision: 1585924

URL: http://svn.apache.org/r1585924
Log:
Handle SocketTimeoutException explicitly.  Part of CONNECTORS-920.

Modified:
    manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.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=1585924&r1=1585923&r2=1585924&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
Wed Apr  9 09:56:10 2014
@@ -435,6 +435,18 @@ public class HttpPoster
         true);
     }
     
+    if (e instanceof java.net.SocketTimeoutException)
+    {
+      String message2 = "Socket timeout exception during "+context+": "+e.getMessage();
+      Logging.ingest.warn(message2,e);
+      throw new ServiceInterruption(message2,
+        e,
+        currentTime + interruptionRetryTime,
+        currentTime + 20L * 60000L,
+        -1,
+        false);
+    }
+      
     if (e.getClass().getName().equals("java.net.SocketException"))
     {
       // In the past we would have treated this as a straight document rejection, and
@@ -465,7 +477,7 @@ public class HttpPoster
       // Other socket exceptions are service interruptions - but if we keep getting them,
it means 
       // that a socket timeout is probably set too low to accept this particular document.
 So
       // we retry for a while, then skip the document.
-      String message2 = "Socket timeout exception during "+context+": "+e.getMessage();
+      String message2 = "Socket exception during "+context+": "+e.getMessage();
       Logging.ingest.warn(message2,e);
       throw new ServiceInterruption(message2,
         e,
@@ -474,7 +486,7 @@ public class HttpPoster
         -1,
         false);
     }
-    
+
     // Otherwise, no idea what the trouble is, so presume that retries might fix it.
     String message3 = "IO exception during "+context+": "+e.getMessage();
     Logging.ingest.warn(message3,e);



Mime
View raw message