[infinispan-issues] [JBoss JIRA] (ISPN-4139) Upgrade Lucene 4 Infinispan Directory to Lucene 4.7.0
Hardy Ferentschik (JIRA)
issues at jboss.org
Thu Mar 20 09:40:11 EDT 2014
[ https://issues.jboss.org/browse/ISPN-4139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12954609#comment-12954609 ]
Hardy Ferentschik edited comment on ISPN-4139 at 3/20/14 9:39 AM:
------------------------------------------------------------------
{quote}
Is this preventing you to upgrade Search to Lucene 4.7?
{quote}
That's the missing piece. Everything else works, just have tests failures in the _infinispan_ module. Here is an example:
{noformat}
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.228 sec <<< FAILURE! - in org.hibernate.search.infinispan.sharedIndex.SharedIndexTest
testSingleResultFromDeviceIndex(org.hibernate.search.infinispan.sharedIndex.SharedIndexTest) Time elapsed: 0.228 sec <<< ERROR!
java.lang.AbstractMethodError: org.apache.lucene.store.Lock.close()V
at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1052)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:927)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:889)
at org.hibernate.search.store.impl.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:159)
at org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.start(InfinispanDirectoryProvider.java:109)
at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:104)
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:272)
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:561)
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:530)
at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:107)
at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:386)
at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:225)
at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:143)
at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:79)
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:52)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:588)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857)
at org.hibernate.search.test.util.FullTextSessionBuilder.build(FullTextSessionBuilder.java:181)
at org.hibernate.search.infinispan.ClusterTestHelper.createClusterNode(ClusterTestHelper.java:97)
at org.hibernate.search.infinispan.ClusterTestHelper.createClusterNode(ClusterTestHelper.java:61)
at org.hibernate.search.infinispan.sharedIndex.SharedIndexTest.setUp(SharedIndexTest.java:100)
{noformat}
{quote}
I can take care of this, it's quite a minefield of backwards compatibility requirements.
{quote}
If you want. I finally have Infinispan configured in my IDE though and I kind of see what I need to do. I guess I would need something similar to {{DirectoryBuilderImpl#create}} in {{BaseLockFactory}} (or somewhere in this care). Depending on the Lucene version I need to return an appropriate instance of {{Lock}}.
I actually tried to implement {{#release()}} and {{#lock}} at the same time in {{BaseLuceneLock}}, but that did not work :-( The class is still not compatible then when run with Lucene 4.7.
Just let me know if you fix this, then I leave it for now.
{quote}
BTW If you can't upgrade Search to 4.7 without an Infinispan release first, it's getting messy. We would need an Infinispan release, and the Infinispan patch would need to support both Lucene 3, and Lucene 4.6 and Lucene 4.7 (both!).
{quote}
I can upgrade, but the Infinispan {{DirectoryProvider}} would be broken until a new updated Infinspan release is available. Probably not so nice. Why would you need to support 3, 4.6 and 4.7. That sounds terrible (and is btw not what I have been working on the last couple of hours)?
was (Author: hardy.ferentschik):
{quote}
Is this preventing you to upgrade Search to Lucene 4.7?
{quote}
That's the missing piece. Everything else works, just have tests failures in the _infinispan_ module. Here is an example:
{noformat}
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.228 sec <<< FAILURE! - in org.hibernate.search.infinispan.sharedIndex.SharedIndexTest
testSingleResultFromDeviceIndex(org.hibernate.search.infinispan.sharedIndex.SharedIndexTest) Time elapsed: 0.228 sec <<< ERROR!
java.lang.AbstractMethodError: org.apache.lucene.store.Lock.close()V
at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1052)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:927)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:889)
at org.hibernate.search.store.impl.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:159)
at org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.start(InfinispanDirectoryProvider.java:109)
at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:104)
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:272)
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:561)
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:530)
at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:107)
at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:386)
at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:225)
at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:143)
at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:79)
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:52)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:588)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857)
at org.hibernate.search.test.util.FullTextSessionBuilder.build(FullTextSessionBuilder.java:181)
at org.hibernate.search.infinispan.ClusterTestHelper.createClusterNode(ClusterTestHelper.java:97)
at org.hibernate.search.infinispan.ClusterTestHelper.createClusterNode(ClusterTestHelper.java:61)
at org.hibernate.search.infinispan.sharedIndex.SharedIndexTest.setUp(SharedIndexTest.java:100)
{noformat}
{quote}
I can take care of this, it's quite a minefield of backwards compatibility requirements.
{quote}
If you want. I finally have Infinispan configured in my IDE though and I kind of see what I need to do. I guess I would need something similar to {{DirectoryBuilderImpl#create}} in {{BaseLockFactory}} (or somewhere in this care). Depending on the Lucene version I need to return an appropriate instance of {{Lock}}.
I actually tried to implement {{#release()}} and {{#lock}} at the same time in {{BaseLuceneLock}}, but that did not work :-( The class is still not compatible then when run with Lucene 4.7.
Just let me know if you fix this, then I leave it for now.
{quote}
BTW If you can't upgrade Search to 4.7 without an Infinispan release first, it's getting messy. We would need an Infinispan release, and the Infinispan patch would need to support both Lucene 3, and Lucene 4.6 and Lucene 4.7 (both!).
{quote}
I can upgrade, but the Infinispan {{DirectoryProvider}} would be broken until a new updated Infinspan release is available. Probably not so nice. Why would you need to support 3, 4.6 and 4.7. That sounds terrible?
> Upgrade Lucene 4 Infinispan Directory to Lucene 4.7.0
> -----------------------------------------------------
>
> Key: ISPN-4139
> URL: https://issues.jboss.org/browse/ISPN-4139
> Project: Infinispan
> Issue Type: Task
> Components: Lucene Directory
> Reporter: Hardy Ferentschik
> Assignee: Sanne Grinovero
>
> * {{DirectoryLuceneV4}} should not probably extend {{BaseDirectory}} instead of plain {{Directory}}
> * {{Lock#release}} got removed into {{Lock#close}}. {{BaseLuceneLock}} needs to change, but I am not sure how this works in order to support Lucene 3 and 4!?
--
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
More information about the infinispan-issues
mailing list