[infinispan-issues] [JBoss JIRA] Commented: (ISPN-832) TimeoutException with 2 or more nodes when there are Entity inserts, updates or removes.

Cyrille Charron (JIRA) jira-events at lists.jboss.org
Fri Dec 17 19:10:18 EST 2010


    [ https://issues.jboss.org/browse/ISPN-832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571170#comment-12571170 ] 

Cyrille Charron commented on ISPN-832:
--------------------------------------

I manage to reproduce the bug more easily by adding the following code in Runner.java before calling my Runner.init() function which starts OpenEjb :
			System.out.println(sdf.format(new Date()) + " Strike any key to start");
			while (System.in.available() > 0) System.in.skip(System.in.available());
			System.in.read();
			Runner.init();

Then, under Eclipse after having started the 2 programs, i open 1 more console view and place it elsewhere on the screen until seeing simultaneaously the 2 consoles : one on the first run, the second on the second node.
I select one of the 2 consoles, i move my mouse over the second console, then i have only to click ENTER keyboard (it starts the first node), to click LEFT mouse button (it activates focus on the second console), and to click ENTER keyboard again (it starts the second node).

The content of my infinispan-configs.xml file is (comments removed) :

<?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>
      <transport transportClass = "org.infinispan.remoting.transport.jgroups.JGroupsTransport"
            clusterName="infinispan-hibernate-cluster" distributedSyncTimeout="50000">
         <properties>
            <property name="configurationFile" value="flush-udp.xml"/>
         </properties>
      </transport>
   </global>

   <default>
      <jmxStatistics enabled="false"/>
   </default>

   <namedCache name="entity">
      <clustering mode="invalidation">
         <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
         <sync replTimeout="20000"/>
      </clustering>
      <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
               lockAcquisitionTimeout="15000" useLockStriping="false" />
      <eviction wakeUpInterval="5000" maxEntries="10000" strategy="LRU"/>
      <expiration maxIdle="100000"/>
      <lazyDeserialization enabled="true"/>
   </namedCache>
   
   <namedCache name="entity-repeatable">
      <clustering mode="invalidation">
         <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
         <sync replTimeout="20000"/>
      </clustering>
      <locking isolationLevel="REPEATABLE_READ" concurrencyLevel="1000"
               lockAcquisitionTimeout="15000" useLockStriping="false"/>
      <eviction wakeUpInterval="5000" maxEntries="10000" strategy="LRU"/>
      <expiration maxIdle="100000"/>
      <lazyDeserialization enabled="true"/>
   </namedCache>
   
   <namedCache name="replicated-entity">
      <clustering mode="replication">
         <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
         <sync replTimeout="20000"/>
      </clustering>
      <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
               lockAcquisitionTimeout="15000" useLockStriping="false"/>
      <eviction wakeUpInterval="5000" maxEntries="10000" strategy="LRU"/>
      <expiration maxIdle="100000"/>
      <lazyDeserialization enabled="true"/>
   </namedCache>
   
   <namedCache name="local-query">
      <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
               lockAcquisitionTimeout="15000" useLockStriping="false"/>
      <eviction wakeUpInterval="5000" maxEntries="10000" strategy="LRU"/>
      <expiration maxIdle="100000"/>
   </namedCache>

   <namedCache name="replicated-query">
      <clustering mode="replication">
         <async/>
      </clustering>
      <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
               lockAcquisitionTimeout="15000" useLockStriping="false"/>
      <eviction wakeUpInterval="5000" maxEntries="10000" strategy="LRU"/>
      <expiration maxIdle="100000"/>
      <loaders passivation="false" shared="false" preload="false">
         <loader class="org.infinispan.loaders.cluster.ClusterCacheLoader" fetchPersistentState="false"
                 ignoreModifications="false" purgeOnStartup="false">
            <properties>
               <property name="remoteCallTimeout" value="20000"/>
            </properties>
         </loader>
      </loaders>
   </namedCache>

   <namedCache name="timestamps">
      <clustering mode="replication">
         <async/>
      </clustering>
      <locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
               lockAcquisitionTimeout="15000" useLockStriping="false"/>
      <lazyDeserialization enabled="true"/>
      <eviction wakeUpInterval="0" strategy="NONE"/>
      <loaders passivation="false" shared="false" preload="false">
         <loader class="org.infinispan.loaders.cluster.ClusterCacheLoader" fetchPersistentState="false"
                 ignoreModifications="false" purgeOnStartup="false">
            <properties>
               <property name="remoteCallTimeout" value="20000"/>
            </properties>
         </loader>
      </loaders>
   </namedCache>

</infinispan>


And the content of my persistence.xml file is (comments removed) :

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
    version="2.0">
    <persistence-unit name="jpacache" transaction-type="JTA">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <jta-data-source>java:openejb/Resource/jpacacheDS</jta-data-source>
        <mapping-file>META-INF/orm.xml</mapping-file>
        <class>infiniSpanTest.Person</class>
        <class>infiniSpanTest.FemalePerson</class>
        <class>infiniSpanTest.MalePerson</class>
        <class>infiniSpanTest.Address</class>
        <class>infiniSpanTest.Family</class>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
            <property name="hibernate.show_sql" value="false" />
            <property name="hibernate.hbm2ddl.auto" value="create"/>
            <property name="hibernate.transaction.manager_lookup_class"
                      value="org.apache.openejb.hibernate.TransactionManagerLookup" />
                
            <property name="hibernate.cache.use_second_level_cache" value="true" />
            <property name="hibernate.cache.use_query_cache" value="true" />
                

            <property name="hibernate.cache.region.factory_class"
                value="org.hibernate.cache.infinispan.InfinispanRegionFactory" />
        
            <property name="hibernate.cache.infinispan.cfg"
                value="infinispan-configs.xml" />
                
            <property name="hibernate.cache.infinispan.infiniSpanTest.Family.cfg" 
                value="family-entity"/>
            <property name="hibernate.cache.infinispan.infiniSpanTest.Person.cfg" 
                value="person-entity"/>
            <property name="hibernate.cache.infinispan.infiniSpanTest.Address.cfg" 
                value="address-entity"/>
            <property name="hibernate.cache.infinispan.infiniSpanTest.Family.members.cfg" 
                value="members-collection"/>
            <property name="hibernate.cache.infinispan.infiniSpanTest.Address.inhabitants.cfg" 
                value="inhabitants-collection"/>

            <property name="hibernate.ejb.classcache.infiniSpanTest.Family"
                value="transactional" />
            <property name="hibernate.ejb.classcache.infiniSpanTest.Person"
                value="transactional" />
            <property name="hibernate.ejb.classcache.infiniSpanTest.Address"
                value="transactional" />
            <property name="hibernate.ejb.collectioncache.infiniSpanTest.Family.members"
                value="transactional" />
            <property name="hibernate.ejb.collectioncache.infiniSpanTest.Address.inhabitants"
                value="transactional" />
        </properties>
    </persistence-unit>
</persistence>


> TimeoutException with 2 or more nodes when there are Entity inserts, updates or removes.
> ----------------------------------------------------------------------------------------
>
>                 Key: ISPN-832
>                 URL: https://issues.jboss.org/browse/ISPN-832
>             Project: Infinispan
>          Issue Type: Bug
>          Components: State transfer
>    Affects Versions: 4.2.0.CR3
>         Environment: Windows XP + Hibernate 3.6.1-SNAPSHOT + OpenEjb 3.2-SNAPSHOT
>            Reporter: Cyrille Charron
>            Assignee: Galder Zamarreño
>         Attachments: InfiniSpanTest.zip
>
>
> Hello,
> I have some difficulties to run more than one Node 
> with Infinispan as a JPA Level2 cache (default configuration)
> with Hibernate as JPA provider and 
> with OpenEjb as JEE container.
> There are a lot of Locks between Nodes when I try to insert entities,
> even if each Node insert entities with a unique ID.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the infinispan-issues mailing list