Lucene - Core
  1. Lucene - Core
  2. LUCENE-4022

Offline Sorter wrongly uses MIN_BUFFER_SIZE if there is more memory available

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.6, 4.0-ALPHA
    • Fix Version/s: 4.0-ALPHA, 3.6.1
    • Component/s: modules/spellchecker
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      The Sorter we use for offline sorting seems to use the MIN_BUFFER_SIZE as a upper bound even if there is more memory available. See this snippet:

      long half = free/2;
      if (half >= ABSOLUTE_MIN_SORT_BUFFER_SIZE) { 
        return new BufferSize(Math.min(MIN_BUFFER_SIZE_MB * MB, half));
      }
            
      // by max mem (heap will grow)
      half = (max - total) / 2;
      return new BufferSize(Math.min(MIN_BUFFER_SIZE_MB * MB, half));
      

      use use use Math.max instead of min here.

      1. LUCENE-4022.patch
        3 kB
        Simon Willnauer

        Activity

          People

          • Assignee:
            Simon Willnauer
            Reporter:
            Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development