3 Replies Latest reply on Nov 24, 2011 6:39 PM by sannegrinovero

    how reliable are transactions spanning two caches?

    gdanov

      Hi,

      I want to have two caches storing different data (but with same key affinity) in distributed cache. How reliable are the transactions that span two caches (compared to single-cache transaction)?

      Are there significant benefits with the new singlenodelocking model if the transacton is started on the node owning the key? What happens when this node goes down while the transacton is being commited?

       

      Best Regards,

      Georgi

        • 1. Re: how reliable are transactions spanning two caches?
          gdanov

          hi,

          I did some prototyping in which I update two caches within the same transaction. For transaction demarcation I use only one of the cache manager, expecting it to manage the updates to both caches. In the end I get lots of errors for transactions that did not finish in time.

          How do I handle transactions that update several caches from the same cache manager?

           

          Cheers,

          Georgi

          • 2. Re: how reliable are transactions spanning two caches?
            gdanov

            okay, I isolated the situation where I get timeouted transactions - as said one transaction spanning two caches and one of the keys is local , the other remote; additionally cache is distributed_sync with transaction configured syncCommitPhase="false"...

            • 3. Re: how reliable are transactions spanning two caches?
              sannegrinovero

              Hi Georgi,

              your use case is supposed to work fine. Could you please create a test case so that we can reproduce the problem? Feel free to create an issue in JIRA and attach your test there.

               

              Are there significant benefits with the new singlenodelocking model if the transacton is started on the node owning the key?

              Yes, you might avoid manay RPC, if your node is the only owner the you might avoid all RPCs.

               

              What happens when this node goes down while the transacton is being commited?

              Infinispan supports XA transactions, which includes support for recovery but it depends on your transaction manager. When using the JBoss TM for example, the transaction could be recovered or aborted from the transaction log.