manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1562599 - in /manifoldcf/branches/release-1.5-branch: ./ CHANGES.txt build.xml connectors/solr/build.xml connectors/solr/pom.xml framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java pom.xml
Date Wed, 29 Jan 2014 21:24:03 GMT
Author: kwright
Date: Wed Jan 29 21:24:02 2014
New Revision: 1562599

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

Modified:
    manifoldcf/branches/release-1.5-branch/   (props changed)
    manifoldcf/branches/release-1.5-branch/CHANGES.txt
    manifoldcf/branches/release-1.5-branch/build.xml
    manifoldcf/branches/release-1.5-branch/connectors/solr/build.xml
    manifoldcf/branches/release-1.5-branch/connectors/solr/pom.xml
    manifoldcf/branches/release-1.5-branch/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java
    manifoldcf/branches/release-1.5-branch/pom.xml

Propchange: manifoldcf/branches/release-1.5-branch/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk:r1562494-1562495

Modified: manifoldcf/branches/release-1.5-branch/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/CHANGES.txt?rev=1562599&r1=1562598&r2=1562599&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/CHANGES.txt (original)
+++ manifoldcf/branches/release-1.5-branch/CHANGES.txt Wed Jan 29 21:24:02 2014
@@ -4,6 +4,10 @@ $Id$
 
 ======================= Release 1.5 =====================
 
+CONNECTORS-873: SolrCloud now depends on noggit; include this in the
+build and dependencies.
+(Alessandro Benedetti, Karl Wright)
+
 CONNECTORS-871: Fix versions caused by the commit for CONNECTORS-833.
 (David Morana, Karl Wright)
 

Modified: manifoldcf/branches/release-1.5-branch/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/build.xml?rev=1562599&r1=1562598&r2=1562599&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/build.xml (original)
+++ manifoldcf/branches/release-1.5-branch/build.xml Wed Jan 29 21:24:02 2014
@@ -4274,8 +4274,15 @@ Use Apache Forrest version forrest-0.9-d
             <param name="artifact-name" value="solr-solrj"/>
             <param name="artifact-type" value="jar"/>
         </antcall>
+        <antcall target="download-via-maven">
+            <param name="target" value="lib"/>
+            <param name="project-path" value="org/noggit"/>
+            <param name="artifact-version" value="0.5"/>
+            <param name="artifact-name" value="noggit"/>
+            <param name="artifact-type" value="jar"/>
+        </antcall>
     </target>
-    
+
     <target name="download-zookeeper">
         <mkdir dir="lib"/>
         <antcall target="download-via-maven">

Modified: manifoldcf/branches/release-1.5-branch/connectors/solr/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/connectors/solr/build.xml?rev=1562599&r1=1562598&r2=1562599&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/connectors/solr/build.xml (original)
+++ manifoldcf/branches/release-1.5-branch/connectors/solr/build.xml Wed Jan 29 21:24:02 2014
@@ -23,6 +23,7 @@
         <path refid="mcf-connector-build.connector-classpath"/>
         <fileset dir="../../lib">
             <include name="solr-solrj*.jar"/>
+            <include name="noggit*.jar"/>
             <include name="httpmime*.jar"/>
             <include name="wstx-asl*.jar"/>
             <include name="jcl-over-slf4j*.jar"/>
@@ -34,6 +35,7 @@
         <copy todir="dist/lib">
             <fileset dir="../../lib">
                 <include name="solr-solrj*.jar"/>
+                <include name="noggit*.jar"/>
                 <include name="httpmime*.jar"/>
                 <include name="wstx-asl*.jar"/>
                 <include name="jcl-over-slf4j*.jar"/>

Modified: manifoldcf/branches/release-1.5-branch/connectors/solr/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/connectors/solr/pom.xml?rev=1562599&r1=1562598&r2=1562599&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/connectors/solr/pom.xml (original)
+++ manifoldcf/branches/release-1.5-branch/connectors/solr/pom.xml Wed Jan 29 21:24:02 2014
@@ -92,6 +92,11 @@
       <version>${solr.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.noggit</groupId>
+      <artifactId>noggit</artifactId>
+      <version>${noggit.version}</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.zookeeper</groupId>
       <artifactId>zookeeper</artifactId>
       <version>${zookeeper.version}</version>

Modified: manifoldcf/branches/release-1.5-branch/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java?rev=1562599&r1=1562598&r2=1562599&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java
(original)
+++ manifoldcf/branches/release-1.5-branch/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java
Wed Jan 29 21:24:02 2014
@@ -453,9 +453,33 @@ public class Throttler
           if (bin != null)
           {
             // Reserve a slot
-            int result = bin.waitConnectionAvailable(poolCount);
-            if (result == IConnectionThrottler.CONNECTION_FROM_NOWHERE ||
-              (currentRecommendation != IConnectionThrottler.CONNECTION_FROM_NOWHERE &&
currentRecommendation != result))
+            int result;
+            try
+            {
+              result = bin.waitConnectionAvailable(poolCount);
+            }
+            catch (Throwable e)
+            {
+              while (i > 0)
+              {
+                i--;
+                binName = binNames[i];
+                synchronized (connectionBins)
+                {
+                  bin = connectionBins.get(binName);
+                }
+                if (bin != null)
+                  bin.undoReservation(currentRecommendation, poolCount);
+              }
+              if (e instanceof InterruptedException)
+                throw (InterruptedException)e;
+              if (e instanceof Error)
+                throw (Error)e;
+              if (e instanceof RuntimeException)
+                throw (RuntimeException)e;
+              throw new RuntimeException("Unexpected exception of type '"+e.getClass().getName()+"':
"+e.getMessage(),e);
+            }
+            if (result == IConnectionThrottler.CONNECTION_FROM_NOWHERE)
             {
               // Release previous reservations, and either return, or retry
               while (i > 0)
@@ -469,12 +493,30 @@ public class Throttler
                 if (bin != null)
                   bin.undoReservation(currentRecommendation, poolCount);
               }
-              if (result == IConnectionThrottler.CONNECTION_FROM_NOWHERE)
-                return result;
+              return result;
+            }
+
+            if (currentRecommendation != IConnectionThrottler.CONNECTION_FROM_NOWHERE &&
currentRecommendation != result)
+            {
+              // Release all previous reservations, including this one, and either return,
or retry
+              bin.undoReservation(result, poolCount);
+              while (i > 0)
+              {
+                i--;
+                binName = binNames[i];
+                synchronized (connectionBins)
+                {
+                  bin = connectionBins.get(binName);
+                }
+                if (bin != null)
+                  bin.undoReservation(currentRecommendation, poolCount);
+              }
+
               // Break out of the outer loop so we can retry
               retry = true;
               break;
             }
+
             if (currentRecommendation == IConnectionThrottler.CONNECTION_FROM_NOWHERE)
               currentRecommendation = result;
           }

Modified: manifoldcf/branches/release-1.5-branch/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/pom.xml?rev=1562599&r1=1562598&r2=1562599&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/pom.xml (original)
+++ manifoldcf/branches/release-1.5-branch/pom.xml Wed Jan 29 21:24:02 2014
@@ -52,6 +52,7 @@
     <httpcomponent.httpcore.version>4.2.5</httpcomponent.httpcore.version>
     <httpcomponent.httpmime.version>4.2.6</httpcomponent.httpmime.version>
     <solr.version>4.6.0</solr.version>
+    <noggit.version>0.5</noggit.version>
     <commons-el.version>1.0</commons-el.version>
     <commons-lang.version>2.6</commons-lang.version>
     <xalan.version>2.7.1</xalan.version>



Mime
View raw message