manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1676096 - in /manifoldcf/branches/release-2.1-branch: ./ CHANGES.txt framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Date Sun, 26 Apr 2015 10:29:33 GMT
Author: kwright
Date: Sun Apr 26 10:29:33 2015
New Revision: 1676096

URL: http://svn.apache.org/r1676096
Log:
Pull up fix for CONNECTORS-1191 from trunk

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

Propchange: manifoldcf/branches/release-2.1-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Apr 26 10:29:33 2015
@@ -125,4 +125,4 @@
 /manifoldcf/branches/CONNECTORS-981:1605049-1605773
 /manifoldcf/branches/CONNECTORS-989:1611600-1612101
 /manifoldcf/branches/CONNECTORS-990:1610284-1610707
-/manifoldcf/trunk:1673722,1675781,1675898
+/manifoldcf/trunk:1673722,1675781,1675898,1676094

Modified: manifoldcf/branches/release-2.1-branch/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.1-branch/CHANGES.txt?rev=1676096&r1=1676095&r2=1676096&view=diff
==============================================================================
--- manifoldcf/branches/release-2.1-branch/CHANGES.txt (original)
+++ manifoldcf/branches/release-2.1-branch/CHANGES.txt Sun Apr 26 10:29:33 2015
@@ -3,6 +3,11 @@ $Id$
 
 ======================= Release 2.1 =====================
 
+CONNECTORS-1191: Unexpected job status 34, due to a race condition.
+Jobs shutting down and being aborted at the same time could wind up
+in a state where repeated exceptions would be thrown.
+(Arcadius Ahouansou, Karl Wright)
+
 CONNECTORS-1190: Broken dependencies in solr connector maven build
 caused tests to fail under maven.
 (Piergiorgio Lucidi, Karl Wright)

Modified: manifoldcf/branches/release-2.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1676096&r1=1676095&r2=1676096&view=diff
==============================================================================
--- manifoldcf/branches/release-2.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
(original)
+++ manifoldcf/branches/release-2.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Sun Apr 26 10:29:33 2015
@@ -39,7 +39,6 @@ public class JobManager implements IJobM
   protected static final String cleanStufferLock = "_CLEANSTUFFER_";
   protected static final String jobStopLock = "_JOBSTOP_";
   protected static final String jobResumeLock = "_JOBRESUME_";
-  protected static final String jobResetLock = "_JOBRESET_";
   protected static final String hopLock = "_HOPLOCK_";
 
   // Member variables
@@ -8339,7 +8338,9 @@ public class JobManager implements IJobM
   {
     // Alternative to using a write lock here: Put this in a transaction, with a "FOR UPDATE"
on the first query.
     // I think that still causes way too much locking, though, on some databases.
-    lockManager.enterWriteLock(jobResetLock);
+    // Note well: This MUST be the same lock as for finishStopJobs, since ABORTINGSHUTTINGDOWN
is handled
+    // by one and SHUTTINGDOWN is handled by the other.  CONNECTORS-1191.
+    lockManager.enterWriteLock(jobStopLock);
     try
     {
       // Query for all jobs that fulfill the criteria
@@ -8417,7 +8418,7 @@ public class JobManager implements IJobM
     }
     finally
     {
-      lockManager.leaveWriteLock(jobResetLock);
+      lockManager.leaveWriteLock(jobStopLock);
     }
   }
 



Mime
View raw message