Uploaded image for project: 'Hibernate ORM'
  1. HHH-10782

Add a comment about what you can expect from a query plan cache cleanup

    Details

    • Last commented by a user?:
      true
    • Sprint:

      Description

      Hello!

      We found possible memory leak in BoundedConcurrentHashMap.LIRS implementation.

      I think that problem is in a org.hibernate.internal.util.collections.BoundedConcurrentHashMap.LIRS.clear() method.

      This method clear an accessQueue variable but LIRS stack (represented by a header variable) is not cleared.

      I attached an image from heap analysis to demonstrate this problem.

      In this example SessionFactoryImpl is properly closed (method close() is called on every instance of LIRS).

      Thanks,
      Samuel

        Attachments

        1. Eclipse_Memory_Analyzer_1.png
          113 kB
        2. Eclipse_Memory_Analyzer_2.png
          261 kB
        3. Eclipse_Memory_Analyzer_3.png
          265 kB
        4. Eclipse_Memory_Analyzer_4.png
          258 kB
        5. Eclipse_Memory_Analyzer_5.png
          138 kB
        6. Eclipse_Memory_Analyzer_8.png
          707 kB
        7. hibernate_leak.png
          101 kB
        8. QueriesCached.png
          181 kB

          Activity

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: