Skip to content

Commit

Permalink
Merge pull request #1 from apache/develop
Browse files Browse the repository at this point in the history
pull request develop branch
  • Loading branch information
cityiron authored Jul 27, 2020
2 parents 72901ee + 272ddd5 commit 313fc65
Show file tree
Hide file tree
Showing 237 changed files with 11,702 additions and 1,254 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ classes

# go mod, go test
vendor/
coverage.txt

logs/
.vscode/
coverage.txt

# unit test
remoting/zookeeper/zookeeper-4unittest/
config_center/zookeeper/zookeeper-4unittest/
registry/zookeeper/zookeeper-4unittest/
metadata/report/zookeeper/zookeeper-4unittest/
registry/consul/agent*
config_center/apollo/mockDubbog.properties.json

# vim stuff
*~
.*.sw?
50 changes: 50 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
# Release Notes
---

## 1.5.0

### New Features
- [Application-Level Registry Model](https://github.com/apache/dubbo-go/pull/604)
- [DelegateMetadataReport & RemoteMetadataService](https://github.com/apache/dubbo-go/pull/505)
- [Nacos MetadataReport implementation](https://github.com/apache/dubbo-go/pull/522)
- [Nacos service discovery](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/nacos/service_discovery.go)
- [Zk metadata service](https://github.com/apache/dubbo-go/pull/633)
- [Zk service discovery](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/zookeeper/service_discovery.go)
- [Etcd metadata report](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/metadata/report/etcd/report.go)
- [Etcd metadata service discovery](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/etcdv3/service_discovery.go)
- [Support grpc json protocol](https://github.com/apache/dubbo-go/pull/582)
- [Ftr: using different labels btw provider and consumer, k8s service discovery across namespaces](https://github.com/apache/dubbo-go/pull/577 )

### Enhancement
- [Optimize err handling ](https://github.com/apache/dubbo-go/pull/536/)
- [Add attribute method into Invocation and RpcInvocation](https://github.com/apache/dubbo-go/pull/537)
- [Optimize lock for zookeeper registry](https://github.com/apache/dubbo-go/pull/578)
- [Improve code coverage of zookeeper config center](https://github.com/apache/dubbo-go/pull/549)
- [Improve code coverage of nacos config center and configuration parser](https://github.com/apache/dubbo-go/pull/587)
- [Kubernetes as registry enhance](https://github.com/apache/dubbo-go/pull/577)
- [Optimize zk client's lock and tests](https://github.com/apache/dubbo-go/pull/601)
- [Add setInvoker method for invocation](https://github.com/apache/dubbo-go/pull/612)
- [Upgrade getty & hessian2](https://github.com/apache/dubbo-go/pull/626)
- [Optimize router design: Extract priority router](https://github.com/apache/dubbo-go/pull/630)
- [NamespaceId config for nacos](https://github.com/apache/dubbo-go/pull/641)


### Bugfixes
- [Fix Gitee problem](https://github.com/apache/dubbo-go/pull/590)
- [Gitee quality analyses -- common](https://github.com/apache/dubbo-go/issues/616)
- [Nacos client logDir path seperator for Windows](https://github.com/apache/dubbo-go/pull/591)
- [Fix various linter warnings](https://github.com/apache/dubbo-go/pull/624)
- [Fixed some issues in config folder that reported by sonar-qube](https://github.com/apache/dubbo-go/pull/634)
- [Zk disconnected, dubbo-go panic when subscribe](https://github.com/apache/dubbo-go/pull/613)
- [Enhancement cluster code analysis](https://github.com/apache/dubbo-go/pull/632)

### Document & Comment
- [Add comment for common directory](https://github.com/apache/dubbo-go/pull/530)
- [Add comments for config_center](https://github.com/apache/dubbo-go/pull/545)
- [Update the comments in metrics](https://github.com/apache/dubbo-go/pull/547)
- [Add comments for config](https://github.com/apache/dubbo-go/pull/579)
- [Updated the dubbo-go-ext image](https://github.com/apache/dubbo-go/pull/581)
- [Add comment for cluster](https://github.com/apache/dubbo-go/pull/584)
- [Update the comments in filter directory](https://github.com/apache/dubbo-go/pull/586)
- [Add comment for metadata](https://github.com/apache/dubbo-go/pull/588)
- [Update the comments in protocol directory](https://github.com/apache/dubbo-go/pull/602)
- [Add comments for remoting](https://github.com/apache/dubbo-go/pull/605)
- [Update the comments in registy directory](https://github.com/apache/dubbo-go/pull/589)

## 1.4.0
### New Features

Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache Dubbo Go
Apache Dubbo-go
Copyright 2018-2020 The Apache Software Foundation

This product includes software developed at
Expand Down
55 changes: 46 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Apache License, Version 2.0

## Release note ##

[v1.5.0 - July 24, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.5.0)

[v1.4.0 - Mar 17, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.4.0)

[v1.3.0 - Mar 1, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.3.0)
Expand Down Expand Up @@ -49,6 +51,7 @@ Finished List:
- Codec
* JsonRPC V2
* Hessian V2
* [json for grpc](https://github.com/apache/dubbo-go/pull/582)

- Protocol
* Dubbo
Expand Down Expand Up @@ -110,6 +113,17 @@ Finished List:
* [For dubbo](https://github.com/apache/dubbo-go/pull/344)
* [For grpc](https://github.com/apache/dubbo-go/pull/397)

- Metadata Center
* [Nacos](https://github.com/apache/dubbo-go/pull/522)
* [Zookeeper](https://github.com/apache/dubbo-go/pull/633)
* [Etcd](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/metadata/report/etcd/report.go)
* [Consul](https://github.com/apache/dubbo-go/pull/633)

- Service discovery
* [Nacos](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/nacos/service_discovery.go)
* [Zookeeper](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/zookeeper/service_discovery.go)
* [Etcd](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/etcdv3/service_discovery.go)

- Others:
* start check
* connecting certain provider
Expand All @@ -118,11 +132,6 @@ Finished List:
* multi-versions
* service group

Working List:

- Metadata Center (dubbo v2.7.x)
- Service Discovery (dubbo v2.7.x)

You can know more about dubbo-go by its [roadmap](https://github.com/apache/dubbo-go/wiki/Roadmap).

![feature](./doc/pic/arch/dubbo-go-arch.png)
Expand Down Expand Up @@ -169,12 +178,40 @@ If you are willing to do some code contributions and document contributions to [

Benchmark project [dubbo-go-benchmark](https://github.com/dubbogo/dubbo-go-benchmark).

About dubbo-go benchmarking report, please refer to [dubbo benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-dubbo) & [jsonrpc benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-jsonrpc).
About dubbo-go benchmarking report, please refer to [dubbo benchmarking report](https://github.com/apache/dubbo-go/wiki/Benchmark-test-of-dubbo) & [jsonrpc benchmarking report](https://github.com/apache/dubbo-go/wiki/Benchmark-test-of-jsonrpc).

## [User List](https://github.com/apache/dubbo-go/issues/2)

If you are using [apache/dubbo-go](github.com/apache/dubbo-go) and think that it helps you or want do some contributions to it, please add your company to to [the user list](https://github.com/apache/dubbo-go/issues/2) to let us know your needs.

![ctrip](https://pic.c-ctrip.com/common/c_logo2013.png)
![Excellent Health Technology Group](https://user-images.githubusercontent.com/52339367/84628582-80512200-af1b-11ea-945a-c6b4b9ad31f2.png)
![tuya](https://raw.githubusercontent.com/pantianying/go-tool/master/picture/logo_2-removebg-preview.png)

<div>
<table>
<tbody>
<tr></tr>
<tr>
<td align="center" valign="middle">
<a href="" target="_blank">
<img width="222px" src="https://pic.c-ctrip.com/common/c_logo2013.png">
</a>
</td>
<td align="center" valign="middle">
<a href="" target="_blank">
<img width="222px" src="https://user-images.githubusercontent.com/52339367/84628582-80512200-af1b-11ea-945a-c6b4b9ad31f2.png">
</a>
</td>
<td align="center" valign="middle">
<a href="" target="_blank">
<img width="222px" src="https://mosn.io/images/community/tuya.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://github.com/mosn" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/mosn/community/master/icons/png/mosn-labeled-horizontal.png">
</a>
</td>
</tr>
<tr></tr>
</tbody>
</table>
</div>
53 changes: 44 additions & 9 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Apache License, Version 2.0

## 发布日志 ##

[v1.5.0 - 2020年7月24日](https://github.com/apache/dubbo-go/releases/tag/v1.5.0)

[v1.4.0 - 2020年3月17日](https://github.com/apache/dubbo-go/releases/tag/v1.4.0)

[v1.3.0 - 2020年3月1日](https://github.com/apache/dubbo-go/releases/tag/v1.3.0)
Expand Down Expand Up @@ -48,6 +50,7 @@ Apache License, Version 2.0
- 序列化协议
* JsonRPC V2
* Hessian V2
* [json for grpc](https://github.com/apache/dubbo-go/pull/582)

- 协议
* Dubbo
Expand Down Expand Up @@ -108,6 +111,16 @@ Apache License, Version 2.0
* [For dubbo](https://github.com/apache/dubbo-go/pull/344)
* [For grpc](https://github.com/apache/dubbo-go/pull/397)

- 元数据中心
* [Nacos](https://github.com/apache/dubbo-go/pull/522)
* [Zookeeper](https://github.com/apache/dubbo-go/pull/633)
* [Etcd](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/metadata/report/etcd/report.go)
* [Consul](https://github.com/apache/dubbo-go/pull/633)

- 服务发现
* [Nacos](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/nacos/service_discovery.go)
* [Zookeeper](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/zookeeper/service_discovery.go)
* [Etcd](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/etcdv3/service_discovery.go)

- 其他功能支持:
* 启动时检查
Expand All @@ -117,11 +130,6 @@ Apache License, Version 2.0
* 多服务版本
* 服务分组

开发中列表:

- 元数据中心 (dubbo v2.7.x)
- 服务发现 (dubbo v2.7.x)

你可以通过访问 [roadmap](https://github.com/apache/dubbo-go/wiki/Roadmap) 知道更多关于 dubbo-go 的信息。

![feature](./doc/pic/arch/dubbo-go-arch.png)
Expand Down Expand Up @@ -168,12 +176,39 @@ go test ./... -coverprofile=coverage.txt -covermode=atomic

性能测试项目是 [dubbo-go-benchmark](https://github.com/dubbogo/dubbo-go-benchmark)

关于 dubbo-go 性能测试报告,请阅读 [dubbo benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-dubbo) & [jsonrpc benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-jsonrpc)
关于 dubbo-go 性能测试报告,请阅读 [dubbo benchmarking report](https://github.com/apache/dubbo-go/wiki/Benchmark-test-of-dubbo) & [jsonrpc benchmarking report](https://github.com/apache/dubbo-go/wiki/Benchmark-test-of-jsonrpc)

## [User List](https://github.com/apache/dubbo-go/issues/2)

若你正在使用 [apache/dubbo-go](github.com/apache/dubbo-go) 且认为其有用或者向对其做改进,请忝列贵司信息于 [用户列表](https://github.com/apache/dubbo-go/issues/2),以便我们知晓之。

![ctrip](https://pic.c-ctrip.com/common/c_logo2013.png)
![Excellent Health Technology Group](https://user-images.githubusercontent.com/52339367/84628582-80512200-af1b-11ea-945a-c6b4b9ad31f2.png)
![tuya](https://raw.githubusercontent.com/pantianying/go-tool/master/picture/logo_2-removebg-preview.png)
<div>
<table>
<tbody>
<tr></tr>
<tr>
<td align="center" valign="middle">
<a href="" target="_blank">
<img width="222px" src="https://pic.c-ctrip.com/common/c_logo2013.png">
</a>
</td>
<td align="center" valign="middle">
<a href="" target="_blank">
<img width="222px" src="https://user-images.githubusercontent.com/52339367/84628582-80512200-af1b-11ea-945a-c6b4b9ad31f2.png">
</a>
</td>
<td align="center" valign="middle">
<a href="" target="_blank">
<img width="222px" src="https://mosn.io/images/community/tuya.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://github.com/mosn" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/mosn/community/master/icons/png/mosn-labeled-horizontal.png">
</a>
</td>
</tr>
<tr></tr>
</tbody>
</table>
</div>
5 changes: 4 additions & 1 deletion before_ut.bat
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ md cluster\router\chain\zookeeper-4unittest\contrib\fatjar
xcopy /f "%zkJar%" "cluster/router/chain/zookeeper-4unittest/contrib/fatjar/"

md cluster\router\condition\zookeeper-4unittest\contrib\fatjar
xcopy /f "%zkJar%" "cluster/router/condition/zookeeper-4unittest/contrib/fatjar/"
xcopy /f "%zkJar%" "cluster/router/condition/zookeeper-4unittest/contrib/fatjar/"

md metadata\report\zookeeper\zookeeper-4unittest\contrib\fatjar
xcopy /f "%zkJar%" "metadata/report/zookeeper/zookeeper-4unittest/contrib/fatjar/"
9 changes: 6 additions & 3 deletions before_ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ if [ ! -f "${zkJar}" ]; then
fi

mkdir -p config_center/zookeeper/zookeeper-4unittest/contrib/fatjar
cp ${zkJar} config_center/zookeeper/zookeeper-4unittest/contrib/fatjar/
cp ${zkJar} config_center/zookeeper/zookeeper-4unittest/contrib/fatjar

mkdir -p registry/zookeeper/zookeeper-4unittest/contrib/fatjar
cp ${zkJar} registry/zookeeper/zookeeper-4unittest/contrib/fatjar/
cp ${zkJar} registry/zookeeper/zookeeper-4unittest/contrib/fatjar

mkdir -p cluster/router/chain/zookeeper-4unittest/contrib/fatjar
cp ${zkJar} cluster/router/chain/zookeeper-4unittest/contrib/fatjar

mkdir -p cluster/router/condition/zookeeper-4unittest/contrib/fatjar
cp ${zkJar} cluster/router/condition/zookeeper-4unittest/contrib/fatjar
cp ${zkJar} cluster/router/condition/zookeeper-4unittest/contrib/fatjar

mkdir -p metadata/report/zookeeper/zookeeper-4unittest/contrib/fatjar
cp ${zkJar} metadata/report/zookeeper/zookeeper-4unittest/contrib/fatjar
1 change: 1 addition & 0 deletions cluster/cluster_impl/available_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func NewAvailableCluster() cluster.Cluster {
return &availableCluster{}
}

// Join returns a baseClusterInvoker instance
func (cluser *availableCluster) Join(directory cluster.Directory) protocol.Invoker {
return NewAvailableClusterInvoker(directory)
}
1 change: 1 addition & 0 deletions cluster/cluster_impl/broadcast_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewBroadcastCluster() cluster.Cluster {
return &broadcastCluster{}
}

// Join returns a baseClusterInvoker instance
func (cluster *broadcastCluster) Join(directory cluster.Directory) protocol.Invoker {
return newBroadcastClusterInvoker(directory)
}
1 change: 1 addition & 0 deletions cluster/cluster_impl/broadcast_cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func newBroadcastClusterInvoker(directory cluster.Directory) protocol.Invoker {
}
}

// nolint
func (invoker *broadcastClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result {
invokers := invoker.directory.List(invocation)
err := invoker.checkInvokers(invokers, invocation)
Expand Down
1 change: 1 addition & 0 deletions cluster/cluster_impl/failback_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewFailbackCluster() cluster.Cluster {
return &failbackCluster{}
}

// Join returns a baseClusterInvoker instance
func (cluster *failbackCluster) Join(directory cluster.Directory) protocol.Invoker {
return newFailbackClusterInvoker(directory)
}
1 change: 1 addition & 0 deletions cluster/cluster_impl/failback_cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func (invoker *failbackClusterInvoker) checkRetry(retryTask *retryTimerTask, err
}
}

// nolint
func (invoker *failbackClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result {
invokers := invoker.directory.List(invocation)
if err := invoker.checkInvokers(invokers, invocation); err != nil {
Expand Down
1 change: 1 addition & 0 deletions cluster/cluster_impl/failfast_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewFailFastCluster() cluster.Cluster {
return &failfastCluster{}
}

// Join returns a baseClusterInvoker instance
func (cluster *failfastCluster) Join(directory cluster.Directory) protocol.Invoker {
return newFailFastClusterInvoker(directory)
}
1 change: 1 addition & 0 deletions cluster/cluster_impl/failfast_cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func newFailFastClusterInvoker(directory cluster.Directory) protocol.Invoker {
}
}

// nolint
func (invoker *failfastClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result {
invokers := invoker.directory.List(invocation)
err := invoker.checkInvokers(invokers, invocation)
Expand Down
1 change: 1 addition & 0 deletions cluster/cluster_impl/failover_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func NewFailoverCluster() cluster.Cluster {
return &failoverCluster{}
}

// Join returns a baseClusterInvoker instance
func (cluster *failoverCluster) Join(directory cluster.Directory) protocol.Invoker {
return newFailoverClusterInvoker(directory)
}
8 changes: 6 additions & 2 deletions cluster/cluster_impl/failover_cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package cluster_impl

import (
"context"
"fmt"
"strconv"
)

Expand All @@ -44,6 +45,7 @@ func newFailoverClusterInvoker(directory cluster.Directory) protocol.Invoker {
}
}

// nolint
func (invoker *failoverClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result {
var (
result protocol.Result
Expand Down Expand Up @@ -91,8 +93,10 @@ func (invoker *failoverClusterInvoker) Invoke(ctx context.Context, invocation pr
invokerSvc := invoker.GetUrl().Service()
invokerUrl := invoker.directory.GetUrl()
return &protocol.RPCResult{
Err: perrors.Errorf("Failed to invoke the method %v in the service %v. Tried %v times of the providers %v (%v/%v)from the registry %v on the consumer %v using the dubbo version %v. Last error is %v.",
methodName, invokerSvc, retries, providers, len(providers), len(invokers), invokerUrl, ip, constant.Version, result.Error().Error(),
Err: perrors.Wrap(result.Error(), fmt.Sprintf("Failed to invoke the method %v in the service %v. "+
"Tried %v times of the providers %v (%v/%v)from the registry %v on the consumer %v using the dubbo version %v. "+
"Last error is %+v.", methodName, invokerSvc, retries, providers, len(providers), len(invokers),
invokerUrl, ip, constant.Version, result.Error().Error()),
)}
}

Expand Down
Loading

0 comments on commit 313fc65

Please sign in to comment.