Lucene - Core
  1. Lucene - Core
  2. LUCENE-3143

SegmentMerger should assert .del and .s* files are not passed to createCompoundFile

    Details

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

      Description

      Spinoff from LUCENE-3126. SegmentMerger.createCompoundFile does not document that it should not receive files that are not included in the .cfs, such as .del and .s* (separate norms). Today, that method is called from code which ensures that, but we should:

      1. Add some documentation to clarify that.
      2. Add some asserts so that if a test (or other code, running w/ -ea) does that, we catch it.

      Will post a patch soon

        Activity

        Hide
        Shai Erera added a comment -

        Patch against 3x, adds asserts to SM + test to ensure they are not allowed. All core tests pass.

        Show
        Shai Erera added a comment - Patch against 3x, adds asserts to SM + test to ensure they are not allowed. All core tests pass.
        Hide
        Michael McCandless added a comment -

        Looks good!

        Maybe sharpen the comment to something like: this method creates a compound file for all files returned by info.files(). While, generally, this may include separate norms and deletion files, this SegmentInfo must not reference such files when this method is called, because they are not allowed within a compound file. Something like that...?

        Show
        Michael McCandless added a comment - Looks good! Maybe sharpen the comment to something like: this method creates a compound file for all files returned by info.files(). While, generally, this may include separate norms and deletion files, this SegmentInfo must not reference such files when this method is called, because they are not allowed within a compound file. Something like that...?
        Hide
        Shai Erera added a comment -

        Maybe sharpen the comment to something like

        Thanks Mike. Changed as you suggest.

        Committed revision 1127601 (3x).
        Committed revision 1127602 (trunk).

        Show
        Shai Erera added a comment - Maybe sharpen the comment to something like Thanks Mike. Changed as you suggest. Committed revision 1127601 (3x). Committed revision 1127602 (trunk).
        Hide
        Robert Muir added a comment -

        Bulk closing for 3.2

        Show
        Robert Muir added a comment - Bulk closing for 3.2

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development