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

Lucene RAM Directory doesn't work for Index Size > 8 GB

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/store
    • Labels:
      None

      Description

      from user list - http://www.gossamer-threads.com/lists/lucene/java-user/50982

      Problem seems to be casting issues in RAMInputStream.

      Line 90:
      bufferStart = BUFFER_SIZE * currentBufferIndex;
      both rhs are ints while lhs is long.
      so a very large product would first overflow MAX_INT, become negative, and only then (auto) casted to long, but this is too late.

      Line 91:
      bufferLength = (int) (length - bufferStart);
      both rhs are longs while lhs is int.
      so the (int) cast result may turn negative and the logic that follows would be wrong.

        Attachments

        1. lucene-957.patch
          8 kB
          Doron Cohen
        2. lucene-957.patch
          1 kB
          Doron Cohen

          Activity

            People

            • Assignee:
              doronc Doron Cohen
              Reporter:
              doronc Doron Cohen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: