jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/2] jena git commit: arq.update : sync if not transactional.
Date Thu, 31 Dec 2015 11:09:31 GMT
Repository: jena
Updated Branches:
  refs/heads/master 0fdb0f7a3 -> 05b9e3a0c


arq.update : sync if not transactional.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/684cfce2
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/684cfce2
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/684cfce2

Branch: refs/heads/master
Commit: 684cfce2f5f719c4b00d48f83904865a9846b636
Parents: 0fdb0f7
Author: Andy Seaborne <andy@apache.org>
Authored: Wed Dec 30 20:52:37 2015 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Wed Dec 30 20:52:37 2015 +0000

----------------------------------------------------------------------
 jena-arq/src/main/java/arq/update.java          |  4 +++-
 .../java/org/apache/jena/sparql/SystemARQ.java  | 20 ++++++++++++--------
 2 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/684cfce2/jena-arq/src/main/java/arq/update.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/arq/update.java b/jena-arq/src/main/java/arq/update.java
index a1704f5..333d41a 100644
--- a/jena-arq/src/main/java/arq/update.java
+++ b/jena-arq/src/main/java/arq/update.java
@@ -103,7 +103,9 @@ public class update extends CmdUpdate
             }
             finally { transactional.end() ; }
         }
-        SystemARQ.sync(graphStore) ;
+        
+        if ( ! (graphStore instanceof Transactional) )
+            SystemARQ.sync(graphStore) ;
 
         if ( dump )
             RDFDataMgr.write(System.out, graphStore, Lang.NQUADS) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/684cfce2/jena-arq/src/main/java/org/apache/jena/sparql/SystemARQ.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/SystemARQ.java b/jena-arq/src/main/java/org/apache/jena/sparql/SystemARQ.java
index 41a2f95..80c0591 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/SystemARQ.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/SystemARQ.java
@@ -32,6 +32,7 @@ import org.apache.jena.query.Dataset ;
 import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.reasoner.InfGraph ;
 import org.apache.jena.sparql.core.DatasetGraph ;
+import org.apache.jena.sparql.core.GraphView ;
 import org.apache.jena.sparql.graph.GraphWrapper ;
 import org.apache.jena.sparql.mgt.ARQMgt ;
 import org.apache.jena.sparql.mgt.SystemInfo ;
@@ -123,14 +124,17 @@ public class SystemARQ
         }
         else
         {
-            sync(dataset.getDefaultGraph()) ;
-            // Go through each graph.
-            Iterator<Node> iter = Iter.iterator(dataset.listGraphNodes()) ;
-            for ( ; iter.hasNext() ; )
-            {
-                Node n = iter.next();
-                Graph g = dataset.getGraph(n) ;
-                sync(g) ;
+            Graph gDft = dataset.getDefaultGraph() ;
+            if ( ! ( gDft instanceof GraphView ) ) {
+                // GraphView sync the DatasetGraph leading to possible recursion. 
+                sync(gDft) ;
+                // Go through each graph.
+                Iterator<Node> iter = Iter.iterator(dataset.listGraphNodes()) ;
+                for ( ; iter.hasNext() ; ) {
+                    Node n = iter.next();
+                    Graph g = dataset.getGraph(n) ;
+                    sync(g) ;
+                }
             }
         }
     }


Mime
View raw message