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

TieredMergePolicy.getMaxMergedSegmentMB has rounding error

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5, 8.0
    • Component/s: core/other
    • Labels:
      None
    • Lucene Fields:
      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
          2 kB
          Erick Erickson
        2. LUCENE-8398.patch
          1 kB
          Erick Erickson

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: