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

problem with Direct IO seek() leading to EOFException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.6.2, 4.3.1
    • Fix Version/s: None
    • Component/s: core/store
    • Labels:
    • Environment:

      Linux kernel 3.2.0-48-generic
      jdk 1.6.0_43

    • Lucene Fields:
      New

      Description

      I think this actually affects 3.1.0 and up, but I was too lazy to type all those out and just included release versions for brevity.

      DirectIOLinuxIndexInput in 3.6.2 and NativeUnixIndexInput in 4.3.1 have in issue with the seek() method. If we seek() to the end of a file (can happen when merger is doing a clone()) whose length is a multiple of 512, then we will unnecessarily call refill(), which will throw an EOFException.

      Quick fix is to surround refill() with this condition:

      if (pos < length()) {
      refill();
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              smacke Stephen Macke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified