manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1636397 - in /manifoldcf/branches/release-1.7-branch: ./ CHANGES.txt framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Date Mon, 03 Nov 2014 17:10:02 GMT
Author: kwright
Date: Mon Nov  3 17:10:01 2014
New Revision: 1636397

URL: http://svn.apache.org/r1636397
Log:
Pull up fixes for CONNECTORS-1092 from dev_1x branch

Modified:
    manifoldcf/branches/release-1.7-branch/   (props changed)
    manifoldcf/branches/release-1.7-branch/CHANGES.txt
    manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java

Propchange: manifoldcf/branches/release-1.7-branch/
------------------------------------------------------------------------------
  Merged /manifoldcf/branches/dev_1x:r1636335
  Merged /manifoldcf/trunk:r1636334

Modified: manifoldcf/branches/release-1.7-branch/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.7-branch/CHANGES.txt?rev=1636397&r1=1636396&r2=1636397&view=diff
==============================================================================
--- manifoldcf/branches/release-1.7-branch/CHANGES.txt (original)
+++ manifoldcf/branches/release-1.7-branch/CHANGES.txt Mon Nov  3 17:10:01 2014
@@ -4,6 +4,12 @@ $Id$
 
 ======================= Release 1.7.2 =====================
 
+CONNECTORS-1092: Error in log during load tests.
+(Karl Wright)
+
+CONNECTORS-1091: On job start, reprioritize documents.
+(Karl Wright)
+
 CONNECTORS-1090: More PostgreSQL performance improvements.
 (Karl Wright)
 

Modified: manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1636397&r1=1636396&r2=1636397&view=diff
==============================================================================
--- manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
(original)
+++ manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Mon Nov  3 17:10:01 2014
@@ -707,30 +707,46 @@ public class JobManager implements IJobM
   public void assessMarkedJobs()
     throws ManifoldCFException
   {
-    database.beginTransaction();
-    try
-    {
-      // Query for all jobs marked "ASSESSMENT_UNKNOWN".
-      jobs.assessMarkedJobs();
-    }
-    catch (ManifoldCFException e)
-    {
-      database.signalRollback();
-      throw e;
-    }
-    catch (RuntimeException e)
-    {
-      database.signalRollback();
-      throw e;
-    }
-    catch (Error e)
-    {
-      database.signalRollback();
-      throw e;
-    }
-    finally
+    while (true)
     {
-      database.endTransaction();
+      long sleepAmt = 0L;
+      database.beginTransaction();
+      try
+      {
+        // Query for all jobs marked "ASSESSMENT_UNKNOWN".
+        jobs.assessMarkedJobs();
+        database.performCommit();
+        break;
+      }
+      catch (ManifoldCFException e)
+      {
+        database.signalRollback();
+        if (e.getErrorCode() == e.DATABASE_TRANSACTION_ABORT)
+        {
+          if (Logging.perf.isDebugEnabled())
+            Logging.perf.debug("Aborted transaction assessing jobs: "+e.getMessage());
+          sleepAmt = getRandomAmount();
+          continue;
+        }
+        throw e;
+      }
+      catch (RuntimeException e)
+      {
+        database.signalRollback();
+        TrackerClass.noteRollback();
+        throw e;
+      }
+      catch (Error e)
+      {
+        database.signalRollback();
+        TrackerClass.noteRollback();
+        throw e;
+      }
+      finally
+      {
+        database.endTransaction();
+        sleepFor(sleepAmt);
+      }
     }
   }
 
@@ -951,6 +967,12 @@ public class JobManager implements IJobM
         }
         throw e;
       }
+      catch (RuntimeException e)
+      {
+        database.signalRollback();
+        TrackerClass.noteRollback();
+        throw e;
+      }
       catch (Error e)
       {
         database.signalRollback();



Mime
View raw message