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 2022/05/17 16:47:26 UTC

[GitHub] [dubbo-go] zhaoyunxing92 opened a new pull request, #1898: Update etcd version

zhaoyunxing92 opened a new pull request, #1898:
URL: https://github.com/apache/dubbo-go/pull/1898

   <!--  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**: 
   * 更新etcd库
   * 解决etcd注册中心问题(这个 #1662  pr不应该这样修改)
   **Which issue(s) this PR fixes**: 
   Fixes #
   
   #1897 
   
   **You should pay attention to items below to ensure your pr passes our ci test**
   We do not merge pr with ci tests failed
   
   - [x] All ut passed (run 'go test ./...' in project root)
   - [x] After go-fmt ed , run 'go fmt project' using goland.
   - [x] Golangci-lint passed, run 'sudo golangci-lint run' in project root.
   - [x] After import formatted, (using [imports-formatter](https://github.com/dubbogo/tools#5-how-to-get-imports-formatter) to run 'imports-formatter .' in project root, to format your import blocks, mentioned in [CONTRIBUTING.md](https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md) above) 
   - [x] Your new-created file needs to have [apache license](https://raw.githubusercontent.com/dubbogo/resources/master/tools/license/license.txt) at the top, like other existed file does.
   - [x] All integration test passed. You can run integration test locally (with docker env). Clone our [dubbo-go-samples](https://github.com/apache/dubbo-go-samples) project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)


-- 
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: notifications-unsubscribe@dubbo.apache.org

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 commented on a diff in pull request #1898: Update etcd version and fix etcd register err

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#discussion_r884258113


##########
CHANGE.md:
##########
@@ -27,6 +20,8 @@
 - [1.5.7 MetadataReportConfig lost the error](https://github.com/apache/dubbo-go/pull/1662)
 - [url too many colons in address](https://github.com/apache/dubbo-go/pull/1306)
 - [1.5 fix the nacos namespace from server/client.yml does not take effect](https://github.com/apache/dubbo-go/pull/1576)

Review Comment:
   当然,也就是本 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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #1898: Update etcd version and fix etcd register err

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


-- 
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: notifications-unsubscribe@dubbo.apache.org

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 commented on a diff in pull request #1898: Update etcd version and fix etcd register err

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#discussion_r875453621


##########
remoting/etcdv3/facade.go:
##########
@@ -46,54 +43,16 @@ type clientFacade interface {
 
 // HandleClientRestart keeps the connection between client and server
 func HandleClientRestart(r clientFacade) {
-
-	var (
-		err       error
-		failTimes int
-	)
-
 	defer r.WaitGroup().Done()
-LOOP:
 	for {
 		select {
 		case <-r.Done():
 			logger.Warnf("(ETCDV3ProviderRegistry)reconnectETCDV3 goroutine exit now...")
-			break LOOP
+			return
 			// re-register all services

Review Comment:
   这块逻辑是确保一旦etcd集群发送崩溃重启后, etcd client 和 server 重连成功,不能删掉



-- 
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: notifications-unsubscribe@dubbo.apache.org

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-commenter commented on pull request #1898: Update etcd version and fix etcd register err

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#issuecomment-1140389033

   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1898?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1898](https://codecov.io/gh/apache/dubbo-go/pull/1898?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c2c37af) into [1.5](https://codecov.io/gh/apache/dubbo-go/commit/2cb57ab4a12dcc960018e253c9911ce977f48215?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2cb57ab) will **decrease** coverage by `0.80%`.
   > The diff coverage is `48.45%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##              1.5    #1898      +/-   ##
   ==========================================
   - Coverage   55.82%   55.01%   -0.81%     
   ==========================================
     Files         279      265      -14     
     Lines       16071    14933    -1138     
   ==========================================
   - Hits         8972     8216     -756     
   + Misses       6154     5845     -309     
   + Partials      945      872      -73     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1898?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `80.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failsafe\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbHNhZmVfY2x1c3Rlcl9pbnZva2VyLmdv) | `81.81% <ø> (ø)` | |
   | [cluster/cluster\_impl/forking\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZm9ya2luZ19jbHVzdGVyX2ludm9rZXIuZ28=) | `58.33% <0.00%> (ø)` | |
   | [cluster/loadbalance/consistent\_hash.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9jb25zaXN0ZW50X2hhc2guZ28=) | `90.32% <ø> (ø)` | |
   | [cluster/router/condition/listenable\_router.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvY29uZGl0aW9uL2xpc3RlbmFibGVfcm91dGVyLmdv) | `12.12% <ø> (ø)` | |
   | [cluster/router/condition/router.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvY29uZGl0aW9uL3JvdXRlci5nbw==) | `80.10% <ø> (ø)` | |
   | [cluster/router/tag/file.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL2ZpbGUuZ28=) | `81.81% <ø> (ø)` | |
   | [cluster/router/tag/tag\_router.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3RhZ19yb3V0ZXIuZ28=) | `44.57% <ø> (ø)` | |
   | [common/extension/service\_discovery.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9zZXJ2aWNlX2Rpc2NvdmVyeS5nbw==) | `0.00% <ø> (ø)` | |
   | [common/host\_util.go](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2hvc3RfdXRpbC5nbw==) | `60.00% <ø> (ø)` | |
   | ... and [87 more](https://codecov.io/gh/apache/dubbo-go/pull/1898/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1898?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1898?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [470b24c...c2c37af](https://codecov.io/gh/apache/dubbo-go/pull/1898?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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] justxuewei commented on a diff in pull request #1898: Update etcd version and fix etcd register err

Posted by GitBox <gi...@apache.org>.
justxuewei commented on code in PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#discussion_r884352924


##########
registry/etcdv3/registry.go:
##########
@@ -137,15 +132,14 @@ func (r *etcdV3Registry) CloseListener() {
 
 // CreatePath create the path in the registry center of etcd
 func (r *etcdV3Registry) CreatePath(k string) error {
-	var tmpPath string
-	for _, str := range strings.Split(k, "/")[1:] {
-		tmpPath = path.Join(tmpPath, "/", str)
-		if err := r.client.Create(tmpPath, ""); err != nil {
-			return perrors.WithMessagef(err, "create path %s in etcd", tmpPath)
-		}
-	}
-
-	return nil
+	//var tmpPath string
+	//for _, str := range strings.Split(k, "/")[1:] {
+	//	tmpPath = path.Join(tmpPath, "/", str)
+	//	if err := r.client.Put(tmpPath, ""); err != nil {
+	//		return perrors.WithMessagef(err, "create path %s in etcd", tmpPath)
+	//	}
+	//}
+	return perrors.WithMessagef(r.client.Put(k, ""), "create path %s in etcd", k)

Review Comment:
   If the above code is useless, please remove it instead of comment it.



-- 
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: notifications-unsubscribe@dubbo.apache.org

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 commented on a diff in pull request #1898: Update etcd version and fix etcd register err

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#discussion_r884257835


##########
CHANGE.md:
##########
@@ -27,6 +20,8 @@
 - [1.5.7 MetadataReportConfig lost the error](https://github.com/apache/dubbo-go/pull/1662)
 - [url too many colons in address](https://github.com/apache/dubbo-go/pull/1306)
 - [1.5 fix the nacos namespace from server/client.yml does not take effect](https://github.com/apache/dubbo-go/pull/1576)

Review Comment:
   把 consul 删除的 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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 commented on a diff in pull request #1898: Update etcd version and fix etcd register err

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#discussion_r875452435


##########
CHANGE.md:
##########
@@ -1,6 +1,13 @@
 # Release Notes
 ---
 
+## 1.5.8
+
+### Bugfixes
+
+- [fix bug](https://github.com/apache/dubbo-go/pull/1662)

Review Comment:
   我说过了哈,这个 title 名称你帮忙给他改下,这 fix bug 没人能看懂是啥玩意



-- 
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: notifications-unsubscribe@dubbo.apache.org

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 commented on a diff in pull request #1898: Update etcd version and fix etcd register err

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#discussion_r875454368


##########
remoting/etcdv3/listener.go:
##########
@@ -19,38 +19,33 @@ package etcdv3
 
 import (

Review Comment:
   这个 import 改的有问题吧



-- 
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: notifications-unsubscribe@dubbo.apache.org

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