[
https://issues.apache.org/jira/browse/IGNITE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16324440#comment-16324440
]
ASF GitHub Bot commented on IGNITE-6923:
----------------------------------------
GitHub user alex-plekhanov opened a pull request:
https://github.com/apache/ignite/pull/3369
IGNITE-6923 Cache metrics optimization
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/alex-plekhanov/ignite IGNITE-6923
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/3369.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 #3369
----
commit eef3fed408d7cfbeedcabcb354989c64be773724
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-19T14:44:06Z
IGNITE-6923 Optimized nonHeapMemoryUsed
commit 122467d0ca4cfe859e2fc5af276b20c4f50dc89c
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-20T16:13:34Z
IGNITE-6923 getTotalPartitionsCount, getRebalancingPartitionsCount
optimization
commit e20d842f9ccf9c4d1e4703a52cd723d8e37ddbea
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-22T08:56:36Z
IGNITE-6923 Cluster metrics optimization (proxy class implemented)
commit bff0a1845799ad90c6ecdd3812e84418ba45bd07
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-25T08:40:24Z
IGNITE-6923 Partitions metrics optimization
commit 6dd59b9961f9fc073d4616367e36607430f113b8
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-26T12:57:01Z
IGNITE-6923 Cache metrics optimization
commit 96b0396f05c7aacb24bd9ee88e2564d240fae0be
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-26T12:58:30Z
IGNITE-6923 Cache metrics optimization
commit 79067428f7252700bb23d29f3e3b4b7dfa5586bf
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-27T07:48:56Z
IGNITE-6923 Disable cache metrics update flag
commit 5e5d675f6fb6a25eda57fcbf53e49ec87fda3ba2
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-27T08:07:57Z
IGNITE-6923 License header
commit e90d778d9fab0b1e467ef1314505060494fea1db
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2018-01-11T20:57:29Z
IGNITE-6923 Bugfix
commit 77e50a74dadc6ae40d301f63cd0e4b73b6203303
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2018-01-12T14:43:29Z
IGNITE-6923 Unit test
commit 39f7c653e8b91ec7b02244e2633e27ea9103793d
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2018-01-12T14:47:35Z
Revert "IGNITE-6923 Disable cache metrics update flag"
This reverts commit 9bb904f
commit 62ea9f5d6524eff6e9a69fbc8ca2ac0c95325796
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2018-01-12T19:24:57Z
IGNITE-6923 Test comment added
----
> Cache metrics are updated in timeout-worker potentially delaying critical
> code execution due to current implementation issues.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-6923
> URL: https://issues.apache.org/jira/browse/IGNITE-6923
> Project: Ignite
> Issue Type: Improvement
> Affects Versions: 2.3
> Reporter: Alexei Scherbakov
> Assignee: Aleksey Plekhanov
> Priority: Critical
> Labels: iep-6
> Fix For: 2.4
>
>
> Some metrics are using cache iteration for calculation. If number of caches
> rather large this can be slow.
> Similar code is running in discovery thread.
> See stack trace for example.
> {noformat}
> "grid-timeout-worker-#39%DPL_GRID%DplGridNodeName%" #152 prio=5 os_prio=0
> tid=0x00007f1009a03000 nid=0x5caa runnable [0x00007f0f059d9000]
> java.lang.Thread.State: RUNNABLE
> at java.util.HashMap.containsKey(HashMap.java:595)
> at java.util.HashSet.contains(HashSet.java:203)
> at
> java.util.Collections$UnmodifiableCollection.contains(Collections.java:1032)
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$3.apply(IgniteCacheOffheapManagerImpl.java:339)
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$3.apply(IgniteCacheOffheapManagerImpl.java:337)
> at
> org.apache.ignite.internal.util.lang.gridfunc.TransformFilteringIterator.hasNext:@TransformFilteringIterator.java:90)
> at
> org.apache.ignite.internal.util.lang.GridIteratorAdapter.hasNext(GridIteratorAdapter.java:45)
>
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.cacheEntriesCount(IgniteCacheOffheapManagerImpl.java:293)
> at
> org.apache.ignite.internal.processors.cache.CacheMetricsImpl.getOffHeapPrimaryEntriesCount(CacheMetricsImpl.java:240)
> at
> org.apache.ignite.internal.processors.cache.CacheMetricsSnapshot.<init>(CacheMetricsSnapshot.java:271)
>
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.localMetrics(GridCacheAdapter.java:3217)
>
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.cacheMetrics(GridDiscoveryManager.java:1151)
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.nonHeapMemoryUsed(GridDiscoveryManager.java:1121)
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.metrics(GridDiscoveryManager.java:1087)
>
> at
> org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode.metrics(TcpDiscoveryNode.java:269)
>
> at
> org.apache.ignite.internal.IgniteKernal$3.run(IgniteKernal.java:1175)
> at
> org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$CancelableTask.onTimeout(GridTimeoutProcessor.java:256)
> - locked <0x00007f115f5bf890> (a
> org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$CancelableTask)
> at
> org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$TimeoutWorker.body(GridTimeoutProcessor.java:158)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)