3 Replies Latest reply on Dec 6, 2011 1:16 PM by dex chen

    cache data not synced among the cluster nodes in replication mode

    dex chen Novice

      I modified the GUI demo to test the cache replication in a 2 -node cluster setting with tcp transport protocol (with ISPN5.0).

       

      Here is the config:

       

      <default>

           <locking

               isolationLevel="READ_COMMITTED"

               lockAcquisitionTimeout="20000"

               writeSkewCheck="false"

               concurrencyLevel="5000"

               useLockStriping="false"

            />

            <jmxStatistics enabled="true"/>

       

            <clustering mode="replication">

               <stateRetrieval

                  timeout="240000"

                  fetchInMemoryState="false"

                  alwaysProvideInMemoryState="false"

               />

                <sync replTimeout="20000"/>

            </clustering>

            <loaders

               passivation="false"

               shared="false"

               preload="true">

               <loader

                  class="org.infinispan.loaders.file.FileCacheStore"

                  fetchPersistentState="true"

                  purgeOnStartup="false">

                  <properties>

                     <property name="location" value="/var/tmp/demostore"/>

                  </properties>

               </loader>

            </loaders>

       

      The replication works fine for the data changes made when both nodes are up (form a cluster). However, if one node starts early and get some changes in the cache (such as add some entries), then, a second node joins the cluster, and the second node will NOT get the changes on the first node when the second node was down, I,e. the data in the cach in the second node is different from those in the first.

       

      I tried to set fetchInMemoryState="true" in the config, and got the same behaviour.

       

      My understanding is that fetchPersistentState="true" will make the second node sync the state with the first node.

       

      What I should set to ensure the new nodes to sync state (cache data) with the existing node(s)?

       

      thanks,

       

      dex