Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2876

Memory leak in the ObjectStore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.1, 4.1.1, 4.2, 4.2.1, 5.0-M1
    • 4.2.2, 5.0-M2
    • Core Library
    • None

    Description

      Under some use cases default ObjectStore implementation could lead to a considerable memory leak.

      Conditions are following:

      1. Cayenne objects use flattened attributes
      2. Application uses a shared readonly context that is never cleaned or removed

      If those conditions are met ObjectStore.trackedFlattenedPaths just slowly grows (speed depends on how many different objects with flattened paths are loaded) and never freed.

      NOTE: ObjectStore.objectMap grows too in this case, but it's a weak-ref based map by default, so it's memory is actually reclaimed by the JVM, while ObjectStore.trackedFlattenedPaths is just a regular ConcurrentHashMap.

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            ntimofeev Nikita Timofeev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: