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

[Bugfix] Custom triple server message size #2246

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

mark4z
Copy link
Member

@mark4z mark4z commented Mar 11, 2023

According to the pr of #1654, for the client side, the function works normally, but for the server side, the order of Provider Export is not always the same, resulting in sometimes max-server-send-msg-size not taking effect, and for the server side, it is not possible to customize the message size based on the request, so a more appropriate The more appropriate setting should be placed on the protocol.
This pr also fixes the grpc protocol, which can also be used to customize the message size in this way.

What this PR does:
Custom triple/grpc server message size
For message size , The available units are, b/kb/kib/mib/mb/gib/gb, 1kb = 1000b and 1kib = 1024b

Provider:

dubbo:
  protocols:
    triple:
      name: tri
      port: 20000
      max-server-send-msg-size: 4mib
      max-server-recv-msg-size: 4mib

Consumer:

  consumer:
    references:
      GreeterClientImpl:
        protocol: tri
        params:
          max-call-send-msg-size: 4mib
          max-call-recv-msg-size: 4mib

Which issue(s) this PR fixes:
Fixes #2176

You should pay attention to items below to ensure your pr passes our ci test
We do not merge pr with ci tests failed

  • All ut passed (run 'go test ./...' in project root)
  • After go-fmt ed , run 'go fmt project' using goland.
  • Golangci-lint passed, run 'sudo golangci-lint run' in project root.
  • Your new-created file needs to have apache license at the top, like other existed file does.
  • All integration test passed. You can run integration test locally (with docker env). Clone our 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 projM1 Slice is not Support)

Copy link
Member

@justxuewei justxuewei left a comment

Choose a reason for hiding this comment

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

Thanks @mark4z, a few comments.

protocol/grpc/client.go Outdated Show resolved Hide resolved
protocol/grpc/client.go Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Mar 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@justxuewei
Copy link
Member

@zhaoyunxing92 zhaoyunxing92 merged commit 44827e1 into apache:3.0 Mar 24, 2023
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.

3 participants