Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3054

SorterTemplate.quickSort stack overflows on broken comparators that produce only few disticnt values in large arrays

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.1
    • 3.2, 4.0-ALPHA
    • None
    • None
    • New, Patch Available

    Description

      Looking at Otis's sort problem on the mailing list, he said:

      * looked for other places where this call is made - found it in
      MultiPhraseQuery$MultiPhraseWeight and changed that call from
      ArrayUtil.quickSort to ArrayUtil.mergeSort
      * now we no longer see SorterTemplate.quickSort in deep recursion when we do a
      thread dump
      

      I thought this was interesting because PostingsAndFreq's comparator
      looks like it needs a tiebreaker.

      I think in our sorts we should add some asserts to try to catch some of these broken comparators.

      Attachments

        1. LUCENE-3054-dynamic.patch
          6 kB
          Uwe Schindler
        2. LUCENE-3054.patch
          6 kB
          Uwe Schindler
        3. LUCENE-3054.patch
          6 kB
          Uwe Schindler
        4. LUCENE-3054.patch
          6 kB
          Uwe Schindler
        5. LUCENE-3054.patch
          6 kB
          Uwe Schindler
        6. LUCENE-3054-stackoverflow.patch
          0.9 kB
          Uwe Schindler
        7. LUCENE-3054.patch
          6 kB
          Robert Muir
        8. LUCENE-3054.patch
          2 kB
          Robert Muir

        Activity

          People

            uschindler Uwe Schindler
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: