Lucene - Core
  1. Lucene - Core
  2. LUCENE-2600

don't try to cache a composite reader's MultiBits deletedDocs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      MultiFields.getDeletedDocs now builds up a MultiBits instance (so that one can check if a top-level docID is deleted), but it now stuffs it into a private cache on IndexReader.

      This is invalid when the composite reader is read/write, and can result in a MultiReader falsely claiming a doc was not deleted.

      1. LUCENE-2600.patch
        9 kB
        Michael McCandless
      2. LUCENE-2600.patch
        50 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Attached patch, removing the caching altogether.

        Show
        Michael McCandless added a comment - Attached patch, removing the caching altogether.
        Hide
        Michael McCandless added a comment -

        Another iteration of the patch.

        This one removes IndexReader.isDeleted, in favor of IndexReader.getDeletedDocs. This then enabled removing ReadOnlySegment/DirReader classes, which is a nice simplificaton.

        I also fixed MultiFields.getDeletedDocs to re-ask the underlying readers for their .getDeletedDocs() when they previously returned null, to handle the non-readonly composite reader case.

        Show
        Michael McCandless added a comment - Another iteration of the patch. This one removes IndexReader.isDeleted, in favor of IndexReader.getDeletedDocs. This then enabled removing ReadOnlySegment/DirReader classes, which is a nice simplificaton. I also fixed MultiFields.getDeletedDocs to re-ask the underlying readers for their .getDeletedDocs() when they previously returned null, to handle the non-readonly composite reader case.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development