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

Vinh Nguyen updated MUSE-255:
-----------------------------

    Description: 
In SimpleServiceGroup, resourceAdded() adds new ServiceGroupEntry resources to 
manage the members.  In resourceRemoved(), it removes the Entry resource from 
the mappings.  But it never calls entry.destroy(), so the ResourceManager still 
holds onto the Entry resources.

The fix should either be in removeEntry() to explicitly call 
entry.destroy()...or in resourceRemoved() which calls removeEntry().

[VN]:
The fix is to update resourceRemoved().  Just call entry.shutdown(), which will 
call removeEntry().
Don't call entry.shutdown() in removeEntry(), because it'll go into a 
loop...and removeEntry() will throw an EntryNotFound error because the entry 
doens't exist anymore.


  was:
In SimpleServiceGroup, resourceAdded() adds new ServiceGroupEntry resources to 
manage the members.  In resourceRemoved(), it removes the Entry resource from 
the mappings.  But it never calls entry.destroy(), so the ResourceManager still 
holds onto the Entry resources.

The fix should either be in removeEntry() to explicitly call 
entry.destroy()...or in resourceRemoved() which calls removeEntry().


Added the proper fix.

> SimpleServiceGroup memory leak, Entry resources not destroyed properly
> ----------------------------------------------------------------------
>
>                 Key: MUSE-255
>                 URL: https://issues.apache.org/jira/browse/MUSE-255
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>
> In SimpleServiceGroup, resourceAdded() adds new ServiceGroupEntry resources 
> to manage the members.  In resourceRemoved(), it removes the Entry resource 
> from the mappings.  But it never calls entry.destroy(), so the 
> ResourceManager still holds onto the Entry resources.
> The fix should either be in removeEntry() to explicitly call 
> entry.destroy()...or in resourceRemoved() which calls removeEntry().
> [VN]:
> The fix is to update resourceRemoved().  Just call entry.shutdown(), which 
> will call removeEntry().
> Don't call entry.shutdown() in removeEntry(), because it'll go into a 
> loop...and removeEntry() will throw an EntryNotFound error because the entry 
> doens't exist anymore.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to