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

TieredMergePolicy.getFloorSegmentMB returns the wrong value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.2
    • 3.6.1, 4.0-BETA, 6.0
    • None
    • None
    • New

    Description

      public double getFloorSegmentMB() {
        return floorSegmentBytes/1024*1024.;
      }
      

      This is clearly wrong. It should be either "/1024/1024." or "/(1024*1024.)". As written, the / and * operations offset, so the value gets returned in bytes. The merge policy itself uses the value directly rather than calling this getter, so only the return value itself is wrong.

      Attachments

        Activity

          People

            mikemccand Michael McCandless
            cfuller@atlassian.com Chris Fuller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: