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

Exception in DocumentsWriter.ThreadState.init leads to corruption

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.2, 2.4
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      If an exception is hit in the init method, DocumentsWriter incorrectly
      increments numDocsInRAM when in fact the document is not added.

      Spinoff of this thread:

      http://markmail.org/message/e76hgkgldxhakuaa

      The root cause that led to the exception in init was actually due to
      incorrect use of Lucene's APIs (one thread still modifying the
      Document while IndexWriter.addDocument is adding it) but still we
      should protect against any exceptions coming out of init.

        Attachments

        1. LUCENE-1198.patch
          5 kB
          Michael McCandless

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: