You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Digy (JIRA)" <ji...@apache.org> on 2007/08/16 15:17:32 UTC

[jira] Commented: (LUCENENET-75) FSDirectory does not correctly handle directory cache "DIRECTORIES"

    [ https://issues.apache.org/jira/browse/LUCENENET-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520239 ] 

Digy commented on LUCENENET-75:
-------------------------------

this patch fixes nunit test -->TestLockFactory.TestFSDirectoryDifferentLockFactory

> FSDirectory does not correctly handle directory cache "DIRECTORIES"
> -------------------------------------------------------------------
>
>                 Key: LUCENENET-75
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-75
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Digy
>            Priority: Critical
>         Attachments: FSDirectory.patch
>
>
> FSDirectory uses FileInfo class as a key to store and retrieve values from cache "DIRECTORIES". 
> Since  FileInfo instances are different(everytime a new instance is created in GetDirectory method),  getting a previously stored value from the cache always returns null.
> So instead of FileInfo class, directory's FullPath must be used as a key to access the cache.
> FileInfo file = .....
> DIRECTORIES[file] = .....;  ====> DIRECTORIES[file.FullName] = .......;

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