Index is not created in remote node, using the replication mode of clustering
sofian22 May 16, 2012 4:49 PMHi,
We are trying to use replication mode clustering in the infinispan cache, using either a File/RAM indexing for hibernate lucene search. We can see the cached object replicated to a remote node, but the index does not seem to be created for this object in that remote node. Because of that, any search for this object returns nothing.
Artifact info: infinispan-query 5.1.3.FINAL, infinispan-lucene-directory 5.1.3.FINAL, hibernate-search-infinispan 4.1.0.CR1
Here is the configuration that we used:
<global>
<globalJmxStatistics
enabled="true"
jmxDomain="infinispan"/>
<transport
transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"
clusterName="infinispan-cluster"
distributedSyncTimeout="20000"
nodeName="BoxeyCacheCluster">
<properties>
<property name="configurationFile" value="jgroups-gossip.xml" />
</properties>
</transport>
<asyncListenerExecutor factory="org.infinispan.executors.DefaultExecutorFactory">
<properties>
<property name="maxThreads" value="5"/>
<property name="threadNamePrefix" value="AsyncListenerThread"/>
</properties>
</asyncListenerExecutor>
<asyncTransportExecutor factory="org.infinispan.executors.DefaultExecutorFactory">
<properties>
<property name="maxThreads" value="40"/>
<property name="threadNamePrefix" value="AsyncSerializationThread"/>
</properties>
</asyncTransportExecutor>
</global>
<default>
<indexing enabled="true" indexLocalOnly="false"/>
<!-- Neither "ram" nor filesystem works -->
<!--property name="hibernate.search.default.directory_provider" value="ram" /-->
<transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"/>
<locking
isolationLevel="READ_UNCOMMITTED"
lockAcquisitionTimeout="20000"
writeSkewCheck="false"
concurrencyLevel="5000"
useLockStriping="false"
/>
<jmxStatistics enabled="true"/>
<clustering mode="replication">
<stateRetrieval
timeout="20000"
fetchInMemoryState="false"
alwaysProvideInMemoryState="false"
/>
<async
useReplQueue="true"
replQueueInterval="1000"
replQueueMaxElements="2000"
/>
</clustering>
</default>
The cached object definition is as follows:
The cached object is as follows:
{code}
@Indexed
@Transformable
@ProvidedId
public class Contact implements Serializable {
private static final long serialVersionUID = 1L;
@DocumentId
String uuid;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
@Field(index = Index.NO)
Date created;
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
@Fields({ @Field(index = Index.YES), @Field(name = "displayName_forSort", analyze = Analyze.NO, store = Store.NO) })
String displayName;
…
}
{code}
Can someone please review the configuration and tell me what I am missing?
I have tried similar test with infinispan 4.2, and it was working, but we want to upgrade to infinispan 5.1.
Thanks,
Sofian