3 Replies Latest reply on Aug 28, 2011 7:12 AM by avibh

    replication timeout using transaction

    avibh

      Hi,

      my recent project requires transactional replicated cache, there for after looking into Hazelcast and EhCache i choose Infinispan which had the right set of features for me.

      I'm using Infinispan 4.2.1 final with 3 caches involved in the transaction (multiple writes to each).

      each cache is configured to sync replication.

      my tests were made with 2 nodes, one node, the producer, is working with transactions (under JBoss server) and the other node, the reciever, is a simple java application.

      each node has the same configuration except for the transaction part.

      everything works ok when running simple tests with minimum writes to the caches.

      the problem starts when doing multiple writes to caches (10+ writes each cache), I get replication timeouts causing heuristic transctions rollback.

      since I had listeners on each cache on each node i noticed that the reciever node actually got the first event but nothing more.

       

      my future cluster will be 10+ node and I dont want to change my current transaction timeout so I decided to change the replication to async mode.

      in this case running the same test was even worse, the nodes recognize each other on JGroups but no replication was done.

      i've added replication queue configuration and still nothing.

       

      note that running 2 simple java applications with high volume of events went well both in sync and async mode with the same configuration as above, except for the transaction part (no transaction). so I assume there is no problem with JGroups or any other configuration.

       

      can someone tell me what am I missing here?

        • 1. Re: replication timeout using transaction
          avibh

          here's the solution for this issue in order to make things easier for others -

           

          it seems that Infinispan is having dificulties handing multiple nodes with transaction on/off.

          this scenario involved 2 nodes, one using transactions, and the other without. this caused locking issues for infinispan.

           

          this issue was solved when switching to multiple nodes, all working with transactions.

          • 2. Re: replication timeout using transaction
            galder.zamarreno

            Just to reiterate the obvious thing, cache configurations need to be symmetric in all nodes in the cluster. IOW, if cache X is configured with X, Y, Z, it needs to configured in the same way in all nodes in the cluster.

             

            We could enforce this on startup, verifying that all nodes' configurations are symmetric.

            • 3. Re: replication timeout using transaction
              avibh

              indeed thats a nice feature to have for a novice user like i was....