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

IndexWriter.unlock does does nothing if NativeFSLockFactory is used

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9, 2.9.1, 3.0
    • Fix Version/s: 2.9.3, 3.0.2, 3.1, 4.0-ALPHA
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      If NativeFSLockFactory is used, IndexWriter.unlock will return, silently doing nothing. The reason is that NativeFSLockFactory's makeLock always creates a new NativeFSLock. NativeFSLock's release first checks if its lock is not null. However, only if obtain() is called, that lock is not null. So release actually does nothing, and so IndexWriter.unlock does not delete the lock, or fail w/ exception.
      This is only a problem in NativeFSLock, and not in other Lock implementations, at least as I was able to see.

      Need to think first how to reproduce in a test, and then fix it. I'll work on it.

        Attachments

        1. LUCENE-2104.patch
          3 kB
          Shai Erera
        2. LUCENE-2104.patch
          3 kB
          Shai Erera
        3. LUCENE-2104.patch
          3 kB
          Shai Erera

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              shaie Shai Erera
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: