Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-5986

Don't allow runaway queries from harming Solr cluster health or search performance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 5.0
    • search
    • None

    Description

      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: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200903.mbox/%3C856ac15f0903272054q2dbdbd19kea3c5ba9e105b9d8@mail.gmail.com%3E

      Attachments

        1. SOLR-5986-fixtests.patch
          13 kB
          Anshum Gupta
        2. SOLR-5986-fixtests.patch
          2 kB
          Anshum Gupta
        3. SOLR-5986-fixtests.patch
          3 kB
          Anshum Gupta
        4. SOLR-5986.patch
          58 kB
          Anshum Gupta
        5. SOLR-5986.patch
          59 kB
          Steven Rowe
        6. SOLR-5986.patch
          47 kB
          Anshum Gupta
        7. SOLR-5986.patch
          47 kB
          Anshum Gupta
        8. SOLR-5986.patch
          36 kB
          Anshum Gupta
        9. SOLR-5986.patch
          40 kB
          Anshum Gupta
        10. SOLR-5986.patch
          40 kB
          Anshum Gupta
        11. SOLR-5986.patch
          39 kB
          Anshum Gupta
        12. SOLR-5986.patch
          20 kB
          Anshum Gupta
        13. SOLR-5986.patch
          23 kB
          Anshum Gupta
        14. SOLR-5986.patch
          24 kB
          Anshum Gupta
        15. SOLR-5986.patch
          22 kB
          Anshum Gupta

        Issue Links

          Activity

            People

              anshum Anshum Gupta
              sdavids Steve Davids
              Votes:
              3 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: