[ 
https://issues.apache.org/jira/browse/LUCENE-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe Schindler updated LUCENE-1877:
----------------------------------

    Attachment: LUCENE-1877.patch

Formatting changes in CHANGES.txt and some minor tweaks.

Also changed the isLocked() method for LUCENE-1885 to shortcut, if no lock file 
is present. In this case, without a lockfile it may also be not locked. This 
prevent NativeFSLock for creating the lock short time without really using it.

It would be good, if somebody could also test this with strange file systems. I 
only tested Windows and Solaris

> Use NativeFSLockFactory as default for new API (direct ctors & FSDir.open)
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-1877
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1877
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>            Reporter: Mark Miller
>            Assignee: Uwe Schindler
>             Fix For: 2.9
>
>         Attachments: LUCENE-1877.patch, LUCENE-1877.patch, LUCENE-1877.patch, 
> LUCENE-1877.patch
>
>
> 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.
> {code}  <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>{code}
> Anyone remember why NativeFSLockFactory is not the default over 
> SimpleFSLockFactory?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to