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

feat(grpc): 支持client grpc 调用 #275

Merged
merged 77 commits into from
Jan 9, 2020

Conversation

xujianhai666
Copy link
Member

No description provided.

@codecov-io
Copy link

codecov-io commented Dec 7, 2019

Codecov Report

Merging #275 into feature/grpc will decrease coverage by 0.42%.
The diff coverage is 78.94%.

Impacted file tree graph

@@               Coverage Diff                @@
##           feature/grpc     #275      +/-   ##
================================================
- Coverage         66.59%   66.16%   -0.43%     
================================================
  Files               112      118       +6     
  Lines              7175     7380     +205     
================================================
+ Hits               4778     4883     +105     
- Misses             1932     2017      +85     
- Partials            465      480      +15
Impacted Files Coverage Δ
remoting/zookeeper/client.go 64.45% <ø> (ø) ⬆️
protocol/protocolwrapper/mock_protocol_filter.go 0% <0%> (ø) ⬆️
registry/zookeeper/registry.go 55.55% <100%> (+0.15%) ⬆️
registry/protocol/protocol.go 81.73% <100%> (ø) ⬆️
protocol/dubbo/readwriter.go 68.29% <100%> (-2.08%) ⬇️
protocol/jsonrpc/jsonrpc_protocol.go 95.55% <100%> (ø) ⬆️
registry/directory/directory.go 83.78% <100%> (+0.11%) ⬆️
...rotocol/protocolwrapper/protocol_filter_wrapper.go 51.42% <100%> (ø) ⬆️
remoting/zookeeper/listener.go 48.46% <100%> (+0.53%) ⬆️
common/proxy/proxy.go 97.87% <100%> (+0.11%) ⬆️
... and 54 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d46ac0...7fa1bbd. Read the comment docs.

go.mod Outdated Show resolved Hide resolved
@@ -449,6 +449,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/tebeka/strftime v0.1.3 h1:5HQXOqWKYRFfNyBMNVc9z5+QzuBtIXy03psIhtdJYto=
github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ=
github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9/go.mod h1:RHkNRtSLfOK7qBTHaeSX1D6BNpI3qw7NTxsmNr4RvN8=
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u used so much unqualified packages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is from agollo:
-> % go mod why github.com/tevid/gohamcrest

github.com/tevid/gohamcrest

github.com/apache/dubbo-go/config_center/apollo
github.com/zouyx/agollo
github.com/zouyx/agollo.test
github.com/tevid/gohamcrest

}

gp.serverLock.Lock()
_, ok = gp.serverMap[url.Location]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

gp.serverLock.Lock()
		_, ok = gp.serverMap[url.Location]
		if !ok {
			srv := NewServer()
			gp.serverMap[url.Location] = srv
			gp.serverLock.Unlock()
			srv.Start(url)
			return
		}
		gp.serverLock.Unlock()

I think we can release the lock before invoking srv.Start(url)

@flycash
Copy link
Member

flycash commented Jan 8, 2020

LGTM

@flycash flycash merged commit 5029e32 into apache:feature/grpc Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants