Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82ECEE501 for ; Sun, 20 Jan 2013 14:35:31 +0000 (UTC) Received: (qmail 58574 invoked by uid 500); 20 Jan 2013 14:35:31 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 58482 invoked by uid 500); 20 Jan 2013 14:35:29 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 58451 invoked by uid 99); 20 Jan 2013 14:35:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jan 2013 14:35:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jan 2013 14:35:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2E02E23889DE; Sun, 20 Jan 2013 14:35:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130120143505.2E02E23889DE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 fetchDocuments = new HashSet(); 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 {