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

Update the comment for MaxCallSendMsgSize and MaxCallRecvMsgSize #18745

Closed
wants to merge 1 commit into from

Conversation

ahrtr
Copy link
Member

@ahrtr ahrtr commented Oct 16, 2024

gRPC has already changed the default values, refer to

This PR just makes sure the comment is aligned with the real values.

I am open to set a default values at etcd side (instead of using grpc's default values) in a followup to ensure

  • client.MaxSendByte (default: not set for now) =< server.MaxRecvByte (defaults to 1.5MB)
  • client.MaxRecvByte (default: not set for now) >= server.MaxSendByte (defaults to math.MaxInt32)

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.72%. Comparing base (6779a89) to head (6c297e6).

Current head 6c297e6 differs from pull request most recent head 1b43f85

Please upload reports for the commit 1b43f85 to get more accurate results.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
Files with missing lines Coverage Δ
client/v3/config.go 84.90% <ø> (ø)

... and 21 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18745      +/-   ##
==========================================
- Coverage   68.78%   68.72%   -0.07%     
==========================================
  Files         420      420              
  Lines       35481    35481              
==========================================
- Hits        24407    24383      -24     
- Misses       9647     9664      +17     
- Partials     1427     1434       +7     

Continue to review full report in Codecov by Sentry.

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

@Direktor799
Copy link

gRPC has already changed the default values, refer to

This PR just makes sure the comment is aligned with the real values.

I am open to set a default values at etcd side (instead of using grpc's default values) in a followup to ensure

  • client.MaxSendByte (default: not set for now) =< server.MaxRecvByte (defaults to 1.5MB)
  • client.MaxRecvByte (default: not set for now) >= server.MaxSendByte (defaults to math.MaxInt32)

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

There are etcd default values for these already. The comment was referring to

// client-side request send limit, gRPC default is math.MaxInt32
// Make sure that "client-side send limit < server-side default send/recv limit"
// Same value as "embed.DefaultMaxRequestBytes" plus gRPC overhead bytes
defaultMaxCallSendMsgSize = grpc.MaxCallSendMsgSize(2 * 1024 * 1024)
// client-side response receive limit, gRPC default is 4MB
// Make sure that "client-side receive limit >= server-side default send/recv limit"
// because range response can easily exceed request send limits
// Default to math.MaxInt32; writes exceeding server-side send limit fails anyway
defaultMaxCallRecvMsgSize = grpc.MaxCallRecvMsgSize(math.MaxInt32)

@ahrtr
Copy link
Member Author

ahrtr commented Oct 16, 2024

Good catch! Thanks @Direktor799

@ahrtr ahrtr closed this Oct 16, 2024
@ahrtr ahrtr deleted the grpc_default_value_20241016 branch October 16, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants