[ https://issues.apache.org/jira/browse/GEODE-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hanson closed GEODE-4993. ------------------------------ Transition from Resolved to Closed for Apache Geode 1.11.0 RC4 release. > GatewaySender connection stats are captured but not stored > ---------------------------------------------------------- > > Key: GEODE-4993 > URL: https://issues.apache.org/jira/browse/GEODE-4993 > Project: Geode > Issue Type: Improvement > Components: statistics, wan > Reporter: Barrett Oglesby > Assignee: Alberto Bustamante Reyes > Priority: Major > Labels: pull-request-available > Fix For: 1.11.0 > > Attachments: geode-4993.diff > > Time Spent: 2h 20m > Remaining Estimate: 0h > > The GatewaySender connection stats are captured but not stored in the gfs > file. a GatewaySenderEventRemoteDispatcher causes ConnectionStats to be > created when its connection is created. For some reason, these are saved to a > DummyStatisticsFactory (which causes them not to be saved): > {noformat} > if (pool.getGatewaySender() != null) { > stats = new ConnectionStats(new DummyStatisticsFactory(), statName, > this.poolStats); > } > {noformat} > If something like this were done instead, then those statistics would be > saved in the gfs file under an appropriate name: > {noformat} > if (pool.getGatewaySender() != null) { > String statName = pool.getGatewaySender().getId() + "-" + > location.toString(); > stats = new ConnectionStats(ds, "GatewaySender", statName, this.poolStats); > } > public ConnectionStats(StatisticsFactory factory, String prefix, String name, > PoolStats poolStats/* , GatewayStats gatewayStats */) { > this.stats = factory.createAtomicStatistics(type, prefix + "Stats-" + name); > this.sendStats = factory.createAtomicStatistics(sendType, prefix + > "SendStats-" + name); > this.poolStats = poolStats; > } > {noformat} > The kinds of stats tracked by the ConnectionStats include: > - connections > - sentBytes > - receivedBytes > Here is a stack trace showing where the ConnectionStats are created: > {noformat} > java.lang.Exception: Stack trace > at java.lang.Thread.dumpStack(Thread.java:1329) > at > org.apache.geode.cache.client.internal.ConnectionStats.<init>(ConnectionStats.java:1716) > at > org.apache.geode.cache.client.internal.EndpointManagerImpl.getStats(EndpointManagerImpl.java:225) > at > org.apache.geode.cache.client.internal.EndpointManagerImpl.referenceEndpoint(EndpointManagerImpl.java:75) > at > org.apache.geode.cache.client.internal.ConnectionImpl.connect(ConnectionImpl.java:124) > at > org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:137) > at > org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:259) > at > org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.borrowConnection(ConnectionManagerImpl.java:242) > at > org.apache.geode.cache.client.internal.PoolImpl.acquireConnection(PoolImpl.java:910) > at > org.apache.geode.internal.cache.wan.GatewaySenderEventRemoteDispatcher.initializeConnection(GatewaySenderEventRemoteDispatcher.java:398) > at > org.apache.geode.internal.cache.wan.GatewaySenderEventRemoteDispatcher.getConnection(GatewaySenderEventRemoteDispatcher.java:331) > at > org.apache.geode.internal.cache.wan.GatewaySenderEventRemoteDispatcher._dispatchBatch(GatewaySenderEventRemoteDispatcher.java:208) > at > org.apache.geode.internal.cache.wan.GatewaySenderEventRemoteDispatcher.dispatchBatch(GatewaySenderEventRemoteDispatcher.java:157) > at > org.apache.geode.internal.cache.wan.AbstractGatewaySenderEventProcessor.processQueue(AbstractGatewaySenderEventProcessor.java:610) > at > org.apache.geode.internal.cache.wan.AbstractGatewaySenderEventProcessor.run(AbstractGatewaySenderEventProcessor.java:1051) > {noformat} > -- This message was sent by Atlassian Jira (v8.3.4#803005)