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

TieredMergePolicy.getMaxMergedSegmentMB has rounding error

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 7.5, 8.0
    • core/other
    • None
    • New

    Description

      This is largely a test artifact since it's unlikely to show up for realistically sized segments, but the fix is simple and safe.

      This code first does long division then promotes to double for the last calculation.

       return maxMergedSegmentBytes/1024/1024.;
      

      The error can be reproduced with: -Dtests.seed=EF80BCABAD74A7CF

      Attachments

        1. LUCENE-8398.patch
          1 kB
          Erick Erickson
        2. LUCENE-8398.patch
          2 kB
          Erick Erickson

        Activity

          People

            erickerickson Erick Erickson
            erickerickson Erick Erickson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: