Andy Seaborne created JENA-2141:
-----------------------------------

             Summary: Query timeout may not be seen if during execution 
initialization.
                 Key: JENA-2141
                 URL: https://issues.apache.org/jira/browse/JENA-2141
             Project: Apache Jena
          Issue Type: Bug
          Components: ARQ
    Affects Versions: Jena 4.1.0
            Reporter: Andy Seaborne
            Assignee: Andy Seaborne


This follows on from Jena-2139. It is the more general case.

This is query 1 from the [report from: Cristóbal Miranda on 
users@|https://lists.apache.org/thread.html/r410953678c75caef6e2391081f881b96a9c648ee77ef9aa3748feda9%40%3Cusers.jena.apache.org%3E].

Query cancellation happens when an async timeout call {{queryIterator.abort}} 
in QueryExecutionBase.

But {{queryIterator}} is only set after the execution tree of iterators has 
been built, bottom-up.
If building takes a long time, the timeout callback can not call {{.abort}}.

The code needs to have a flag setup so it can be set at any time.

The mechanism added in Jena-2139, and similar code in {{QueryIterSort}}, 
{{QueryIterGroup}} and {{QueryIterTopN}}, which uses delayed initialization is 
better when this is possible. However, sometimes it is not easy to know when in 
the initialization phase.

One possibility is adding this to the {{ExecutionContext}}which exists and is 
passed to all query iterators during the setup phase.
 
{{QueryExecutionBase}} is being renamed as {{QueryExecDataset}} in 
[PR#1003|https://github.com/apache/jena/pull/1030]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to