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

TieredMergePolicy.getFloorSegmentMB returns the wrong value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.6.1, 4.0-BETA, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: