-
1. Re: Consistent Hashing and replication mode
galder.zamarreno Oct 7, 2011 11:55 AM (in response to renzos)I'm not sure what Infinispan version your using, but in recent Infinispan 5.1, state transfer and rehashing have been merged.
-
2. Re: Consistent Hashing and replication mode
renzos Oct 14, 2011 7:03 AM (in response to galder.zamarreno)I'm using 4.2.1 final so it's supposed to be not merged.
-
3. Re: Consistent Hashing and replication mode
galder.zamarreno Oct 18, 2011 3:47 AM (in response to renzos)Hmmm, dunno tbh then. Maybe if you give more clues we can help you further? i.e. configuration, call stack trace...
-
4. Re: Consistent Hashing and replication mode
renzos Oct 18, 2011 4:13 AM (in response to galder.zamarreno)Thanks for your help, I'm just debugging the code stepping it statement by statement (F7 with Netbeans), it's for my thesis, and I'm using the following configuration:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:4.2 http://www.infinispan.org/schemas/infinispan-config-4.2.xsd"
xmlns="urn:infinispan:config:4.2">
<global> <!--contains System wide local settings-->
<transport clusterName="infinispan-cluster" transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport">
<properties>
<property name="configurationFile" value="jgroups-udp.xml" />
</properties>
</transport>
</global>
<default> <!--refers to configuration which is used by all Infinispan caches-->
<deadlockDetection enabled="false"/>
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
syncRollbackPhase="false"
syncCommitPhase="false"
useEagerLocking="false"/>
<locking isolationLevel="REPEATABLE_READ"
writeSkewCheck="false"
concurrencyLevel="500"
useLockStriping="false"
lockAcquisitionTimeout="1000" />
<clustering mode="replication">
<sync/>
<stateRetrieval fetchInMemoryState="true"/> <!--updates the cache state on the current node (REPLICATION only) -->
</clustering>
</default>
</infinispan>
When I get the cache with the following statement:
Cache cache = manager.getCache("cacheName");
I step into the manager.getCache method that calls many other classes and at some point I get the hashing algoritm (Wang/Jenkins), the same you can see here:
http://www.goworkday.com/2010/03/19/single-word-wangjenkins-hash-concurrenthashmap/
As I'm in replication mode I'm surprised but maybe it is used for getting the position of the node on the ring.
-
5. Re: Consistent Hashing and replication mode
galder.zamarreno Oct 18, 2011 6:38 AM (in response to renzos)1 of 1 people found this helpfulAh ok, you mean the hash function for a ConcurrentHashMap. That's probably due to the internal data container structure which uses something like data structure similar to a CHM, or maybe due to some internals that use a CHM.