Lucene - Core
  1. Lucene - Core
  2. LUCENE-3660

If indexwriter hits a non-ioexception from indexExists it leaks a write.lock

    Details

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

      Description

      the rest of IW's ctor is careful about this.

      IndexReader.indexExists catches any IOException and returns false, but the problem
      occurs if some other exception (in my test, UnsupportedOperationException, but you
      can imagine others are possible), when trying to e.g. read in the segments file.

      I think we just need to move the IR.exists stuff inside the try / finally

        Activity

        Hide
        Michael McCandless added a comment -

        +1, good catch!

        Show
        Michael McCandless added a comment - +1, good catch!

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development