-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Timeout on Updates #2821
Comments
As a sidenote, neither QueryProcessor nor UpdateExec currently provide an I'd say having the cancel signal (and contexts) correctly wired up is a first step (as proposed in this issues' corresponding PR), and further changes could be added in future PRs. |
Version
5.3.0-SNAPSHOT
What happened?
The cancel signal in QueryExecDataset is only placed into the context when a timeout is configured.
However, in the case of manual invocations to
QueryExec.abort()
the cancel signal is not placed into the context.This prevents functions to check the flag and possibly abort prematurely.
A use case is the query which uses the GeoSPARQL property function, which creates a cross product between all geometries (inside the property function) and returns all overlapping ones. @LorenzBuehmann has been working on a revised version that respects the cancel flag, however he noted that the flag is only available when timeouts have been configured, making it impossible to cancel externally using
QueryExec.abort();
Update: This issue started out with the cancel signal not always placed into an query execution's context, which prevented handling cancellation inside of functions and property functions after a manual abort via
QueryExec.abort()
. However, while working on this issue, it turned out that it is reasonable to extend the scope of this issue to make it possible to abort update executions viaupdateExec.abort()
.The reason is, that update executions reuse the query execution machinery, but the context configured for the the update request was not forwarded to the query execution. This would e.g. cause custom functions registered with the update execution's context to not be available during query execution. While working on resolving this issue, I revised the update execution machinery to properly set up the context with the cancel signal, configure remaining query timeouts and introduce an
updateExec.abort()
method.On large datasets, using the query above as the core to materialize spatial intersections between all pairs of geometries may run indefinitely, and it is useful to protect e.g. a Fuseki server against accidental long running updates with a timeout.
Relevant output and stacktrace
No response
Are you interested in making a pull request?
Yes
The text was updated successfully, but these errors were encountered: