[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-181) better management of file-based index directories

Sanne Grinovero (JIRA) noreply at atlassian.com
Sun Apr 27 12:35:33 EDT 2008


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanne Grinovero updated HSEARCH-181:
------------------------------------

    Attachment: HSEARCH-181-reviewed.patch

A big code cleanup.
I consider this final, if Emmanuel agrees.

Some more checks are done than initially intended, much more redundant code has been restructured, but no important logic flow
has changed (besides stricter environment checks and better error messages).

Some "final" clauses were added to make some code a bit more threadsafe but this is not enough to solve some problems, but this is material for another issue.

I've moved the class DirectoryProviderHelper class to the same package as the DirectoryProviders to hide the API from public to package-private,
I hope this is ok; I actually wanted to remove all "public" clauses but this would break test cases.

> better management of file-based index directories
> -------------------------------------------------
>
>                 Key: HSEARCH-181
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-181
>             Project: Hibernate Search
>          Issue Type: Improvement
>          Components: directory provider
>            Reporter: Sanne Grinovero
>            Assignee: Sanne Grinovero
>            Priority: Minor
>         Attachments: HSEARCH-181-preview.patch, HSEARCH-181-reviewed.patch
>
>
> The main reason to improve this is that many people get confused about the index not being created if they are so nice to create the directory for H.Search;
> The index is not created and no proper warning is logged.
> There are some other minor improvements needed in FSDirectoryProvider, FSMasterDirectoryProvider initialization and other code about creation of the index directories;
> * code duplication about mkdirs() (move to DirectoryProviderHelper).
> * inconsistent exceptions (sometimes SearchException, sometimes HibernateException for the same problem).
> * Current code already contains some good TODO about checking if it's not a file.
> * Lucene's current versions are able to determine if the index already exists or if a new needs to be created, I would rely on it instead of trying to detect the current state;
>  the flag currently used should be used to force creation.
> * some people on the forums declared sub-dirs in their Index annotation, it works but some checks are skipped (e.g. writability).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list