[ 
https://issues.apache.org/jira/browse/SCB-849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585314#comment-16585314
 ] 

ASF GitHub Bot commented on SCB-849:
------------------------------------

wujimin commented on a change in pull request #876: [SCB-849] refactor producer 
connection limit using vertx metrics spi mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/876#discussion_r211121430
 
 

 ##########
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##########
 @@ -67,19 +61,16 @@ public void init(Vertx vertx, String sslKey, 
AsyncResultCallback<InetSocketAddre
     }
 
     netServer.connectHandler(netSocket -> {
-      int connectedCount = connectedCounter.incrementAndGet();
+      int connectedCount = ((SCBTCPMetrics) ((NetSocketImpl) 
netSocket).metrics()).getConnectedCounter().get();
 
 Review comment:
   why we can get the SCBTCPMetrics instance?
   
   SCBTCPMetrics instance is for VertxMetrics
   but netSocket.metrics() is TcpMetrics instance that returned by 
SCBTCPMetrics .createMetrics, but you returned Void
   so, i can not understand.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> refactor producer connection limit using vertx metrics spi mechanism
> --------------------------------------------------------------------
>
>                 Key: SCB-849
>                 URL: https://issues.apache.org/jira/browse/SCB-849
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>    Affects Versions: java-chassis-1.1.0
>            Reporter: yangyongzheng
>            Assignee: yangyongzheng
>            Priority: Major
>             Fix For: java-chassis-1.1.0
>
>
> we can use vertx metrics spi mechanism to simplify  connection limit feature



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to