[ https://issues.apache.org/jira/browse/LUCENE-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749322#action_12749322 ]
Michael McCandless commented on LUCENE-1877: -------------------------------------------- bq. Anyone remember why NativeFSLockFactory is not the default over SimpleFSLockFactory? In my testing (long ago) over NFS, I actually found "native" locks didn't work as well as "simple" locks. I was also a bit nervous on how well supported "native" locks are across different OSs. bq. My preference would really be to make it the default (though of course not for 2.9). +1, I think it's the better default. People who use Lucene over NFS already have to do special things (eg make a custom deletion policy), and far too many users hit the "leftover lock file" problem. We could state in the javadocs that this default will change in 3.0? Maybe just add one sentence in that IndexWriter locking section, referencing the discussion in NativeFSLockFactory's javadocs about not having the "leftover lock file" problem? > Improve IndexWriter javadoc on locking > -------------------------------------- > > Key: LUCENE-1877 > URL: https://issues.apache.org/jira/browse/LUCENE-1877 > Project: Lucene - Java > Issue Type: Improvement > Components: Javadocs > Reporter: Mark Miller > Priority: Trivial > Fix For: 2.9 > > > 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