Aklakan commented on issue #3044:
URL: https://github.com/apache/jena/issues/3044#issuecomment-2701831446

   So I can reproduce timeouts being ignored on property paths, such as this 
one on a dbpedia dataset (lots of labels):
   
   ```sparql
   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
   SELECT ?x { ?x rdfs:label/rdfs:label ?z }
   ```
   
   ```bash
   time curl http://localhost:3030/ds --data-urlencode 'query=PREFIX rdfs: 
<http://www.w3.org/2000/01/rdf-schema#> SELECT ?x { ?x rdfs:label/rdfs:label ?z 
}' --data-urlencode 'timeout=1'
   ```
   
   I have not analyzed property paths further.
   
   
   I can also reproduce a similar (perhaps the same) problem with this query:
   ```sparql
   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
   SELECT ?x {
     ?x rdfs:label ?o
       { ?x rdfs:label ?z }
     UNION
       { BIND("hi" AS ?s) }
   }
   ```
   
   The problem is synchronization:
   
   The timeout fires and tries to abort, but doesn't get the lock:
   
   
https://github.com/apache/jena/blob/6a86b5d1869c575142391e3e8bcc8f00f1a75132/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L364-L367
   
   The lock is acquired here:
   
   
https://github.com/apache/jena/blob/6a86b5d1869c575142391e3e8bcc8f00f1a75132/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L438-L445
   
   
   And while the lock is held `QueryExecDataset.startQueryIteratorActual` 
executes a hash join eagerly - so the timeout does not get through:
   
   
https://github.com/apache/jena/blob/6a86b5d1869c575142391e3e8bcc8f00f1a75132/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L472-L475
   
   


-- 
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