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

don't reuse byte[] in IndexInput/Output for read/writeString

    Details

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

      Description

      IndexInput now holds a private "byte[] bytes", which it re-uses for reading strings. Likewise, IndexOutput holds a UTF8Result (which holds "byte[] bytes"), re-used for writing strings.

      These are both dangerous, since on reading or writing immense strings, we never free this storage.

      We don't use read/writeString in very perf sensitive parts of the code, so, I think we should not reuse the byte[] at all.

      I think this is likely the cause of the recent "IndexWriter and memory usage" thread, started by Ross Woolf on java-user@.

        Attachments

        1. LUCENE-2422.patch
          2 kB
          Michael McCandless

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: