You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Rahul Goswami <ra...@gmail.com> on 2022/05/03 03:56:22 UTC

Re: Stop a long running query

Hi Mikhail,
Since the timeAllowed parameter would cause partial results to return, the
response may not be a correct one. In certain scenarios, it might be better
to return a failure rather than partial results.

Also, a query may spend more time in faceting than in the query phase.
Since the timeAllowed parameter is only checked in the query expansion and
doc collection phase, it does not intercept faceting, causing it to
continue running and consume resources when terminating the query might be
a better option.

Hope that helps elaborate my requirement (?)

Thanks,
Rahul

On Fri, Apr 29, 2022 at 8:25 AM Mikhail Khludnev <mk...@apache.org> wrote:

> Hello, Rahul.
> I probably not fully get what you expect, but curiously I believe that
> timeAllowed does what you expect.
> Just clarify your context, please.
>
> On Fri, Apr 29, 2022 at 12:22 AM Rahul Goswami <ra...@gmail.com>
> wrote:
>
> > Hello,
> > I am using Solr 7.7.2. Is it possible to stop a long running request ?
> > Using the "timeAllowed" parameter would return partial results, but I
> want
> > the query to outright terminate and ideally throw an exception so as to
> not
> > utilize additional resources.
> >
> > Thanks,
> > Rahul
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Re: Stop a long running query

Posted by Mikhail Khludnev <mk...@apache.org>.
Hello, Rahul.
Well, if facets are counted over docvalues or method=enum and hit directory
I/O and abandoned by ExitableDirectoryOrSomtehing.  see
CloudExitableDirectoryReaderTest.
If this resolution is not enough one can extend FacetComponent and check
timeAllowed inside the routine.
The first statement isn't really reasonable to me - let;s say a request
proceeded about %50 and got some results when timeAllowed exceeded. At this
time, no matter if it responds with half backed results or with just an
exception flag. Resources were already spent for calculation.

On Tue, May 3, 2022 at 6:56 AM Rahul Goswami <ra...@gmail.com> wrote:

> Hi Mikhail,
> Since the timeAllowed parameter would cause partial results to return, the
> response may not be a correct one. In certain scenarios, it might be better
> to return a failure rather than partial results.
>
> Also, a query may spend more time in faceting than in the query phase.
> Since the timeAllowed parameter is only checked in the query expansion and
> doc collection phase, it does not intercept faceting, causing it to
> continue running and consume resources when terminating the query might be
> a better option.
>
> Hope that helps elaborate my requirement (?)
>
> Thanks,
> Rahul
>
> On Fri, Apr 29, 2022 at 8:25 AM Mikhail Khludnev <mk...@apache.org> wrote:
>
> > Hello, Rahul.
> > I probably not fully get what you expect, but curiously I believe that
> > timeAllowed does what you expect.
> > Just clarify your context, please.
> >
> > On Fri, Apr 29, 2022 at 12:22 AM Rahul Goswami <ra...@gmail.com>
> > wrote:
> >
> > > Hello,
> > > I am using Solr 7.7.2. Is it possible to stop a long running request ?
> > > Using the "timeAllowed" parameter would return partial results, but I
> > want
> > > the query to outright terminate and ideally throw an exception so as to
> > not
> > > utilize additional resources.
> > >
> > > Thanks,
> > > Rahul
> > >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> >
>


-- 
Sincerely yours
Mikhail Khludnev