[
https://issues.apache.org/jira/browse/GEODE-9307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17369154#comment-17369154
]
ASF subversion and git services commented on GEODE-9307:
--------------------------------------------------------
Commit 1f0eda2768c1ad1f0feb2b418a84c2de931d9d89 in geode's branch
refs/heads/master from Barry Oglesby
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=1f0eda2 ]
GEODE-9307: Removed MembershipListener after force disconnect (#6515)
(cherry picked from commit 2bc4bd93a6c24ea32c3a44c502fcb20c0a255cb4)
> 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
> Fix For: 1.12.3, 1.13.3, 1.14.0, 1.15.0
>
>
> 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)