zrlw commented on a change in pull request #8814:
URL: https://github.com/apache/dubbo/pull/8814#discussion_r711572176



##########
File path: 
dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClient.java
##########
@@ -197,20 +197,19 @@ public void startClose() {
      * @return
      */
     private void replaceWithLazyClient() {
-        // this is a defensive operation to avoid client is closed by 
accident, the initial state of the client is false
-        URL lazyUrl = url.addParameter(LAZY_CONNECT_INITIAL_STATE_KEY, 
Boolean.TRUE)
-                //.addParameter(RECONNECT_KEY, Boolean.FALSE)
-                .addParameter(SEND_RECONNECT_KEY, Boolean.TRUE.toString());
-        //.addParameter(LazyConnectExchangeClient.REQUEST_WITH_WARNING_KEY, 
true);
-
-        if (disconnectCount.getAndIncrement() % maxDisconnectCount == 0) {
+        if (disconnectCount.getAndIncrement() % maxDisconnectCount == 1) {

Review comment:
       
为什么要累计50次才告警呢?完全关闭之后再做close说明代码有bug吧,超过1次也是有bug,只是这个maxDisconnectCount名称起的不太合适,可能改称告警抑制阀值alarmSupressThreshold要好一些。




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to