You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2016/01/20 13:19:39 UTC
[jira] [Resolved] (SLING-5205) Check for potential memory leaks
[ https://issues.apache.org/jira/browse/SLING-5205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Munteanu resolved SLING-5205.
------------------------------------
Resolution: Done
This was actually nothing to fix in the new API IMO. What happens is that when a ResourceResolver is created it holds a reference to the ResourceProviderStorage at the time of the creation.
When a provider is create / changed / removed a new ResourceProviderStorage instance is created, with the updated provider list.
Long-running ResourceResolvers will therefore hold on to an outdated list of providers.
The only fix that I can see being applied here is making the ResourceProviderInstance thread-safe and shared between all ResourceResolver instances, but I'm not sure the extra code complexity is worth it.
> Check for potential memory leaks
> --------------------------------
>
> Key: SLING-5205
> URL: https://issues.apache.org/jira/browse/SLING-5205
> Project: Sling
> Issue Type: Sub-task
> Components: ResourceResolver
> Reporter: Carsten Ziegeler
> Assignee: Robert Munteanu
> Fix For: Resource Resolver 1.3.0
>
> Attachments: duplicate-mongodb-resource-provider.png, shortest-path.png
>
>
> With long running resource resolvers and provider dynamically being registered, we need to check that we don't hold too strong references on the providers
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)