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

maxDoc should be explicitly stored in the index, not derived from file length

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9, 2.0.0, 2.1
    • 2.1
    • None
    • None
    • New

    Description

      This is a spinoff of LUCENE-140

      In general we should rely on "as little as possible" from the file system. Right now, maxDoc is derived by checking the file length of the FieldsReader index file (.fdx) which makes me nervous. I think we should explicitly store it instead.

      Note that there are no known cases where this is actually causing a problem. There was some speculation in the discussion of LUCENE-140 that it could be one of the possible, but in digging / discussion there were no specifically relevant JVM bugs found (yet!). So this would be a defensive fix at this point.

      Attachments

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: