Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double metric collection for tcp.connection.clientCount #15883

Closed
blazember opened this issue Oct 28, 2019 · 1 comment · Fixed by #15885
Closed

Double metric collection for tcp.connection.clientCount #15883

blazember opened this issue Oct 28, 2019 · 1 comment · Fixed by #15885
Assignees
Milestone

Comments

@blazember
Copy link
Contributor

@blazember blazember commented Oct 28, 2019

tcp.connection.clientCount is collected and published twice as the assertion error reports.

AssertionError: metric '[unit=count,metric=tcp.connection.clientCount]' was rendered twice
    at com.hazelcast.internal.metrics.jmx.JmxPublisher.publishNumber(JmxPublisher.java:100)
    at com.hazelcast.internal.metrics.jmx.JmxPublisher.publishLong(JmxPublisher.java:86)
    at com.hazelcast.internal.metrics.impl.MetricsService$PublisherMetricsCollector.collectLong(MetricsService.java:250)
    at com.hazelcast.internal.metrics.impl.MetricsCollectionCycle.collectLong(MetricsCollectionCycle.java:165)
    at com.hazelcast.internal.metrics.impl.MetricsCollectionCycle.collect(MetricsCollectionCycle.java:144)
    at com.hazelcast.internal.metrics.impl.MetricsCollectionCycle.extractAndCollectDynamicMetrics(MetricsCollectionCycle.java:116)
    at com.hazelcast.internal.metrics.impl.MetricsCollectionCycle.access$300(MetricsCollectionCycle.java:47)
    at com.hazelcast.internal.metrics.impl.MetricsCollectionCycle$MetricsContext.collect(MetricsCollectionCycle.java:183)
    at com.hazelcast.internal.nio.tcp.TcpIpUnifiedEndpointManager.provideDynamicMetrics(TcpIpUnifiedEndpointManager.java:118)
    at com.hazelcast.internal.nio.tcp.TcpIpNetworkingService$MetricsProvider.provideDynamicMetrics(TcpIpNetworkingService.java:393)
    at com.hazelcast.internal.metrics.impl.MetricsCollectionCycle.collectDynamicMetrics(MetricsCollectionCycle.java:89)
    at com.hazelcast.internal.metrics.impl.MetricsRegistryImpl.collect(MetricsRegistryImpl.java:287)
    at com.hazelcast.internal.metrics.impl.MetricsService.collectMetrics(MetricsService.java:157)
    at com.hazelcast.internal.metrics.impl.MetricsService.collectMetrics(MetricsService.java:152)
    at com.hazelcast.spi.impl.executionservice.impl.DelegateAndSkipOnConcurrentExecutionDecorator$DelegateDecorator.run(DelegateAndSkipOnConcurrentExecutionDecorator.java:77)
    at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64)
    at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80)
@blazember blazember added this to the 4.0 milestone Oct 28, 2019
@blazember blazember self-assigned this Oct 28, 2019
@blazember

This comment has been minimized.

Copy link
Contributor Author

@blazember blazember commented Oct 28, 2019

This happens because both TcpIpEndpointManager and its child TcpIpUnifiedEndpointManager provides this as a metric source under tcp.connection namespace. The solution should be making TcpIpUnifiedEndpointManager not to provide dynamic metrics since all of its metrics are provided by its parent.

blazember added a commit to blazember/hazelcast that referenced this issue Oct 28, 2019
Both `TcpIpUnifiedEndpointManager` and `TcpIpEndpointManager` provided
dynamic metrics while the first extends the latter. This results in
double metrics collection. This issue is solved by making
`TcpIpUnifiedEndpointManager` not providing dynamic metrics since those
are already provided by its parent.

Fixes hazelcast#15883
blazember added a commit that referenced this issue Oct 29, 2019
Both TcpIpUnifiedEndpointManager and TcpIpEndpointManager provided
dynamic metrics while the first extends the latter. This results in
double metrics collection. This issue is solved by making
TcpIpUnifiedEndpointManager not providing dynamic metrics since those
are already provided by its parent.

Fixes #15883
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.