manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1640925 - in /manifoldcf/trunk: CHANGES.txt framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
Date Fri, 21 Nov 2014 14:53:04 GMT
Author: kwright
Date: Fri Nov 21 14:53:04 2014
New Revision: 1640925

URL: http://svn.apache.org/r1640925
Log:
Fix for CONNECTORS-1110.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1640925&r1=1640924&r2=1640925&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Nov 21 14:53:04 2014
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 2.0-dev =====================
 
+CONNECTORS-1110: Component documents getting deleted wrongly
+when additional components added.
+(Markus Schuch, Karl Wright)
+
 CONNECTORS-1109: Bad cache key for JDBC authority.
 (Alejandro Calbazana, Karl Wright)
 

Modified: manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java?rev=1640925&r1=1640924&r2=1640925&view=diff
==============================================================================
--- manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
(original)
+++ manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
Fri Nov 21 14:53:04 2014
@@ -3342,9 +3342,21 @@ public class IncrementalIngester extends
         {
           // See what uri was used before for this doc, if any
           ArrayList list = new ArrayList();
-          String query = buildConjunctionClause(list,new ClauseDescription[]{
-            new UnitaryClause(docKeyField,docKey),
-            new UnitaryClause(outputConnNameField,outputConnectionName)});
+          String query;
+          if (componentHash == null || componentHash.length() == 0)
+          {
+            query = buildConjunctionClause(list,new ClauseDescription[]{
+              new UnitaryClause(docKeyField,docKey),
+              new UnitaryClause(outputConnNameField,outputConnectionName),
+              new NullCheckClause(componentHashField,true)});
+          }
+          else
+          {
+            query = buildConjunctionClause(list,new ClauseDescription[]{
+              new UnitaryClause(docKeyField,docKey),
+              new UnitaryClause(outputConnNameField,outputConnectionName),
+              new UnitaryClause(componentHashField,componentHash)});
+          }
             
           IResultSet set = performQuery("SELECT "+docURIField+","+uriHashField+","+lastOutputVersionField+"
FROM "+getTableName()+
             " WHERE "+query,list,null,null);



Mime
View raw message