You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@epimorphics.com> on 2011/03/25 12:58:19 UTC
Query execution timeout (ARQ, TDB)
I've added mechanism over the query abort system to perform query timeouts.
This is not the only way to abort a running execution - a management
module can call QueryExecution.abort baed on any policy is wants. The
built-in timeout mechanism is for common usage, not fully general query
execution management.
There are two timeout operations:
// Set an overall query timeout.
QueryExecution.setTimeout(long timeout)
// Set two timeouts
// First applies to time-to-first result from WHERE clause.
// Second applies to time-to-end of query after first result.
QueryExecution.setTimeout(long timout1, long timout2)
New SNAPSHOTs for ARQ and TDB built.
This will work well with memory and TDB storage where query processing
is happening in the same JVM so it can see when a timeout causes an
query abort.
Work on QueryEngineHTTP needs to be done.
SDB has not yet been rebuilt with this. The timeout will be occur at
the right moment but no action can be taken until the current database
operation is completed. Sometimes, a SPARQL query is one long-running
SQL query so this mechanism is not effective for this. It requires
per-database changes - patches accepted.
The tests work for me but they do depend on the relationship of the
timeout values used. May need further refinement.
Feedback please - this code needs to be run in various different
conditions to see if it works as required. It does on my development
system but it is also affected by external factors.
JENA-29 is completed for ARQ and TDB.
Andy