lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (LUCENE-1877) Improve IndexWriter javadoc on locking
Date Tue, 01 Sep 2009 21:43:32 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750117#action_12750117
] 

Uwe Schindler edited comment on LUCENE-1877 at 9/1/09 2:43 PM:
---------------------------------------------------------------

As nobody else objects, I will update the tests tomorrow and switch to NativeFSLockFactory
for the new ctors and FSDir.open(). The old and deprectated API is unchanged.

I will also remove the unneeded lock prefix and use the same lock file name as SimpleFSLockFactory.
This would also help users mixing both lock factories together (by using deprecated code defaulting
to Simple and new code defaulting to Native). The SimpleLockFactory would also detect a lock,
if the NativeFSLockFactory created it (because file has same name). The tests will then also
pass (which depended on file name).

Will go to bed now.

      was (Author: thetaphi):
    As nobody else objects, I will update the tests tomorrow and switch to NativeFSLockFactory
for the new ctors and FSDir.open(). The old and deprectated API is unchanged.

Will go to bed now.
  
> 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
>
>         Attachments: 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message