jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-863) Patch to use FileLock for locking instead of empty file
Date Fri, 25 May 2007 15:08:16 GMT

    [ https://issues.apache.org/jira/browse/JCR-863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499112
] 

Marcel Reutegger commented on JCR-863:
--------------------------------------

> Also, I remember hearing some talk about this being done entirely in Lucene (so this
code can be retired?) - 
> then its Lucene's problem !

Lucene 2.1 has a pluggable LockFactory and provides a NativeFSLockFactory: http://lucene.apache.org/java/2_1_0/api/org/apache/lucene/store/NativeFSLockFactory.html

I suggest we remove the jackrabbit customizations once we upgrade to lucene 2.1.

> Patch to use FileLock for locking instead of empty file
> -------------------------------------------------------
>
>                 Key: JCR-863
>                 URL: https://issues.apache.org/jira/browse/JCR-863
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Michael Neale
>             Fix For: 1.4
>
>         Attachments: FSDirectory.patch, JCR-863.patch
>
>
> The FSDirectory uses File.createNewFile to effectively lock a directory (in makeLock),
yet the Java Spec says explcitly not to use it for this purpose, and instead use FileLock
from nio.
> The attached patch shows how this is/could be done (change is internal to the makeLock
method only, and functionally equivalent, the same tests apply).

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


Mime
View raw message