sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Edelson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SLING-7517) Memory Leak for "fake" Request objects in ModelAdapterFactory with interface-based models
Date Mon, 26 Feb 2018 19:33:00 GMT

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

Justin Edelson updated SLING-7517:
----------------------------------
    Summary: Memory Leak for "fake" Request objects in ModelAdapterFactory with interface-based
models  (was: CLONE - Memory Leak for "fake" Request objects in ModelAdapterFactory)

> Memory Leak for "fake" Request objects in ModelAdapterFactory with interface-based models
> -----------------------------------------------------------------------------------------
>
>                 Key: SLING-7517
>                 URL: https://issues.apache.org/jira/browse/SLING-7517
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Sling Models Impl 1.4.6
>            Reporter: Justin Edelson
>            Assignee: Justin Edelson
>            Priority: Critical
>             Fix For: Sling Models Impl 1.4.8
>
>
> The functionality added in SLING-5668 to dispose of OSGi services (or anything else
needing disposal when creating a Sling Model object) based on the ServletRequest lifecycle
only works if the ServletRequest object was actually created by the ServletContext. In some
cases, applications make construct "fake" request object (primarily for use with SlingRequestProcessor).
In these cases, since the ServletContext didn't create these requests, it won't call the
requestDestroyed method when they are complete.
>  
> The easiest way to resolve this is to only apply the special behavior in SLING-5668 to
request objects actually created by the ServletContext and use the general-purpose ReferenceQueue
method for all other requests (and all other adaptables).
>  
> The fix in SLING-7470 was incomplete and only addressed class-based models. Interface-based
models were not fixed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message