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

Rft: network & codec #673

Merged
merged 68 commits into from
Sep 19, 2020
Merged

Rft: network & codec #673

merged 68 commits into from
Sep 19, 2020

Conversation

fangyincheng
Copy link
Contributor

What this PR does:

  • merge branch dubbo-protocol-restructure
  • refact codec

@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2020

Codecov Report

Merging #673 into develop will decrease coverage by 1.65%.
The diff coverage is 44.37%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #673      +/-   ##
===========================================
- Coverage    61.44%   59.78%   -1.66%     
===========================================
  Files          251      259       +8     
  Lines        12084    12722     +638     
===========================================
+ Hits          7425     7606     +181     
- Misses        3766     4166     +400     
- Partials       893      950      +57     
Impacted Files Coverage Δ
common/url.go 60.83% <0.00%> (+0.21%) ⬆️
protocol/dubbo/impl/response.go 0.00% <0.00%> (ø)
protocol/dubbo/impl/serialize.go 0.00% <0.00%> (ø)
remoting/getty/config.go 9.85% <ø> (ø)
protocol/dubbo/impl/hessian.go 29.44% <29.44%> (ø)
remoting/getty/listener.go 35.91% <35.91%> (ø)
protocol/dubbo/impl/codec.go 39.33% <39.33%> (ø)
remoting/getty/getty_server.go 41.96% <40.62%> (ø)
remoting/getty/getty_client.go 41.17% <41.17%> (ø)
remoting/getty/pool.go 60.36% <46.66%> (ø)
... and 24 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 163d645...4f3d4ff. Read the comment docs.

func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface{}, int, error) {
req, length, err := (p.server.codec).Decode(data)
//resp,len, err := (*p.).DecodeResponse(buf)

Copy link
Contributor

Choose a reason for hiding this comment

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

pls do not left a blank line btw assignment and the if condition checker.

}

// DubboCodec. It is implements remoting.Codec
type DubboCodec struct {
Copy link
Member

Choose a reason for hiding this comment

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

singleton or not?

requestTimeout := config.GetConsumerConfig().RequestTimeout

requestTimeoutStr := url.GetParam(constant.TIMEOUT_KEY, config.GetConsumerConfig().Request_Timeout)
if t, err := time.ParseDuration(requestTimeoutStr); err == nil {
Copy link
Member

Choose a reason for hiding this comment

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

I think you should print error if error is not null

invokeResult := invoker.Invoke(ctx, rpcInvocation)
if err := invokeResult.Error(); err != nil {
result.Err = invokeResult.Error()
//p.Header.ResponseStatus = hessian.Response_OK
Copy link
Member

Choose a reason for hiding this comment

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

delete them if useless

@AlexStocks AlexStocks merged commit 256c1ed into develop Sep 19, 2020
zouyx added a commit to zouyx/dubbo-go that referenced this pull request Sep 22, 2020
@fangyincheng fangyincheng deleted the refact-seri branch October 11, 2020 14:14
AlexStocks added a commit that referenced this pull request Apr 14, 2021
AlexStocks pushed a commit that referenced this pull request Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align with Dubbo: protobuf support