Lucene - Core
  1. Lucene - Core
  2. LUCENE-2860

SegmentInfo.sizeInBytes ignore includeDocStore when caching

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      I noticed that SegmentInfo's sizeInBytes cache is potentially buggy – it doesn't take into account 'includeDocStores'. I.e., if you call it once w/ 'false' (sizeInBytes won't include the store files) and then with 'true' (or vice versa), you won't get the right sizeInBytes (it won't re-compute, with the store files).

      I'll fix and add a test case demonstrating the bug.

        Activity

        Hide
        Shai Erera added a comment -

        Patch fixes the bug and adds test case.

        Show
        Shai Erera added a comment - Patch fixes the bug and adds test case.
        Hide
        Michael McCandless added a comment -

        Ugh, my bad! Thanks Shai. Patch looks good.

        Show
        Michael McCandless added a comment - Ugh, my bad! Thanks Shai. Patch looks good.
        Hide
        Shai Erera added a comment -

        Committed revision 1058147 (3x).
        Committed revision 1058155 (trunk).

        Show
        Shai Erera added a comment - Committed revision 1058147 (3x). Committed revision 1058155 (trunk).
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1

          People

          • Assignee:
            Shai Erera
            Reporter:
            Shai Erera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development