You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/04/11 21:38:07 UTC

svn commit: r1324942 - /incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterService.java

Author: andy
Date: Wed Apr 11 19:38:07 2012
New Revision: 1324942

URL: http://svn.apache.org/viewvc?rev=1324942&view=rev
Log:
The results iterator was being materialized twice.

Modified:
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterService.java

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterService.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterService.java?rev=1324942&r1=1324941&r2=1324942&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterService.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterService.java Wed Apr 11 19:38:07 2012
@@ -49,9 +49,10 @@ public class QueryIterService extends Qu
         QueryIterator qIter ;
         try {
             qIter = Service.exec((OpService)op, getExecContext().getContext()) ;
-            if ( silent )
-                // Consume now in case of errors in receiving the results.
-                qIter = QueryIter.materialize(qIter, getExecContext()) ;
+            // Materialise, otherwise we may have outstanding incoming data.
+            // Allows the server to fulfil the request as soon as possible.
+            // In extremis, can cause a deadlock when SERVICE loops back to this server.
+            qIter = QueryIter.materialize(qIter, getExecContext()) ;
         } catch (RuntimeException ex)
         {
             if ( silent )
@@ -65,10 +66,6 @@ public class QueryIterService extends Qu
         // Need to put the outerBinding as parent to every binding of the service call.
         // There should be no variables in common because of the OpSubstitute.substitute 
         QueryIterator qIter2 = new QueryIterCommonParent(qIter, outerBinding, getExecContext()) ;
-
-        // Materialise, otherwise we may have outstanding incoming data.
-        // Allows the server to fulfil the request as soon as possible.
-        // In extremis, can cause a deadlock when SERVICE loops back to this server.
-        return QueryIter.materialize(qIter2, getExecContext()) ;
+        return qIter2 ;
     }
 }