[
https://issues.apache.org/jira/browse/IGNITE-8243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16440848#comment-16440848
]
ASF GitHub Bot commented on IGNITE-8243:
----------------------------------------
GitHub user Jokser opened a pull request:
https://github.com/apache/ignite/pull/3850
IGNITE-8243 Fixed possible memory leak
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite ignite-8243
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/3850.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3850
----
commit 5d2a9d883ecc031b64f27ebe837cd471321dc677
Author: Pavel Kovalenko <jokserfn@...>
Date: 2018-04-17T13:20:56Z
IGNITE-8243 Fixed possible memory leak. Added latch manager to diagnostic
messages.
----
> Possible memory leak at ExchangeLatchManager during dynamic creating/removing
> of the local caches
> -------------------------------------------------------------------------------------------------
>
> Key: IGNITE-8243
> URL: https://issues.apache.org/jira/browse/IGNITE-8243
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: 2.5
> Reporter: Andrey Aleksandrov
> Assignee: Pavel Kovalenko
> Priority: Major
> Fix For: 2.5
>
> Attachments: image.png, reproducer.java
>
>
> Reproducer was attached. Memory analizer report was attached too.
> Looks like that next collection never removes its items in case of dynamic
> creating/removing of the local caches:
> /** Server latches collection. */
> private final ConcurrentMap<T2<String, AffinityTopologyVersion>, ServerLatch>
> serverLatches = new ConcurrentHashMap<>();
> To see it you can modify source code a little:
> private Latch createServerLatch(String id, AffinityTopologyVersion topVer,
> Collection<ClusterNode> participants) {
> final T2<String, AffinityTopologyVersion> latchId = new T2<>(id, topVer);
> if (serverLatches.containsKey(latchId))
> return serverLatches.get(latchId);
> ServerLatch latch = new ServerLatch(id, topVer, participants);
> serverLatches.put(latchId, latch);
> if (log.isDebugEnabled())
> log.debug("Server latch is created [latch=" + latchId + ",
> participantsSize=" + participants.size() + "]");
> log.error("Server latch is created [size=" + serverLatches.size() +
> ", latchId = " + latchId + "]");
> And add some breakpoints in places where removing can be done.
> Log should be like that:
> [2018-04-13 09:55:44,911][ERROR][exchange-worker-#42][ExchangeLatchManager]
> Server latch is created [size=1990, latchId = IgniteBiTuple [val1=exchange,
> val2=AffinityTopologyVersion [topVer=1, minorTopVer=1989]]]
> [2018-04-13 09:55:44,911][ERROR][exchange-worker-#42][ExchangeLatchManager]
> Server latch is created [size=1991, latchId = IgniteBiTuple [val1=exchange,
> val2=AffinityTopologyVersion [topVer=1, minorTopVer=1990]]]
> [2018-04-13 09:55:44,911][ERROR][exchange-worker-#42][ExchangeLatchManager]
> Server latch is created [size=1992, latchId = IgniteBiTuple [val1=exchange,
> val2=AffinityTopologyVersion [topVer=1, minorTopVer=1991]]]
> [2018-04-13 09:55:44,926][ERROR][exchange-worker-#42][ExchangeLatchManager]
> Server latch is created [size=1993, latchId = IgniteBiTuple [val1=exchange,
> val2=AffinityTopologyVersion [topVer=1, minorTopVer=1992]]]
> [2018-04-13 09:55:44,926][ERROR][exchange-worker-#42][ExchangeLatchManager]
> Server latch is created [size=1994, latchId = IgniteBiTuple [val1=exchange,
> val2=AffinityTopologyVersion [topVer=1, minorTopVer=1993]]]
> [2018-04-13 09:55:44,926][ERROR][exchange-worker-#42][ExchangeLatchManager]
> Server latch is created [size=1995, latchId = IgniteBiTuple [val1=exchange,
> val2=AffinityTopologyVersion [topVer=1, minorTopVer=1994]]]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)