[ 
https://issues.apache.org/jira/browse/CAY-2876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev closed CAY-2876.
--------------------------------
    Resolution: Fixed

*5.0*: 
https://github.com/apache/cayenne/commit/7fe25cd54e90f54c4514dbb52e9bac3a4f6235b0
*4.2*: https://github.com/apache/cayenne/pull/628

> Memory leak in the ObjectStore
> ------------------------------
>
>                 Key: CAY-2876
>                 URL: https://issues.apache.org/jira/browse/CAY-2876
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 4.1, 4.1.1, 4.2, 4.2.1, 5.0-M1
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.2.2, 5.0-M2
>
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Under some use cases default {{ObjectStore}} implementation could lead to a 
> considerable memory leak.
> Conditions are following:
>  # Cayenne objects use flattened attributes
>  # 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}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to