JBC 1.4.1SP replication problems
jorgemoralespou_2 Nov 13, 2007 5:05 AMHi,
We have a two node cluster configured with replication and a JDBCCacheLoader, as follows:
<server> <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/> <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=SOMServicesProvisioningCache"> <depends>jboss:service=Naming</depends> <depends>jboss:service=TransactionManager</depends> <depends>jboss.jca:name=jdbc/somservices,service=DataSourceBinding</depends> <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute> <attribute name="IsolationLevel">REPEATABLE_READ</attribute> <attribute name="CacheMode">REPL_SYNC</attribute> <attribute name="UseReplQueue">false</attribute> <attribute name="ReplQueueInterval">0</attribute> <attribute name="ReplQueueMaxElements">0</attribute> <attribute name="ClusterName">SOMServicesProvisioning-Cluster</attribute> <attribute name="ClusterConfig"> .... </attribute> <attribute name="FetchInMemoryState">true</attribute> <attribute name="InitialStateRetrievalTimeout">15000</attribute> <attribute name="SyncReplTimeout">15000</attribute> <attribute name="LockAcquisitionTimeout">10000</attribute> <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute> <attribute name="EvictionPolicyConfig"> <config> <attribute name="wakeUpIntervalSeconds">10</attribute> <!-- Cache wide default --> <region name="/_default_"> <attribute name="maxNodes">10000</attribute> <attribute name="timeToLiveSeconds">86400</attribute> </region> </config> </attribute> <attribute name="UseRegionBasedMarshalling">true</attribute> <attribute name="CacheLoaderConfiguration"> <config> <passivation>false</passivation> <preload>/</preload> <shared>true</shared> <cacheloader> <class>org.jboss.cache.loader.JDBCCacheLoader</class> <properties> cache.jdbc.datasource=java:jdbc/somservices cache.jdbc.table.name=services_provisioning cache.jdbc.table.create=true cache.jdbc.table.drop=false cache.jdbc.table.primarykey=jbosscache_pk cache.jdbc.fqn.column=fqn cache.jdbc.fqn.type=varchar(255) cache.jdbc.node.column=node cache.jdbc.node.type=blob cache.jdbc.parent.column=parent </properties> <async>true</async> <fetchPersistentState>true</fetchPersistentState> <ignoreModifications>false</ignoreModifications> </cacheloader> </config> </attribute> </mbean> </server>
We are having strange behaviour:
We stop one cluster node.
We modify one JBC node`s attribute.
We start the other node of the cluster.
We expect here to have the correct value, but we have the previously value, I guess that retrieved from Database. We supposed this value was updated when we did a put in the cache, and also that values should be retrieved first from the other node in the cluster, and then, if nothing found, from database.
Replication seems to be working, because if we programatically stop a region`s synchronization, and put values in that region, when we start that region`s synchronization again, all values are replicated correctly.
What are we doing wrong?