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

Deadlock case in IndexWriter on exception just before flush

    Details

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

      Description

      If a document hits a non-aborting exception, eg something goes wrong
      in tokenStream.next(), and, that document had triggered a flush
      (due to RAM or doc count) then DocumentsWriter will deadlock because
      that thread marks the flush as pending but fails to clear it on
      exception.

      I have a simple test case showing this, and a fix fixing it.

      1. LUCENE-1208.patch
        2 kB
        Michael McCandless

        Activity

        Hide
        mikemccand Michael McCandless added a comment -

        Attached patch. The fix is trivial. I will commit later today.

        Show
        mikemccand Michael McCandless added a comment - Attached patch. The fix is trivial. I will commit later today.
        Hide
        michele Michele Bini added a comment -

        As with LUCENE-1210, shouldn't the patch be committed in the 2.3 branch, too, as it affects 2.3.1? Other issues, such as the speedups in LUCENE-1211, although useful, can be left out as they are not bugs. But fix for deadlocks seem worthwhile for 2.3.x, too.

        Show
        michele Michele Bini added a comment - As with LUCENE-1210 , shouldn't the patch be committed in the 2.3 branch, too, as it affects 2.3.1? Other issues, such as the speedups in LUCENE-1211 , although useful, can be left out as they are not bugs. But fix for deadlocks seem worthwhile for 2.3.x, too.
        Hide
        mikemccand Michael McCandless added a comment -

        Agreed. I'm thinking these issues should be ported to 2.3.2:

        LUCENE-1191
        LUCENE-1197
        LUCENE-1198
        LUCENE-1199
        LUCENE-1200
        LUCENE-1208 (this issue)
        LUCENE-1210

        Show
        mikemccand Michael McCandless added a comment - Agreed. I'm thinking these issues should be ported to 2.3.2: LUCENE-1191 LUCENE-1197 LUCENE-1198 LUCENE-1199 LUCENE-1200 LUCENE-1208 (this issue) LUCENE-1210
        Hide
        michaelbusch Michael Busch added a comment -

        We had seen this deadlock problem in our tests. I reran all tests with Lucene 2.3.1 + LUCENE-1208 and didn't see the problem again so far!

        Show
        michaelbusch Michael Busch added a comment - We had seen this deadlock problem in our tests. I reran all tests with Lucene 2.3.1 + LUCENE-1208 and didn't see the problem again so far!
        Hide
        hossman Hoss Man added a comment -

        targeted for 2.3.2 bug fix release

        Show
        hossman Hoss Man added a comment - targeted for 2.3.2 bug fix release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development