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

IndexWriter fails to delete documents if Iterator<IndexDocument> throws an exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      In DWPT we iterator over a document block and roll back documents if one of the docs fails with a non-aborting exception. Yet, we miss to delete those document if the iterator itself throws an exception. Given the fact that we allow an Iterable on IW we should be prepared for RT exceptions since these documents might be created in a stream fashing rather than already build up. IMO its a valid usecase if you have large documents to not materialize them in memory before indexing or at least we don't require this.

        Attachments

        1. LUCENE-4629.patch
          4 kB
          Simon Willnauer

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              simonw Simon Willnauer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: