-
1. Re: WARN: Forcing clear of index lock
n.dobryukha Mar 22, 2016 9:59 AM (in response to n.dobryukha)15 views and there is no one idea?
-
2. Re: WARN: Forcing clear of index lock
galder.zamarreno Mar 23, 2016 6:22 AM (in response to n.dobryukha)What Infinispan version are you using? Did you get any TRACE logs?
-
3. Re: WARN: Forcing clear of index lock
n.dobryukha Mar 23, 2016 6:34 AM (in response to galder.zamarreno)-
server.log.zip 993.9 KB
-
-
4. Re: WARN: Forcing clear of index lock
gustavonalle Mar 23, 2016 7:43 AM (in response to n.dobryukha)The org.infinispan.query.indexmanager.InfinispanIndexManager stores indexes on Infinispan caches, by default they are called "LuceneIndexesData", "LuceneIndexesMetadata" and "LuceneIndexesLocking". Since you have two indexed caches, and are not specifying the index storage caches, both will try to use the same LuceneIndexesLocking cache and will compete for the lock. So you need to define different trios [default.data_cachename, locking_cachename, metadata_cachename] for each of your indexed caches.
-
5. Re: WARN: Forcing clear of index lock
n.dobryukha Mar 23, 2016 8:27 AM (in response to gustavonalle)Thanks a lot!
When I defined different trios [default.data_cachename, locking_cachename, metadata_cachename] for each indexed caches everything worked.
Could you say, why when we used Infinispan in an embedded mode with the following config everything also worked well?
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:8.1 http://www.infinispan.org/schemas/infinispan-config-8.1.xsd" xmlns="urn:infinispan:config:8.1"> <cache-container name="InMemoryCacheContainer" statistics="true" default-cache="the-default-cache" shutdown-hook="DEFAULT"> <transport cluster="InMemoryCacheCluster" /> <!-- *************************************** --> <!-- Cache to store Lucene's file metadata --> <!-- *************************************** --> <replicated-cache name="LuceneIndexesMetadata" mode="SYNC" remote-timeout="25000"> <locking striping="false" acquire-timeout="10000" concurrency-level="500" write-skew="false" /> <transaction mode="NONE" /> <eviction max-entries="-1" strategy="NONE" /> <expiration max-idle="-1" /> <indexing index="NONE" /> <state-transfer enabled="true" timeout="480000" /> </replicated-cache> <!-- **************************** --> <!-- Cache to store Lucene data --> <!-- **************************** --> <replicated-cache name="LuceneIndexesData" mode="SYNC" remote-timeout="25000"> <locking striping="false" acquire-timeout="10000" concurrency-level="500" write-skew="false" /> <transaction mode="NONE" /> <eviction max-entries="-1" strategy="NONE" /> <expiration max-idle="-1" /> <indexing index="NONE" /> <state-transfer enabled="true" timeout="480000" /> </replicated-cache> <!-- ***************************** --> <!-- Cache to store Lucene locks --> <!-- ***************************** --> <replicated-cache name="LuceneIndexesLocking" mode="SYNC" remote-timeout="25000"> <locking striping="false" acquire-timeout="10000" concurrency-level="500" write-skew="false" /> <transaction mode="NONE" /> <eviction max-entries="-1" strategy="NONE" /> <expiration max-idle="-1" /> <indexing index="NONE" /> <state-transfer enabled="true" timeout="480000" /> </replicated-cache> <replicated-cache name="cache-one" statistics="true" mode="SYNC" remote-timeout="20000"> <transaction mode="BATCH" /> <eviction max-entries="-1" /> <expiration lifespan="-1" /> <indexing index="LOCAL" auto-config="false"> <property name="hibernate.search.default.directory_provider">infinispan</property> <property name="hibernate.search.default.locking_cachename">LuceneIndexesLocking</property> <property name="hibernate.search.default.data_cachename">LuceneIndexesData</property> <property name="hibernate.search.default.metadata_cachename">LuceneIndexesMetadata</property> </indexing> <state-transfer enabled="true" /> </replicated-cache> <replicated-cache name="cache-two" statistics="true" mode="SYNC" remote-timeout="20000"> <transaction mode="BATCH" /> <eviction max-entries="-1" /> <expiration lifespan="-1" /> <indexing index="LOCAL"> <property name="hibernate.search.default.directory_provider">infinispan</property> <property name="hibernate.search.default.locking_cachename">LuceneIndexesLocking</property> <property name="hibernate.search.default.data_cachename">LuceneIndexesData</property> <property name="hibernate.search.default.metadata_cachename">LuceneIndexesMetadata</property> </indexing> <state-transfer enabled="true" /> </replicated-cache> </cache-container> </infinispan>
-
6. Re: WARN: Forcing clear of index lock
gustavonalle Mar 23, 2016 9:49 AM (in response to n.dobryukha)When in embedded mode, inside the index a "prefix" is stored which by default is named after the class name of your annotated @Indexed entity, so there's a separation of concerns. Even if more than one cache uses "LuceneIndexesLocking", the lock itself will be prefixed.
In remote mode, we cannot rely on annotations since remote queries should work with C++/C# clients besides Java.
I've opened a JIRA to track that requirement, but in the meantime, you should keep with the different trio of caches.