You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/25 00:23:00 UTC

[jira] [Updated] (GEODE-9307) When a server is force disconnected, its regions can still be referenced

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

ASF GitHub Bot updated GEODE-9307:
----------------------------------
    Labels: pull-request-available  (was: )

> When a server is force disconnected, its regions can still be referenced
> ------------------------------------------------------------------------
>
>                 Key: GEODE-9307
>                 URL: https://issues.apache.org/jira/browse/GEODE-9307
>             Project: Geode
>          Issue Type: Bug
>          Components: regions
>            Reporter: Barrett Oglesby
>            Assignee: Barrett Oglesby
>            Priority: Major
>              Labels: pull-request-available
>
> When a server is force disconnected, any of its DistributedRegions will not be GCed after they are closed. This is really only a problem if the GemFireCacheImpl is referenced in something other than the ClusterDistributionManager.cache field (in my test, I used a static field of a Function)
> The GemFireCacheImpl references a ClusterDistributionManager in the final field called dm.
> The DistributedRegion creates and references a DistributionAdvisor in the final field called distAdvisor. The DistributionAdvisor creates a MembershipListener and adds it to the ClusterDistributionManager's membershipListeners.
> When the GemFireCacheImpl is closed due to force disconnect, its regions are also closed.
> When a DistributedRegion is closed, its DistributionAdvisor is also closed.
> DistributionAdvisor.close attempts to remove the MembershipListener
> {noformat}
> try {
>   getDistributionManager().removeMembershipListener(membershipListener);
> } catch (CancelException e) {
>   // if distribution has stopped, above is a no-op.
> } ...
> {noformat}
> That call fails with a CancelException, and the MembershipListener is not removed, so the ClusterDistributionManager references both the GemFireCacheImpl and the MembershipListener. The MembershipListener references the DistributionAdvisor which references the DistributedRegion.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)