[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-926) Duplicate InfinispanDirectoryProviders created when multiple sub-classes share the same index directory

Sanne Grinovero (JIRA) noreply at atlassian.com
Tue Sep 27 04:12:35 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43718#comment-43718 ] 

Sanne Grinovero commented on HSEARCH-926:
-----------------------------------------

Hi Zach,
good catch! This shouldn't be an issue anymore in Search versions >4.0 as uniqueness is now controlled by the index name, but apparently no tests are covering this scenario.
Would you like to contribute a testcase? We should include (test+fix) in 3.4.x and (test) in 4.x, assuming 4.x doesn't break too.

> Duplicate InfinispanDirectoryProviders created when multiple sub-classes share the same index directory
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HSEARCH-926
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-926
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: directory provider, infinispan
>    Affects Versions: 3.4.1.Final
>            Reporter: Zach Kurey
>            Assignee: Sanne Grinovero
>             Fix For: 3.4.2, 4.0
>
>
> InfinispanDirectoryProvider doesn't implement hashCode/equals.  When multiple subclasses of the same type share the same index directory duplicates are created.  The end result from an application perspective leads to duplicate search results, and lots of side effects like:
> java.io.FileNotFoundException: Error loading medatada for index file: _b.fnm|M|Location
> at org.infinispan.lucene.InfinispanDirectory.openInput(InfinispanDirectory.java:300)
> The errors and duplicates go away after overriding hashCode/equals based on directoryProviderName

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list