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

Memory leaks for 2 phase commit readonly transaction

    Details

    • Steps to Reproduce:
      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.

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manik Manik Surtani
                  Reporter:
                  changgeng Changgeng Li
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: