Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-845

Memory leaks for 2 phase commit readonly transaction

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Hide

      Create a method that calls get methods of two different caches.
      Wrap this method with @Transactional(readOnly=true), and manage this bean in a spring IOC container.

      Invoke the method looply.

      Show
      Create a method that calls get methods of two different caches. Wrap this method with @Transactional(readOnly=true), and manage this bean in a spring IOC container. Invoke the method looply.

      If a method that is declared with read only transactional attribute by '@Transactional(readOnly=true)', using jboss transaction manager, and inside this method two caches are visited, there will be memory leak after the method is invoked.

      The leak happens in TransactionTable instances, localTransactions map and xid2LocalTx map. It seems the commit phrase is skipped and the cleanup method is failed to be called to clean entries in these two maps.

      My test shows if the transaction just enlists one cache, there won't be any problems, but I haven't test whether using DummyTransactionManagerLookup will resolve this.

      This bug break our system where readOnly DAO methods are heavily used with infinispan as hibernate second level cache.

              manik_jira Manik Surtani (Inactive)
              changgeng Changgeng Li (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: