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] [Updated] (LUCENE-3266) Improve FileLocking based on Java 1.6
Date Thu, 09 May 2013 23:05:46 GMT

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

Uwe Schindler updated LUCENE-3266:
----------------------------------

    Fix Version/s:     (was: 4.3)
                   4.4
    
> Improve FileLocking based on Java 1.6 
> --------------------------------------
>
>                 Key: LUCENE-3266
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3266
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/store
>    Affects Versions: 4.0-ALPHA
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.4
>
>
> Snippet from NativeFSLockFactory:
> {noformat}
> /*
> * The javadocs for FileChannel state that you should have
> * a single instance of a FileChannel (per JVM) for all
> * locking against a given file (locks are tracked per 
> * FileChannel instance in Java 1.4/1.5). Even using the same 
> * FileChannel instance is not completely thread-safe with Java 
> * 1.4/1.5 though. To work around this, we have a single (static) 
> * HashSet that contains the file paths of all currently 
> * locked locks.  This protects against possible cases 
> * where different Directory instances in one JVM (each 
> * with their own NativeFSLockFactory instance) have set 
> * the same lock dir and lock prefix. However, this will not 
> * work when LockFactorys are created by different 
> * classloaders (eg multiple webapps). 
> * 
> * TODO: Java 1.6 tracks system wide locks in a thread safe manner 
> * (same FileChannel instance or not), so we may want to 
> * change this when Lucene moves to Java 1.6.
> */
> {noformat}
> since we are on 1.6 we should improve this if possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message