Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #3

Merged
merged 319 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
319 commits
Select commit Hold shift + click to select a range
08c3674
add comment for public method
cityiron Jul 29, 2020
4ef21cb
Add: add ip address match function
watermelo Jul 29, 2020
891ec6c
Add: add listener for tag router
watermelo Jul 29, 2020
0d56ab0
Merge branch 'develop' into featrue/tagRouter
watermelo Jul 29, 2020
8580ad0
Mod: update tag router unit test
watermelo Jul 30, 2020
0686ca9
Merge pull request #670 from zouyx/hotfix/fix1.4
AlexStocks Jul 30, 2020
f2261ce
format code
Patrick0308 Jul 30, 2020
6f77a0c
add code format and comment
cityiron Jul 30, 2020
ddf63de
ugly code to elegant
cityiron Jul 31, 2020
9b73313
Modify README_CN
Jul 31, 2020
55c84cd
Modify README_CN.md
Jul 31, 2020
db1e5da
Merge pull request #676 from Patrick0308/rest_methodtype
AlexStocks Aug 1, 2020
abcc4df
Merge pull request #683 from QMHTMY/master
AlexStocks Aug 1, 2020
2e96585
refactor config center
zouyx Aug 2, 2020
bc46c9a
Modify README_CN
Jul 31, 2020
12680fd
Modify README_CN.md
Jul 31, 2020
70c01a5
Add: add unit test for dynamic tag
watermelo Aug 2, 2020
a31a4e2
Add: add zk jar for tag test
watermelo Aug 3, 2020
65b215a
Merge pull request #18 from apache/develop
lzp0412 Aug 3, 2020
73e7bdd
refactor config center
zouyx Aug 3, 2020
d5a491e
add case for this feature
zouyx Aug 3, 2020
3e9f57a
refactor config center
zouyx Aug 3, 2020
0ef7765
unregister instance when registry destroy
lzp0412 Aug 4, 2020
d32cbdb
fix review comment
zouyx Aug 4, 2020
e0dd74e
fix review comment
zouyx Aug 4, 2020
8e6d2ac
fix review comment
zouyx Aug 4, 2020
7ad26fd
try to fix zk problem
wenxuwan Aug 4, 2020
53587ec
try to fix ut failed
wenxuwan Aug 5, 2020
7a88bab
change the default value to 15m
wenxuwan Aug 5, 2020
c33f4ea
change the default value to 15min
wenxuwan Aug 5, 2020
2d8224e
fix review comment
lzp0412 Aug 5, 2020
da4225e
Fix kubernetes ut
Aug 5, 2020
79ade24
FMT k8s pkg
Aug 5, 2020
3bc2938
fix review comment
zouyx Aug 5, 2020
e654674
register service instance after provider config load
Patrick0308 Aug 5, 2020
dc075da
modify name
Patrick0308 Aug 5, 2020
eb919e1
fix review comment
zouyx Aug 5, 2020
9b4745f
fix comments
wenxuwan Aug 6, 2020
269714a
Merge pull request #693 from sxllwx/fix_k8s_ut
AlexStocks Aug 6, 2020
c4fbd60
Merge pull request #692 from wenxuwan/master
AlexStocks Aug 6, 2020
0b5e2f4
Merge pull request #689 from lzp0412/develop
AlexStocks Aug 6, 2020
bcffde9
fix travis
zouyx Aug 6, 2020
5e377f4
Merge pull request #665 from watermelo/featrue/tagRouter
AlexStocks Aug 6, 2020
603ffc1
Revert "Ftr: dynamic tag router"
AlexStocks Aug 6, 2020
6300a24
fix travis
zouyx Aug 6, 2020
debd07c
Merge pull request #3 from apache/develop
cityiron Aug 7, 2020
b8ec301
Merge branch 'develop' into zoneware
cityiron Aug 7, 2020
bd7c5ca
stack level
Aug 7, 2020
0a98a20
Merge pull request #687 from zouyx/feature/optimizeRemotesConfiguration
zouyx Aug 7, 2020
613cc6e
Merge pull request #696 from apache/revert-665-featrue/tagRouter
zouyx Aug 7, 2020
95e863e
add default priority 0 for condition url which neither application no…
Aug 7, 2020
01910a0
reduce cognitive in base_directory.go
Aug 7, 2020
4c250c2
add cluster interceptor
cityiron Aug 7, 2020
2b19ca5
a quick prototype for bitmap router chain
beiwei30 Aug 7, 2020
03bde75
import split
cityiron Aug 7, 2020
ddb2504
Add: add setInvoker function for router chain
watermelo Aug 7, 2020
f4481b0
Mod: merge branch to resolve conflict
watermelo Aug 7, 2020
cf75539
replace bzr to git
Aug 8, 2020
96a3688
fix empty application configure always return true in base_directory …
Aug 8, 2020
5f02d53
added comment to file.go
Aug 8, 2020
87a52c3
make condition router no-poolable and introduce consumer url in Regis…
beiwei30 Aug 8, 2020
2aafdeb
Merge pull request #662 from williamfeng323/feature/application-level…
pantianying Aug 9, 2020
04e0b4e
Correct words and Format codes
Howie59 Aug 9, 2020
c56ceb0
Format codes
Howie59 Aug 9, 2020
4dfc8aa
change format
cityiron Aug 9, 2020
f0017a8
Merge pull request #659 from DogBaoBao/zoneware
zouyx Aug 9, 2020
49ebaba
add tls support
Aug 2, 2020
ecdf8cc
add nolint
Howie59 Aug 9, 2020
443c1b8
change module version
Aug 9, 2020
bef03b4
upgrade getty version
Aug 9, 2020
c62ec2e
fix getty const
Aug 9, 2020
b75fcea
fix getty const
Aug 9, 2020
8e85afd
optimized code
Patrick0308 Mar 31, 2020
13369bf
use adapter model to modify restServer
Patrick0308 Mar 31, 2020
9a9b3a7
remove adapter
Patrick0308 Mar 31, 2020
bcb0100
optimize header transmit in RestClient and RestServer
Patrick0308 Apr 1, 2020
f2949db
add some comments
Patrick0308 Apr 1, 2020
79bd56c
modify some comments and when parsing parameters occurred error, retu…
Patrick0308 Apr 1, 2020
6540c89
modify comments
Patrick0308 Apr 1, 2020
4736cdc
remove new function
Patrick0308 Apr 1, 2020
f580ed0
modify some comments
Patrick0308 Apr 1, 2020
d469144
modify some comments and modify some logger's message
Patrick0308 Apr 1, 2020
ca2538a
optimized code
Patrick0308 Apr 4, 2020
a7174c3
let go_restful_server support same url and different methodType
Patrick0308 Jul 28, 2020
ea86567
format code
Patrick0308 Jul 30, 2020
af3176f
fix nacos unit test failed
lzp0412 Aug 9, 2020
4ef45c6
Merge remote-tracking branch 'remotes/dubbogo/develop' into develop
lzp0412 Aug 9, 2020
9652ae6
update getty pkg
zouyx Aug 9, 2020
6dc42eb
Merge pull request #705 from lzp0412/develop
AlexStocks Aug 9, 2020
457dc0c
add tls support
Aug 2, 2020
01c14c3
change module version
Aug 9, 2020
3b2dc85
upgrade getty version
Aug 9, 2020
c7cb13b
fix getty const
Aug 9, 2020
addc4b4
fix getty const
Aug 9, 2020
49d1c94
rm go version
Aug 9, 2020
9603daa
fix
Aug 9, 2020
5a51b7f
Merge remote-tracking branch 'origin/AddTslSupport' into AddTslSupport
Aug 9, 2020
967faf8
Merge pull request #702 from dubbo-x/fix
AlexStocks Aug 9, 2020
cb30a98
rm go version
Aug 9, 2020
aaa8be3
Merge pull request #704 from Howie66/master
fangyincheng Aug 9, 2020
58dc145
Correct words and Format codes
Howie59 Aug 9, 2020
2791895
Format codes
Howie59 Aug 9, 2020
25281bf
add nolint
Howie59 Aug 9, 2020
ef95dd9
refactor the code style
beiwei30 Aug 10, 2020
83ff9e7
honor HealthCheckRouter's enabled flag
beiwei30 Aug 10, 2020
30c587e
get application from both dir.url and dir.url.suburl
Aug 10, 2020
367c42b
use mutex to copy invokers
beiwei30 Aug 10, 2020
a84e17b
Merge branch 'develop' into bitmap-router
beiwei30 Aug 10, 2020
ef1ddcf
set invokers for router chain in static directory to pass unit test
beiwei30 Aug 10, 2020
fedaae5
fix unit test
beiwei30 Aug 10, 2020
48d713a
correct go fmt
beiwei30 Aug 10, 2020
bc5ad76
update hessian2 pkg
zouyx Aug 10, 2020
a3dcb22
Add: add notify router for tag router
watermelo Aug 10, 2020
d7014ee
update getty pkg
zouyx Aug 10, 2020
316e276
Mod: modify tag router strings compare
watermelo Aug 10, 2020
b8e15bf
fix
Aug 10, 2020
07bf1c4
fix
Aug 10, 2020
bdf48c7
Merge remote-tracking branch 'remotes/upstream/develop' into AddTslSu…
Aug 10, 2020
67abe6b
fix
Aug 10, 2020
ee46d46
split pkg
Aug 10, 2020
350185e
fix travis
zouyx Aug 11, 2020
9aa2bc8
fix review comment
zouyx Aug 11, 2020
5faedba
fix review comment
zouyx Aug 11, 2020
e80c2e4
Merge pull request #709 from zouyx/updatePkg
zouyx Aug 11, 2020
25ddfa5
Merge pull request #707 from williamfeng323/bugfix-application-router
fangyincheng Aug 11, 2020
6c606c1
split pkg
Aug 12, 2020
f2d2ba6
make a comment variable
Aug 12, 2020
6cf2dc8
Mod: move match codes to gost net
watermelo Aug 12, 2020
0121001
use mutex for invokers set and get
beiwei30 Aug 12, 2020
6708d24
Mod: modify comments
watermelo Aug 12, 2020
8458c88
use defer to unlock
beiwei30 Aug 13, 2020
e46939b
code polish for else branch
beiwei30 Aug 13, 2020
9c12919
make sure lock for invokers correctly
beiwei30 Aug 13, 2020
37ebc63
code polish for else branch
beiwei30 Aug 13, 2020
88e097f
fix
Aug 13, 2020
d0345ec
fix
Aug 13, 2020
622e6c5
fix
Aug 13, 2020
c7e0522
fix
Aug 13, 2020
b88d28f
make router.AddrPool with initial size
beiwei30 Aug 14, 2020
7425cd7
correct unlock
beiwei30 Aug 14, 2020
21e572c
rename ch to notify
beiwei30 Aug 14, 2020
0da3151
make map with init size
beiwei30 Aug 14, 2020
0a475bf
Mod: add router tag unit tests scripts
watermelo Aug 14, 2020
aa0ee1c
Merge pull request #685 from aliiohs/AddTslSupport
zouyx Aug 14, 2020
9d8afcd
Merge pull request #703 from watermelo/featrue/tagRouter
AlexStocks Aug 15, 2020
2756d13
upgrade arch png
Isaac-Zhang Aug 15, 2020
69e384e
Merge branch '1.4' into feature/merge1.4
zouyx Aug 16, 2020
a007d32
merge 1.4
zouyx Aug 16, 2020
e3dd46f
Merge pull request #714 from Isaac-Zhang/develop
fangyincheng Aug 16, 2020
f0809f6
add register service instance unit test
Patrick0308 Aug 16, 2020
e4ba8db
register service instance after provider config load
Patrick0308 Aug 5, 2020
b3ab323
modify name
Patrick0308 Aug 5, 2020
52e8a9e
add register service instance unit test
Patrick0308 Aug 16, 2020
066162b
Merge branch 'service-register' of https://github.com/Patrick0308/dub…
Patrick0308 Aug 16, 2020
5a135e6
Merge pull request #716 from zouyx/feature/merge1.4
Aug 16, 2020
ce5751b
when don't has metadataService ignore this error
Patrick0308 Aug 16, 2020
de36a0d
format code
Patrick0308 Aug 17, 2020
5e35cd6
Update: dubbogo/getty -> apache/dubbo-getty
AlexStocks Aug 18, 2020
31194a8
Correct words and Format codes
Howie59 Aug 9, 2020
101e696
fix comment error
AlexStocks Aug 18, 2020
12b6d6a
Fix: comment error
AlexStocks Aug 18, 2020
7c752e8
Fix: format error
AlexStocks Aug 18, 2020
d4336cc
Fix: format test/integrate/dubbo/go-server/server.go
AlexStocks Aug 18, 2020
e361067
foramt go.mod
AlexStocks Aug 18, 2020
fc8d7b0
use NewTicker instead of builtin to avoid of GC pressure.
Aug 18, 2020
70bd933
avoid reflection api
beiwei30 Aug 18, 2020
7f47894
fix typo in comment
beiwei30 Aug 18, 2020
1166752
forbid excuting twice
cvictory Aug 18, 2020
b04224b
Fix: fix tag router rule copy
watermelo Aug 18, 2020
f9fdbeb
Merge branch 'develop', and reimplement dynamic tag rule
beiwei30 Aug 18, 2020
8c4d42e
group var
beiwei30 Aug 18, 2020
f606124
use len(tag) > 0
beiwei30 Aug 18, 2020
c50da85
modify msg
Patrick0308 Aug 18, 2020
5c3f71d
add comment
Patrick0308 Aug 18, 2020
0cb2789
switch to use sync.Mutex instead of atomic.Value.
beiwei30 Aug 18, 2020
066629b
new impl for address cache lifecycle
beiwei30 Aug 19, 2020
fd183d8
switch back to atomic value, I believe this is the best solution come…
beiwei30 Aug 19, 2020
c167842
avoid of copying and comparing invokers as much as possible
beiwei30 Aug 19, 2020
43a3059
asynchronous subscribe nacos service info
lzp0412 Aug 19, 2020
cadae7b
format
Aug 19, 2020
7442ec3
fix imports
Patrick0308 Aug 20, 2020
941e69d
format
Aug 20, 2020
1708b41
fix bug
Aug 20, 2020
8a7a104
Merge pull request #720 from watermelo/Fix/tagRouterCopy
pantianying Aug 20, 2020
e21a257
Merge pull request #721 from lzp0412/develop
zouyx Aug 20, 2020
60f9822
format
Aug 20, 2020
9e1b4d1
fix imports
Patrick0308 Aug 20, 2020
d58e4fa
modify comment
Patrick0308 Aug 20, 2020
6657d27
Merge pull request #694 from Patrick0308/service-register
pantianying Aug 20, 2020
6835365
fix subscribe url wrong
Patrick0308 Aug 21, 2020
b7ae2ce
revert commit "fix subscribe url wrong"
Patrick0308 Aug 21, 2020
bb39786
fix subscribe url wrong
Patrick0308 Aug 21, 2020
0b81ef4
Merge pull request #724 from Patrick0308/1.5.1
zouyx Aug 21, 2020
6ccbc6c
Merge pull request #719 from cvictory/log_opt
AlexStocks Aug 22, 2020
1e0bf87
Merge commit '6ccbc6cc' into develop
AlexStocks Aug 22, 2020
aa796a8
forbid excuting twice
cvictory Aug 18, 2020
3c30353
Merge branch '1.5.1' into develop
Aug 22, 2020
3ed9f66
modify changes.md
zouyx Aug 22, 2020
457dc32
Merge pull request #725 from zouyx/addChange
zouyx Aug 22, 2020
7d1f424
Change file name to the same as interface name
zouyx Aug 22, 2020
489e795
Merge pull request #726 from zouyx/addChange
Patrick0308 Aug 23, 2020
2928502
Update README.md
zouyx Aug 23, 2020
d0bfafb
Merge branch '1.5' into develop
zouyx Aug 23, 2020
811f4f1
Merge branch '1.5'
zouyx Aug 23, 2020
ace8f6b
use defer for wg.Done()
Aug 25, 2020
62a7e88
Merge branch 'develop' into bitmap-router
beiwei30 Aug 25, 2020
6dc2295
fix getProviderConfig in initHystrixConfigProvider
YGrylls Aug 26, 2020
a0053d4
remove outdated comments
YGrylls Aug 26, 2020
96d0f79
format
Aug 27, 2020
09fa354
format
Aug 28, 2020
e6205de
Merge pull request #708 from beiwei30/bitmap-router
AlexStocks Aug 28, 2020
a111829
add detailed comment
YGrylls Aug 28, 2020
8b6e61e
Merge branch 'develop' of https://github.com/apache/dubbo-go into fix…
YGrylls Aug 28, 2020
d542f62
Add: import code rule
AlexStocks Aug 28, 2020
7e4e7fd
chore: Remove unnecessary return and judgement.
atlas-comstock Aug 29, 2020
d862270
Merge pull request #731 from YGrylls/fix/hystrix
hxmhlt Aug 29, 2020
4c483e0
Merge pull request #730 from YongHaoWu/remove-unnecessary-statement
AlexStocks Aug 31, 2020
f8434c3
format
Sep 1, 2020
6707cdc
Merge branch 'develop' into read
Sep 1, 2020
c1e9b84
format
Sep 1, 2020
763b436
fix bug
Sep 3, 2020
6dfac02
try to fix error log prints issue
wenxuwan Sep 4, 2020
6388c4a
Merge pull request #722 from dubbo-x/read
AlexStocks Sep 5, 2020
bb197cc
Merge pull request #735 from wenxuwan/master
AlexStocks Sep 6, 2020
f11bc6d
improve map access concurrency
skyao Sep 7, 2020
49c005a
Ftr: [refer dubbo 2.7.6] attachment type from map[string]stiring to m…
cvictory Sep 7, 2020
aa4d36a
Fix: integration testing problems
zouyx Sep 7, 2020
94fe6c6
Fix: integration testing problems
zouyx Sep 7, 2020
93cb0ac
Fix: integration testing problems
zouyx Sep 7, 2020
bff2cd6
Fix: integration testing problems
zouyx Sep 7, 2020
4cd2487
Fix: integration testing problems
zouyx Sep 7, 2020
a192291
address batch mode notification
beiwei30 Sep 7, 2020
27a8dc7
Fix: integration testing problems
zouyx Sep 7, 2020
c3adeae
Fix: integration testing problems
zouyx Sep 7, 2020
a15d6af
Fix: integration testing problems
zouyx Sep 7, 2020
04b35ea
Fix: integration testing problems
zouyx Sep 7, 2020
a76745f
fix review comment
Sep 7, 2020
9f50dc2
delete useless file
zouyx Sep 7, 2020
a87b814
enhance comments
beiwei30 Sep 8, 2020
837f41f
Merge pull request #740 from zouyx/feature/fixTestProblmes
Patrick0308 Sep 8, 2020
f146507
Revert "Fix: integration testing problems"
zouyx Sep 8, 2020
6209b52
move debug() into refreshInvokers and remove update method
beiwei30 Sep 8, 2020
99f2c3a
Merge remote-tracking branch 'upstream/develop' into improve/map-acce…
skyao Sep 8, 2020
51f4bc3
Merge pull request #744 from apache/revert-740-feature/fixTestProblmes
fangyincheng Sep 8, 2020
6299ce4
Merge branch 'develop' into improve/map-access-concurreny
skyao Sep 8, 2020
fe8e2f8
Merge pull request #739 from skyao/improve/map-access-concurreny
zouyx Sep 9, 2020
8ac1f91
Fix: rename SethealthChecker to SetHealthChecker
watermelo Sep 9, 2020
c9726e4
Fix: syntax error
watermelo Sep 9, 2020
e7d38aa
Merge pull request #741 from beiwei30/address-batch-mode
zouyx Sep 10, 2020
7bb924a
Merge pull request #746 from watermelo/Fix/rename_health_checher
AlexStocks Sep 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
# Release Notes
---

## 1.5.1

### New Features
- [Add dynamic tag router](https://github.com/apache/dubbo-go/pull/703)
- [Add TLS support](https://github.com/apache/dubbo-go/pull/685)
- [Add Nearest first for multiple registry](https://github.com/apache/dubbo-go/pull/659)
- [Add application and service level router](https://github.com/apache/dubbo-go/pull/662)
- [Add dynamic tag router](https://github.com/apache/dubbo-go/pull/665)

### Enhancement
- [Avoid init the log twice](https://github.com/apache/dubbo-go/pull/719)
- [Correct words and format codes](https://github.com/apache/dubbo-go/pull/704)
- [Change log stack level from warn to error](https://github.com/apache/dubbo-go/pull/702)
- [Optimize remotes configuration](https://github.com/apache/dubbo-go/pull/687)

### Bugfixes
- [Fix register service instance after provider config load](https://github.com/apache/dubbo-go/pull/694)
- [Fix call subscribe function asynchronously](https://github.com/apache/dubbo-go/pull/721)
- [Fix tag router rule copy](https://github.com/apache/dubbo-go/pull/721)
- [Fix nacos unit test failed](https://github.com/apache/dubbo-go/pull/705)
- [Fix can not inovke nacos destroy when graceful shutdown](https://github.com/apache/dubbo-go/pull/689)
- [Fix zk lost event](https://github.com/apache/dubbo-go/pull/692)
- [Fix k8s ut bug](https://github.com/apache/dubbo-go/pull/693)

Milestone: [https://github.com/apache/dubbo-go/milestone/2?closed=1](https://github.com/apache/dubbo-go/milestone/2?closed=1)

Project: [https://github.com/apache/dubbo-go/projects/8](https://github.com/apache/dubbo-go/projects/8)

## 1.5.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
4 changes: 3 additions & 1 deletion 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.1 - Aug 23, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.5.1)

[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)
Expand All @@ -34,7 +36,7 @@ Both extension module and layered project architecture is according to Apache Du

![dubbo go extend](./doc/pic/arch/dubbo-go-ext.png)

If you wanna know more about dubbo-go, please visit this reference [Project Architeture design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design)
If you wanna know more about dubbo-go, please visit this reference [Project Architecture design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design)

## Feature list ##

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ go test ./... -coverprofile=coverage.txt -covermode=atomic

## [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),以便我们知晓之
若你正在使用 [apache/dubbo-go](github.com/apache/dubbo-go) 且认为其有用或者想对其做改进,请添列贵司信息于 [用户列表](https://github.com/apache/dubbo-go/issues/2),以便我们知晓

<div>
<table>
Expand Down
3 changes: 3 additions & 0 deletions before_ut.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ 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/"

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

md metadata\report\zookeeper\zookeeper-4unittest\contrib\fatjar
xcopy /f "%zkJar%" "metadata/report/zookeeper/zookeeper-4unittest/contrib/fatjar/"
3 changes: 3 additions & 0 deletions before_ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ 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

mkdir -p cluster/router/tag/zookeeper-4unittest/contrib/fatjar
cp ${zkJar} cluster/router/tag/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)
}
19 changes: 19 additions & 0 deletions cluster/cluster_impl/base_cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

package cluster_impl

import (
"context"
)

import (
gxnet "github.com/dubbogo/gost/net"
perrors "github.com/pkg/errors"
Expand All @@ -36,6 +40,7 @@ type baseClusterInvoker struct {
availablecheck bool
destroyed *atomic.Bool
stickyInvoker protocol.Invoker
interceptor cluster.ClusterInterceptor
}

func newBaseClusterInvoker(directory cluster.Directory) baseClusterInvoker {
Expand Down Expand Up @@ -146,6 +151,20 @@ func (invoker *baseClusterInvoker) doSelectInvoker(lb cluster.LoadBalance, invoc
return selectedInvoker
}

func (invoker *baseClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result {
if invoker.interceptor != nil {
invoker.interceptor.BeforeInvoker(ctx, invocation)

result := invoker.interceptor.DoInvoke(ctx, invocation)

invoker.interceptor.AfterInvoker(ctx, invocation)

return result
}

return nil
}

func isInvoked(selectedInvoker protocol.Invoker, invoked []protocol.Invoker) bool {
for _, i := range invoked {
if i == selectedInvoker {
Expand Down
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
6 changes: 3 additions & 3 deletions cluster/cluster_impl/failover_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ package cluster_impl

import (
"github.com/apache/dubbo-go/cluster"
"github.com/apache/dubbo-go/common/constant"
"github.com/apache/dubbo-go/common/extension"
"github.com/apache/dubbo-go/protocol"
)

type failoverCluster struct{}

const name = "failover"

func init() {
extension.SetCluster(name, NewFailoverCluster)
extension.SetCluster(constant.FAILOVER_CLUSTER_NAME, NewFailoverCluster)
}

// NewFailoverCluster returns a failover cluster instance
Expand All @@ -40,6 +39,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
15 changes: 15 additions & 0 deletions cluster/cluster_impl/failover_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
// mock invoker
// ///////////////////////////

// nolint
type MockInvoker struct {
url common.URL
available bool
Expand All @@ -51,6 +52,7 @@ type MockInvoker struct {
successCount int
}

// nolint
func NewMockInvoker(url common.URL, successCount int) *MockInvoker {
return &MockInvoker{
url: url,
Expand All @@ -60,23 +62,28 @@ func NewMockInvoker(url common.URL, successCount int) *MockInvoker {
}
}

// nolint
func (bi *MockInvoker) GetUrl() common.URL {
return bi.url
}

// nolint
func (bi *MockInvoker) IsAvailable() bool {
return bi.available
}

// nolint
func (bi *MockInvoker) IsDestroyed() bool {
return bi.destroyed
}

// nolint
type rest struct {
tried int
success bool
}

// nolint
func (bi *MockInvoker) Invoke(c context.Context, invocation protocol.Invocation) protocol.Result {
count++
var (
Expand All @@ -93,14 +100,17 @@ func (bi *MockInvoker) Invoke(c context.Context, invocation protocol.Invocation)
return result
}

// nolint
func (bi *MockInvoker) Destroy() {
logger.Infof("Destroy invoker: %v", bi.GetUrl().String())
bi.destroyed = true
bi.available = false
}

// nolint
var count int

// nolint
func normalInvoke(successCount int, urlParam url.Values, invocations ...*invocation.RPCInvocation) protocol.Result {
extension.SetLoadbalance("random", loadbalance.NewRandomLoadBalance)
failoverCluster := NewFailoverCluster()
Expand All @@ -119,20 +129,23 @@ func normalInvoke(successCount int, urlParam url.Values, invocations ...*invocat
return clusterInvoker.Invoke(context.Background(), &invocation.RPCInvocation{})
}

// nolint
func TestFailoverInvokeSuccess(t *testing.T) {
urlParams := url.Values{}
result := normalInvoke(3, urlParams)
assert.NoError(t, result.Error())
count = 0
}

// nolint
func TestFailoverInvokeFail(t *testing.T) {
urlParams := url.Values{}
result := normalInvoke(4, urlParams)
assert.Errorf(t, result.Error(), "error")
count = 0
}

// nolint
func TestFailoverInvoke1(t *testing.T) {
urlParams := url.Values{}
urlParams.Set(constant.RETRIES_KEY, "3")
Expand All @@ -141,6 +154,7 @@ func TestFailoverInvoke1(t *testing.T) {
count = 0
}

// nolint
func TestFailoverInvoke2(t *testing.T) {
urlParams := url.Values{}
urlParams.Set(constant.RETRIES_KEY, "2")
Expand All @@ -152,6 +166,7 @@ func TestFailoverInvoke2(t *testing.T) {
count = 0
}

// nolint
func TestFailoverDestroy(t *testing.T) {
extension.SetLoadbalance("random", loadbalance.NewRandomLoadBalance)
failoverCluster := NewFailoverCluster()
Expand Down
1 change: 1 addition & 0 deletions cluster/cluster_impl/failsafe_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewFailsafeCluster() cluster.Cluster {
return &failsafeCluster{}
}

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

// nolint
func (invoker *failsafeClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result {
invokers := invoker.directory.List(invocation)

Expand Down
1 change: 1 addition & 0 deletions cluster/cluster_impl/forking_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewForkingCluster() cluster.Cluster {
return &forkingCluster{}
}

// Join returns a baseClusterInvoker instance
func (cluster *forkingCluster) Join(directory cluster.Directory) protocol.Invoker {
return newForkingClusterInvoker(directory)
}
2 changes: 1 addition & 1 deletion cluster/cluster_impl/forking_cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func newForkingClusterInvoker(directory cluster.Directory) protocol.Invoker {
}
}

// Invoke ...
// nolint
func (invoker *forkingClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result {
if err := invoker.checkWhetherDestroyed(); err != nil {
return &protocol.RPCResult{Err: err}
Expand Down
1 change: 1 addition & 0 deletions cluster/cluster_impl/mock_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func NewMockCluster() cluster.Cluster {
return &mockCluster{}
}

// nolint
func (cluster *mockCluster) Join(directory cluster.Directory) protocol.Invoker {
return protocol.NewBaseInvoker(directory.GetUrl())
}
Loading