On 8/25/2015 3:18 AM, Modassar Ather wrote:
> Kindly help me understand the query time allowed attribute. The following
> is set in solrconfig.xml.
> <int name="timeAllowed">300000</int>
>
> Does this setting stop the query from running after the timeAllowed is
> reached? If not is there a way to stop it as it will occupy resources in
> background for no benefit.

That is certainly the *goal* of timeAllowed ... but mostly it serves as
a way to try and offer a guarantee that a query will not take longer
than a certain amount of time, so your user application will receive a
response, which might be an error or negative response, within that
stated timeframe.  Multithreaded programming is tricky in the best
circumstances.  If you introduce the idea of killing threads into the
mix, it becomes REALLY complicated.  I would not be very surprised to
learn that parts of the query which run in parallel, such as the filter
queries, continue to run in the background and populate caches even if
the user query has been aborted because of timeAllowed.

You could open a feature request issue in Jira, but I suspect that
aborting *everything* for timeAllowed is a really hard problem that
nobody wants to tackle.  If you can figure out how to solve it, your
patch will be reviewed and possibly committed.

Thanks,
Shawn

Reply via email to