Lucene - Core
  1. Lucene - Core
  2. LUCENE-4222

TieredMergePolicy.getFloorSegmentMB returns the wrong value

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial 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.

        Activity

        Hide
        Michael McCandless added a comment -

        Nice catch Chris, I'll commit shortly!

        Show
        Michael McCandless added a comment - Nice catch Chris, I'll commit shortly!
        Hide
        Michael McCandless added a comment -

        Thanks Chris!

        Show
        Michael McCandless added a comment - Thanks Chris!
        Hide
        Uwe Schindler added a comment -

        Mike, can you please backport this one?

        Show
        Uwe Schindler added a comment - Mike, can you please backport this one?
        Hide
        Michael McCandless added a comment -

        Sure, I just committed rev 1362113.

        Show
        Michael McCandless added a comment - Sure, I just committed rev 1362113.
        Hide
        Uwe Schindler added a comment -

        Bulk close for 3.6.1

        Show
        Uwe Schindler added a comment - Bulk close for 3.6.1

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Chris Fuller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development