Aklakan opened a new issue, #1517:
URL: https://github.com/apache/jena/issues/1517

   ### Version
   
   4.7.0-SNAPSHOT
   
   ### What happened?
   
   Credits to @SimonBin for spotting this issue.
   
   A bug in the class responsible for forming batches from an input iterator 
([RequestScheduler](https://github.com/apache/jena/blob/main/jena-extras/jena-serviceenhancer/src/main/java/org/apache/jena/sparql/service/enhancer/impl/RequestScheduler.java#L58))
 causes bulk requests to become cut off. There is an internal limit which is 
aimed to protect against reading too far ahead into the input iterator when 
forming a batch request but the implementation is flawed.
   
   ```sparql
   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
   PREFIX wd: <http://www.wikidata.org/entity/>
   SELECT ?s ?l {
     # Generate 300+ bindings here such as simply using
     SERVICE <https://query.wikidata.org/sparql> { SELECT DISTINCT ?s { ?s ?p 
?o } LIMIT 400 }
    
     SERVICE <loop:bulk+5:https://query.wikidata.org/sparql> {
       SELECT ?l {
         ?s rdfs:label ?l
         FILTER(langMatches(lang(?l), 'en'))
       } ORDER BY ?l LIMIT 1
     }
   }
   ```
   
   ### Relevant output and stacktrace
   
   _No response_
   
   ### Are you interested in making a pull request?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to