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

Use NativeFSLockFactory as default for new API (direct ctors & FSDir.open)

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.9
    • general/javadocs
    • None
    • New

    Description

      A user requested we add a note in IndexWriter alerting the availability of NativeFSLockFactory (allowing you to avoid retaining locks on abnormal jvm exit). Seems reasonable to me - we want users to be able to easily stumble upon this class. The below code looks like a good spot to add a note - could also improve whats there a bit - opening an IndexWriter does not necessarily create a lock file - that would depend on the LockFactory used.

        <p>Opening an <code>IndexWriter</code> creates a lock file for the directory in use. Trying to open
        another <code>IndexWriter</code> on the same directory will lead to a
        {@link LockObtainFailedException}. The {@link LockObtainFailedException}
        is also thrown if an IndexReader on the same directory is used to delete documents
        from the index.</p>

      Anyone remember why NativeFSLockFactory is not the default over SimpleFSLockFactory?

      Attachments

        1. LUCENE-1877.patch
          5 kB
          Uwe Schindler
        2. LUCENE-1877.patch
          18 kB
          Uwe Schindler
        3. LUCENE-1877.patch
          22 kB
          Uwe Schindler
        4. LUCENE-1877.patch
          23 kB
          Uwe Schindler

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              markrmiller@gmail.com Mark Miller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: