Lucene - Core
  1. Lucene - Core
  2. LUCENE-3727

fix assertions/checks that use File.length() to use getFilePointer()

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.6
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This came up on this thread "Getting RuntimeException: after flush: fdx size mismatch while Indexing"
      (http://www.lucidimagination.com/search/document/a8db01a220f0a126)

      In trunk, a side effect of the codec refactoring is that these assertions were pushed into codecs as finish() before close().
      they check getFilePointer() instead in this computation, which checks that lucene did its part (instead of falsely tripping if directory metadata is stale).

      I think we should fix these checks/asserts on 3.x too

      1. LUCENE-3727.patch
        8 kB
        Robert Muir
      2. LUCENE-3727.patch
        2 kB
        Robert Muir

        Activity

        Hide
        Robert Muir added a comment -

        Here's the start to the patch: fixes the case that user hit without us losing any 'coverage' in the check.

        I haven't yet reviewed other uses.

        Show
        Robert Muir added a comment - Here's the start to the patch: fixes the case that user hit without us losing any 'coverage' in the check. I haven't yet reviewed other uses.
        Hide
        Robert Muir added a comment -

        updated patch: using the same try/finally logic as trunk, fixing termvectors writer too, and storedfields/tvs from segmentmerger

        I think its ready.

        Show
        Robert Muir added a comment - updated patch: using the same try/finally logic as trunk, fixing termvectors writer too, and storedfields/tvs from segmentmerger I think its ready.
        Hide
        Robert Muir added a comment -

        After reviewing all uses of Directory.fileLength, only really one scary one remains: its use when constructing CFS directories.
        This seems like it could be hard to fix though, I'd rather not tackle this here... (unless someone knows of a super-easy fix),
        but that could cause similar issues I think for people using NFS?

        Show
        Robert Muir added a comment - After reviewing all uses of Directory.fileLength, only really one scary one remains: its use when constructing CFS directories. This seems like it could be hard to fix though, I'd rather not tackle this here... (unless someone knows of a super-easy fix), but that could cause similar issues I think for people using NFS?

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development