lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Cariens (JIRA)" <>
Subject [jira] [Commented] (SOLR-5986) Don't allow runaway queries from harming Solr cluster health or search performance
Date Fri, 12 Sep 2014 15:42:35 GMT


Rich Cariens commented on SOLR-5986:

How does the group feel about adding interruption hooks into the ExitableTermsEnum.checkAndThrow()
method? Something like:

    private void checkAndThrow() {
      if (QueryTimeout.shouldExit()) {
        throw new ExitingReaderException("The request took too long to iterate over terms.");
      } else if (Thread.interrupted()) {
        throw new ExitingReaderException("Interrupted while iterating over terms.");

Seems like this would expose another handy hook into the query life-cycle.

> Don't allow runaway queries from harming Solr cluster health or search performance
> ----------------------------------------------------------------------------------
>                 Key: SOLR-5986
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Steve Davids
>            Assignee: Anshum Gupta
>            Priority: Critical
>             Fix For: 4.10
>         Attachments: SOLR-5986.patch, SOLR-5986.patch, SOLR-5986.patch, SOLR-5986.patch
> The intent of this ticket is to have all distributed search requests stop wasting CPU
cycles on requests that have already timed out or are so complicated that they won't be able
to execute. We have come across a case where a nasty wildcard query within a proximity clause
was causing the cluster to enumerate terms for hours even though the query timeout was set
to minutes. This caused a noticeable slowdown within the system which made us restart the
replicas that happened to service that one request, the worst case scenario are users with
a relatively low zk timeout value will have nodes start dropping from the cluster due to long
GC pauses.
> [~amccurry] Built a mechanism into Apache Blur to help with the issue in BLUR-142 (see
commit comment for code, though look at the latest code on the trunk for newer bug fixes).
> Solr should be able to either prevent these problematic queries from running by some
heuristic (possibly estimated size of heap usage) or be able to execute a thread interrupt
on all query threads once the time threshold is met. This issue mirrors what others have discussed
on the mailing list:

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message