3 Replies Latest reply on Mar 6, 2012 11:38 AM by galder.zamarreno

    Transactional cache with 5.1 upgrade

    sudheerk84

      We have recently upgraded to 5.1 and since we heavily use transactions, we have used teh techniqueue as explained in teh documentation for back ward compatibility. (that is make all caches tarnactional).

       

      We have made this change because, it was very difficult for us to to go to each cache and check if it has to work transactionally or not.  Hence i was interested to know if am lossing any performance benefit of upgrade by just making all caches transactional.

       

       

      Also most of my caches and populated in the begining(server startup) , and used(read only) in many business use cases whihc are transactional. Whihc means that most of my caches are just read inside a transaction , and this also forces me to make my cache transactional.  Is my understanding right here OR only caches which are written transtcionally needs to be declared transactional ?

       

      Thanks

        • 1. Re: Transactional cache with 5.1 upgrade
          galder.zamarreno

          There's a performance penalty to making caches transactional, particularly if you're configured to interact with the TM as an XA resource rather than a Synchronization.

           

          If you're only reading data within a transaction, no locks are acquired, so performance penalty is limited.

           

          You can probably just make those caches non-transactional. Simply mark the cache as non-transactional and it should work fine.

          • 2. Re: Transactional cache with 5.1 upgrade
            sudheerk84

            " You can probably just make those caches non-transactional. Simply mark the cache as non-transactional and it should work fine."

             

            Just to clarify - Does this mean, even if i read from a cache inside a transaction,  that cache from whihc i read  can be a non transactional cache ?

            • 3. Re: Transactional cache with 5.1 upgrade
              galder.zamarreno

              I think so. If you mark the cache as non-transactional, it shouldn't do any checks on whether a TM is available, whether a transaction is running...etc.