You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/01/05 10:03:25 UTC

[GitHub] [dubbo-go] jack15083 opened a new pull request #985: 修复zk连接丢失后consumer端cache的provider服务被置空的bub

jack15083 opened a new pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985


   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request. 
   -->
   
   **What this PR does**:
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on a change in pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r553118587



##########
File path: config/reference_config.go
##########
@@ -257,9 +257,15 @@ func (c *ReferenceConfig) GenericLoad(id string) {
 	c.Implement(genericService)
 }
 
+// GetInvoker get invoker from ReferenceConfig
+func (c *ReferenceConfig) GetInvoker() protocol.Invoker {
+	return c.invoker
+}
+

Review comment:
       https://github.com/apache/dubbo-go/pull/940 我是把这个pr也带进来了




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] Patrick0308 commented on a change in pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
Patrick0308 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r552399460



##########
File path: config/reference_config.go
##########
@@ -257,9 +257,15 @@ func (c *ReferenceConfig) GenericLoad(id string) {
 	c.Implement(genericService)
 }
 
+// GetInvoker get invoker from ReferenceConfig
+func (c *ReferenceConfig) GetInvoker() protocol.Invoker {
+	return c.invoker
+}
+

Review comment:
       Is it  useless?

##########
File path: registry/zookeeper/registry.go
##########
@@ -226,14 +226,15 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error {
 	if err != nil {
 		logger.Errorf("Register temp node(root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
 		if perrors.Cause(err) == zk.ErrNodeExists {
+			return nil
 			// should delete the old node
-			logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
+			/*logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
 			if err = r.client.Delete(zkPath); err == nil {
 				_, err = r.client.RegisterTemp(root, node)
 			}
 			if err != nil {
 				logger.Errorf("Recreate the temp node failed, (root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
-			}
+			}*/

Review comment:
       I don't know why delete these. It  may be make some problem.

##########
File path: remoting/zookeeper/client.go
##########
@@ -259,14 +259,14 @@ func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) {
 			switch (int)(event.State) {
 			case (int)(zk.StateDisconnected):
 				logger.Warnf("zk{addr:%s} state is StateDisconnected, so close the zk client{name:%s}.", z.ZkAddrs, z.name)
-				z.stop()
 				z.Lock()
 				conn := z.Conn
 				z.Conn = nil
 				z.Unlock()
 				if conn != nil {
 					conn.Close()
 				}
+				z.stop()

Review comment:
       Stop first is correctly.  And then close connection.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io edited a comment on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (359482c) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/425c03f7ef6214ff1387594fd4b47206a449261b?el=desc) (425c03f) will **decrease** coverage by `0.17%`.
   > The diff coverage is `8.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   - Coverage    59.90%   59.73%   -0.18%     
   ===========================================
     Files          261      261              
     Lines        12912    12906       -6     
   ===========================================
   - Hits          7735     7709      -26     
   - Misses        4224     4225       +1     
   - Partials       953      972      +19     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (-0.79%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `48.95% <0.00%> (+0.77%)` | :arrow_up: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `60.46% <0.00%> (-0.36%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `44.16% <20.00%> (-1.30%)` | :arrow_down: |
   | [filter/filter\_impl/metrics\_filter.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL21ldHJpY3NfZmlsdGVyLmdv) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
   | [filter/filter\_impl/auth/sign\_util.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL2F1dGgvc2lnbl91dGlsLmdv) | `54.54% <0.00%> (-7.36%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `63.34% <0.00%> (-5.38%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-4.82%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `50.52% <0.00%> (-3.16%)` | :arrow_down: |
   | ... and [34 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [425c03f...0735f8e](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] champly commented on a change in pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
champly commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r561616544



##########
File path: remoting/zookeeper/client.go
##########
@@ -259,14 +259,14 @@ func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) {
 			switch (int)(event.State) {
 			case (int)(zk.StateDisconnected):
 				logger.Warnf("zk{addr:%s} state is StateDisconnected, so close the zk client{name:%s}.", z.ZkAddrs, z.name)
-				z.stop()
 				z.Lock()
 				conn := z.Conn
 				z.Conn = nil
 				z.Unlock()
 				if conn != nil {
 					conn.Close()
 				}
+				z.stop()

Review comment:
       应该是stop发出去了,但z.Conn还没清空,重新`ValidateZookeeperClient`里面发现 Conn 不为空,不会重新连接(不会重连失败),然后继续执行stop之后的逻辑就把连接关了




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] champly commented on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
champly commented on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-764395815


   我们也遇到了相同的问题,按照修改已经解决了


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on a change in pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r553915795



##########
File path: registry/zookeeper/registry.go
##########
@@ -226,14 +226,15 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error {
 	if err != nil {
 		logger.Errorf("Register temp node(root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
 		if perrors.Cause(err) == zk.ErrNodeExists {
+			return nil
 			// should delete the old node
-			logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
+			/*logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
 			if err = r.client.Delete(zkPath); err == nil {
 				_, err = r.client.RegisterTemp(root, node)
 			}
 			if err != nil {
 				logger.Errorf("Recreate the temp node failed, (root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
-			}
+			}*/

Review comment:
       这段逻辑可能还不能删掉等我再测试一段时间再看吧




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-766610313


   > You should resolve conflicts, @jack15083 hi, what your name in dingding?
   
   冲突已经解决了


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on a change in pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r553121111



##########
File path: remoting/zookeeper/client.go
##########
@@ -259,14 +259,14 @@ func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) {
 			switch (int)(event.State) {
 			case (int)(zk.StateDisconnected):
 				logger.Warnf("zk{addr:%s} state is StateDisconnected, so close the zk client{name:%s}.", z.ZkAddrs, z.name)
-				z.stop()
 				z.Lock()
 				conn := z.Conn
 				z.Conn = nil
 				z.Unlock()
 				if conn != nil {
 					conn.Close()
 				}
+				z.stop()

Review comment:
       ![image](https://user-images.githubusercontent.com/2142066/103855840-762c8600-50ee-11eb-909e-21bb31307d17.png)
   看这段代码有可能stop消息已经发出去了 但z.Conn还没清空,导致重连的时候失败,这段代码我是测试过了的,确实会出现这样的问题,虽然概率较低




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io edited a comment on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (359482c) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/425c03f7ef6214ff1387594fd4b47206a449261b?el=desc) (425c03f) will **decrease** coverage by `0.17%`.
   > The diff coverage is `8.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   - Coverage    59.90%   59.73%   -0.18%     
   ===========================================
     Files          261      261              
     Lines        12912    12906       -6     
   ===========================================
   - Hits          7735     7709      -26     
   - Misses        4224     4225       +1     
   - Partials       953      972      +19     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (-0.79%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `48.95% <0.00%> (+0.77%)` | :arrow_up: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `60.46% <0.00%> (-0.36%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `44.16% <20.00%> (-1.30%)` | :arrow_down: |
   | [filter/filter\_impl/metrics\_filter.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL21ldHJpY3NfZmlsdGVyLmdv) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
   | [filter/filter\_impl/auth/sign\_util.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL2F1dGgvc2lnbl91dGlsLmdv) | `54.54% <0.00%> (-7.36%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `63.34% <0.00%> (-5.38%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-4.82%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `50.52% <0.00%> (-3.16%)` | :arrow_down: |
   | ... and [34 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [425c03f...0735f8e](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io edited a comment on pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (359482c) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/425c03f7ef6214ff1387594fd4b47206a449261b?el=desc) (425c03f) will **decrease** coverage by `0.17%`.
   > The diff coverage is `8.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   - Coverage    59.90%   59.73%   -0.18%     
   ===========================================
     Files          261      261              
     Lines        12912    12906       -6     
   ===========================================
   - Hits          7735     7709      -26     
   - Misses        4224     4225       +1     
   - Partials       953      972      +19     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (-0.79%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `48.95% <0.00%> (+0.77%)` | :arrow_up: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `60.46% <0.00%> (-0.36%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `44.16% <20.00%> (-1.30%)` | :arrow_down: |
   | [filter/filter\_impl/metrics\_filter.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL21ldHJpY3NfZmlsdGVyLmdv) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
   | [filter/filter\_impl/auth/sign\_util.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL2F1dGgvc2lnbl91dGlsLmdv) | `54.54% <0.00%> (-7.36%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `63.34% <0.00%> (-5.38%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-4.82%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `50.52% <0.00%> (-3.16%)` | :arrow_down: |
   | ... and [34 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [425c03f...359482c](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on a change in pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r553915795



##########
File path: registry/zookeeper/registry.go
##########
@@ -226,14 +226,15 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error {
 	if err != nil {
 		logger.Errorf("Register temp node(root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
 		if perrors.Cause(err) == zk.ErrNodeExists {
+			return nil
 			// should delete the old node
-			logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
+			/*logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
 			if err = r.client.Delete(zkPath); err == nil {
 				_, err = r.client.RegisterTemp(root, node)
 			}
 			if err != nil {
 				logger.Errorf("Recreate the temp node failed, (root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
-			}
+			}*/

Review comment:
       这段逻辑可能还不能删掉等我再测试一段时间再看吧




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] champly commented on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
champly commented on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-764395815


   我们也遇到了相同的问题,按照修改已经解决了


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-766610313


   > You should resolve conflicts, @jack15083 hi, what your name in dingding?
   
   冲突已经解决了


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io edited a comment on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (359482c) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/425c03f7ef6214ff1387594fd4b47206a449261b?el=desc) (425c03f) will **decrease** coverage by `0.17%`.
   > The diff coverage is `8.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   - Coverage    59.90%   59.73%   -0.18%     
   ===========================================
     Files          261      261              
     Lines        12912    12906       -6     
   ===========================================
   - Hits          7735     7709      -26     
   - Misses        4224     4225       +1     
   - Partials       953      972      +19     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (-0.79%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `48.95% <0.00%> (+0.77%)` | :arrow_up: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `60.46% <0.00%> (-0.36%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `44.16% <20.00%> (-1.30%)` | :arrow_down: |
   | [filter/filter\_impl/metrics\_filter.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL21ldHJpY3NfZmlsdGVyLmdv) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
   | [filter/filter\_impl/auth/sign\_util.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL2F1dGgvc2lnbl91dGlsLmdv) | `54.54% <0.00%> (-7.36%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `63.34% <0.00%> (-5.38%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-4.82%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `50.52% <0.00%> (-3.16%)` | :arrow_down: |
   | ... and [34 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [425c03f...89f8ac8](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on a change in pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r561639948



##########
File path: remoting/zookeeper/listener.go
##########
@@ -301,11 +299,8 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
 			go func(zkPath string, listener remoting.DataListener) {
 				if l.listenServiceNodeEvent(zkPath) {
 					listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel})
-					l.pathMapLock.Lock()
-					defer l.pathMapLock.Unlock()

Review comment:
       因为我把delete 逻辑放在了 listenServiceNodeEvent 方法里,放在这里会比较好,因为有其它地方会监听deleteNode消息,如handleZkNodeEvent也会监听,放在这个地方改的并不全

##########
File path: remoting/zookeeper/listener.go
##########
@@ -113,6 +113,9 @@ func (l *ZkEventListener) listenServiceNodeEvent(zkPath string, listener ...remo
 			case zk.EventNotWatching:
 				logger.Warnf("zk.ExistW(key{%s}) = event{EventNotWatching}", zkPath)
 			case zk.EventNodeDeleted:
+				l.pathMapLock.Lock()
+				delete(l.pathMap, zkPath)
+				l.pathMapLock.Unlock()

Review comment:
       不太明白你的意思  ExistW 并没有报错,这个改动我已经在公司的项目中验证是可行的,并没有error级别的报错参见下面这个改动
   ![image](https://user-images.githubusercontent.com/2142066/105314630-28894080-5bf9-11eb-8213-75693c365b97.png)
   

##########
File path: remoting/zookeeper/client.go
##########
@@ -259,14 +259,14 @@ func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) {
 			switch (int)(event.State) {
 			case (int)(zk.StateDisconnected):
 				logger.Warnf("zk{addr:%s} state is StateDisconnected, so close the zk client{name:%s}.", z.ZkAddrs, z.name)
-				z.stop()
 				z.Lock()
 				conn := z.Conn
 				z.Conn = nil
 				z.Unlock()
 				if conn != nil {
 					conn.Close()
 				}
+				z.stop()

Review comment:
       是的

##########
File path: remoting/zookeeper/listener.go
##########
@@ -163,18 +167,17 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
 			logger.Errorf("Get new node path {%v} 's content error,message is  {%v}", newNode, perrors.WithStack(err))
 		}
 
-		if !listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeAdd, Content: string(content)}) {
+		if !listener.DataChange(remoting.Event{Path: newNode, Action: remoting.EventTypeAdd, Content: string(content)}) {
 			continue
 		}
 		// listen l service node
 		l.wg.Add(1)
 		go func(node string, zkPath string, listener remoting.DataListener) {
-			logger.Infof("delete zkNode{%s}", node)
 			if l.listenServiceNodeEvent(node, listener) {
-				logger.Infof("delete content{%s}", node)
-				listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel})
+				logger.Warnf("delete zkNode{%s}", node)
+				listener.DataChange(remoting.Event{Path: node, Action: remoting.EventTypeDel})
 			}
-			logger.Warnf("listenSelf(zk path{%s}) goroutine exit now", zkPath)
+			logger.Warnf("handleZkNodeEvent->listenSelf(zk path{%s}) goroutine exit now", zkPath)

Review comment:
       是的,这个地方我改一下




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] wenxuwan commented on a change in pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
wenxuwan commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r559890336



##########
File path: remoting/zookeeper/listener.go
##########
@@ -301,11 +299,8 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
 			go func(zkPath string, listener remoting.DataListener) {
 				if l.listenServiceNodeEvent(zkPath) {
 					listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel})
-					l.pathMapLock.Lock()
-					defer l.pathMapLock.Unlock()

Review comment:
       why u remove the code? you can refer pr #850,

##########
File path: remoting/zookeeper/listener.go
##########
@@ -113,6 +113,9 @@ func (l *ZkEventListener) listenServiceNodeEvent(zkPath string, listener ...remo
 			case zk.EventNotWatching:
 				logger.Warnf("zk.ExistW(key{%s}) = event{EventNotWatching}", zkPath)
 			case zk.EventNodeDeleted:
+				l.pathMapLock.Lock()
+				delete(l.pathMap, zkPath)
+				l.pathMapLock.Unlock()

Review comment:
       if you put the delete logic here, ExistW on line82 return error will not delete the node.

##########
File path: remoting/zookeeper/listener.go
##########
@@ -163,18 +167,17 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
 			logger.Errorf("Get new node path {%v} 's content error,message is  {%v}", newNode, perrors.WithStack(err))
 		}
 
-		if !listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeAdd, Content: string(content)}) {
+		if !listener.DataChange(remoting.Event{Path: newNode, Action: remoting.EventTypeAdd, Content: string(content)}) {
 			continue
 		}
 		// listen l service node
 		l.wg.Add(1)
 		go func(node string, zkPath string, listener remoting.DataListener) {
-			logger.Infof("delete zkNode{%s}", node)
 			if l.listenServiceNodeEvent(node, listener) {
-				logger.Infof("delete content{%s}", node)
-				listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel})
+				logger.Warnf("delete zkNode{%s}", node)
+				listener.DataChange(remoting.Event{Path: node, Action: remoting.EventTypeDel})
 			}
-			logger.Warnf("listenSelf(zk path{%s}) goroutine exit now", zkPath)
+			logger.Warnf("handleZkNodeEvent->listenSelf(zk path{%s}) goroutine exit now", zkPath)

Review comment:
       zkPath is not needed for function, here is watching node not zkPath




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io edited a comment on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (359482c) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/9130466447a91a97ae5357f098ec2fc17269ada7?el=desc) (9130466) will **increase** coverage by `0.16%`.
   > The diff coverage is `8.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   + Coverage    59.56%   59.73%   +0.16%     
   ===========================================
     Files          261      261              
     Lines        12950    12906      -44     
   ===========================================
   - Hits          7714     7709       -5     
   + Misses        4261     4225      -36     
   + Partials       975      972       -3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (+0.56%)` | :arrow_up: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `48.95% <0.00%> (-0.70%)` | :arrow_down: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `60.46% <0.00%> (-0.36%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `44.16% <20.00%> (-1.07%)` | :arrow_down: |
   | [filter/filter\_impl/metrics\_filter.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL21ldHJpY3NfZmlsdGVyLmdv) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `65.78% <0.00%> (-1.72%)` | :arrow_down: |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `49.33% <0.00%> (ø)` | |
   | ... and [10 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [9130466...c86547f](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] cityiron commented on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
cityiron commented on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-766337869


   You should resolve conflicts, @jack15083 hi, what your name in dingding?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] champly commented on a change in pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
champly commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r561616544



##########
File path: remoting/zookeeper/client.go
##########
@@ -259,14 +259,14 @@ func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) {
 			switch (int)(event.State) {
 			case (int)(zk.StateDisconnected):
 				logger.Warnf("zk{addr:%s} state is StateDisconnected, so close the zk client{name:%s}.", z.ZkAddrs, z.name)
-				z.stop()
 				z.Lock()
 				conn := z.Conn
 				z.Conn = nil
 				z.Unlock()
 				if conn != nil {
 					conn.Close()
 				}
+				z.stop()

Review comment:
       应该是stop发出去了,但z.Conn还没清空,重新`ValidateZookeeperClient`里面发现 Conn 不为空,不会重新连接(不会重连失败),然后继续执行stop之后的逻辑就把连接关了




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] Patrick0308 commented on a change in pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
Patrick0308 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r553411691



##########
File path: registry/zookeeper/registry.go
##########
@@ -226,14 +226,15 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error {
 	if err != nil {
 		logger.Errorf("Register temp node(root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
 		if perrors.Cause(err) == zk.ErrNodeExists {
+			return nil
 			// should delete the old node
-			logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
+			/*logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
 			if err = r.client.Delete(zkPath); err == nil {
 				_, err = r.client.RegisterTemp(root, node)
 			}
 			if err != nil {
 				logger.Errorf("Recreate the temp node failed, (root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
-			}
+			}*/

Review comment:
       Modifying the code here can't completely avoid the disorder of messages. We should try to recheck when we receive the event that the node is deleted. What do you think?@AlexStocks @pantianying @CodingSinger @zouyx 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io edited a comment on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (359482c) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/9130466447a91a97ae5357f098ec2fc17269ada7?el=desc) (9130466) will **increase** coverage by `0.16%`.
   > The diff coverage is `8.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   + Coverage    59.56%   59.73%   +0.16%     
   ===========================================
     Files          261      261              
     Lines        12950    12906      -44     
   ===========================================
   - Hits          7714     7709       -5     
   + Misses        4261     4225      -36     
   + Partials       975      972       -3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (+0.56%)` | :arrow_up: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `48.95% <0.00%> (-0.70%)` | :arrow_down: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `60.46% <0.00%> (-0.36%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `44.16% <20.00%> (-1.07%)` | :arrow_down: |
   | [filter/filter\_impl/metrics\_filter.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL21ldHJpY3NfZmlsdGVyLmdv) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `65.78% <0.00%> (-1.72%)` | :arrow_down: |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `49.33% <0.00%> (ø)` | |
   | ... and [10 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [9130466...c86547f](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on a change in pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r553120028



##########
File path: registry/zookeeper/registry.go
##########
@@ -226,14 +226,15 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error {
 	if err != nil {
 		logger.Errorf("Register temp node(root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
 		if perrors.Cause(err) == zk.ErrNodeExists {
+			return nil
 			// should delete the old node
-			logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
+			/*logger.Info("Register temp node failed, try to delete the old and recreate  (root{%s}, node{%s}) , ignore!", root, node)
 			if err = r.client.Delete(zkPath); err == nil {
 				_, err = r.client.RegisterTemp(root, node)
 			}
 			if err != nil {
 				logger.Errorf("Recreate the temp node failed, (root{%s}, node{%s}) = error{%v}", root, node, perrors.WithStack(err))
-			}
+			}*/

Review comment:
       zk连接丢失重连的时候,如果先删除再注册,会发出一个delete 的zkEnvent 跟 nodeChange zkEnvent 这两个事件消息是并行的,如果delete消息是后面处理的就会导致consumer cache  的invoker被删除,所以遇到这个报错应该ignore掉,认为是已经注册成功了




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] wenxuwan commented on a change in pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
wenxuwan commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r567774456



##########
File path: config/reference_config.go
##########
@@ -269,4 +274,5 @@ func (c *ReferenceConfig) postProcessConfig(url *common.URL) {
 	for _, p := range extension.GetConfigPostProcessors() {
 		p.PostProcessReferenceConfig(url)
 	}
+

Review comment:
       remove empty line.

##########
File path: remoting/zookeeper/facade.go
##########
@@ -82,6 +82,7 @@ LOOP:
 					break
 				}
 				failTimes++
+				logger.Warnf("ZK reconnect fail times %d", failTimes)

Review comment:
       logger.Warnf("ZK reconnect failed %d times" , failTimes)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io commented on pull request #985: Fix: counser invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (0431d5a) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/425c03f7ef6214ff1387594fd4b47206a449261b?el=desc) (425c03f) will **decrease** coverage by `0.29%`.
   > The diff coverage is `43.20%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   - Coverage    59.90%   59.61%   -0.30%     
   ===========================================
     Files          261      261              
     Lines        12912    12908       -4     
   ===========================================
   - Hits          7735     7695      -40     
   - Misses        4224     4247      +23     
   - Partials       953      966      +13     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [cluster/router/chain/chain.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvY2hhaW4vY2hhaW4uZ28=) | `67.96% <0.00%> (ø)` | |
   | [cluster/router/condition/listenable\_router.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvY29uZGl0aW9uL2xpc3RlbmFibGVfcm91dGVyLmdv) | `54.71% <ø> (ø)` | |
   | [cluster/router/tag/file.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL2ZpbGUuZ28=) | `75.00% <ø> (ø)` | |
   | [cluster/router/tag/router\_rule.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3JvdXRlcl9ydWxlLmdv) | `89.47% <ø> (+12.20%)` | :arrow_up: |
   | [cluster/router/tag/tag\_router.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3RhZ19yb3V0ZXIuZ28=) | `72.59% <0.00%> (ø)` | |
   | [common/config/environment.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29tbW9uL2NvbmZpZy9lbnZpcm9ubWVudC5nbw==) | `51.72% <ø> (ø)` | |
   | [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.02% <ø> (ø)` | |
   | [config/config\_center\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbmZpZ19jZW50ZXJfY29uZmlnLmdv) | `63.49% <ø> (ø)` | |
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (-0.79%)` | :arrow_down: |
   | [config/service\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3NlcnZpY2VfY29uZmlnLmdv) | `54.66% <0.00%> (-0.37%)` | :arrow_down: |
   | ... and [59 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [425c03f...359482c](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io edited a comment on pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#issuecomment-755895650


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=h1) Report
   > Merging [#985](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=desc) (359482c) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/425c03f7ef6214ff1387594fd4b47206a449261b?el=desc) (425c03f) will **decrease** coverage by `0.17%`.
   > The diff coverage is `8.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/985/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #985      +/-   ##
   ===========================================
   - Coverage    59.90%   59.73%   -0.18%     
   ===========================================
     Files          261      261              
     Lines        12912    12906       -6     
   ===========================================
   - Hits          7735     7709      -26     
   - Misses        4224     4225       +1     
   - Partials       953      972      +19     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config/reference\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZmVyZW5jZV9jb25maWcuZ28=) | `79.41% <0.00%> (-0.79%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `48.95% <0.00%> (+0.77%)` | :arrow_up: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `60.46% <0.00%> (-0.36%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `44.16% <20.00%> (-1.30%)` | :arrow_down: |
   | [filter/filter\_impl/metrics\_filter.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL21ldHJpY3NfZmlsdGVyLmdv) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
   | [filter/filter\_impl/auth/sign\_util.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-ZmlsdGVyL2ZpbHRlcl9pbXBsL2F1dGgvc2lnbl91dGlsLmdv) | `54.54% <0.00%> (-7.36%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `63.34% <0.00%> (-5.38%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-4.82%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `50.52% <0.00%> (-3.16%)` | :arrow_down: |
   | ... and [34 more](https://codecov.io/gh/apache/dubbo-go/pull/985/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=footer). Last update [425c03f...62e95d5](https://codecov.io/gh/apache/dubbo-go/pull/985?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] jack15083 commented on a change in pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
jack15083 commented on a change in pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985#discussion_r563232712



##########
File path: remoting/zookeeper/listener.go
##########
@@ -113,6 +113,9 @@ func (l *ZkEventListener) listenServiceNodeEvent(zkPath string, listener ...remo
 			case zk.EventNotWatching:
 				logger.Warnf("zk.ExistW(key{%s}) = event{EventNotWatching}", zkPath)
 			case zk.EventNodeDeleted:
+				l.pathMapLock.Lock()
+				delete(l.pathMap, zkPath)
+				l.pathMapLock.Unlock()

Review comment:
       嗯明白了我再重新修改下




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks merged pull request #985: Fix: consumer invoker cache set nil after the ZK connection is lost

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #985:
URL: https://github.com/apache/dubbo-go/pull/985


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org