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

exceptions during IW.rollback can leak files and locks

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.7.1, 4.8, 6.0
    • None
    • None
    • New

    Description

      Today, rollback() doesn't always succeed: if it does, it closes the writer nicely. otherwise, if it hits exception, it leaves you with a half-broken writer, still potentially holding file handles and write lock.

      This is especially bad if you use Native locks, because you are kind of hosed, the static map prevents you from forcefully unlocking (e.g. IndexWriter.unlock) so you have no real course of action to try to recover.

      If rollback() hits exception, it should still deliver the exception, but release things (e.g. like IOUtils.close).

      Attachments

        1. LUCENE-5544.patch
          8 kB
          Robert Muir
        2. LUCENE-5544.patch
          6 kB
          Robert Muir

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: