[
https://issues.apache.org/jira/browse/JENA-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15382268#comment-15382268
]
christopher james dollin commented on JENA-1212:
------------------------------------------------
The cancel request can be sneaked into the sort by
way of the comparator and adding an instance
variable `cancelled` to SortedDataBag, set `true`
from QueryIterSort.requestCancel(). The comparator
checks `cancelled` and if it has become `true`
throws an exception, which is then caught outside
the call to Arrays.sort(), abandoning the sort.
Pull Request to follow.
> allow ORDER BY sort to be cancelled
> -----------------------------------
>
> Key: JENA-1212
> URL: https://issues.apache.org/jira/browse/JENA-1212
> Project: Apache Jena
> Issue Type: Improvement
> Components: ARQ
> Reporter: christopher james dollin
> Priority: Minor
> Fix For: Jena 3.1.1
>
>
> When a query with an ORDER BY is cancelled, the component
> Arrays.sort() that sorts the chunk(s) of the result
> bindings runs to completion before the cancel finishes.
> [See QueryIterSort and SortedDataBag.]
> For a large result set, this results in a long wait
> before the cancelled request finally finishes. This
> can be inconvenient.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)