-
Notifications
You must be signed in to change notification settings - Fork 118
Removes max_encoding_message_size from all grpc servers and clients #4135
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
Conversation
Test Results 7 files + 2 7 suites +2 3m 14s ⏱️ + 2m 11s Results for commit 6220e4f. ± Comparison against base commit f181056. This pull request removes 18 and adds 47 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
This change is part of #4130 1. Errors in the send path caused by encoding limits cannot be surfaced in logs or handled properly - connections are silently dropped. We leave the encoding limit as unlimited (the default) and will add explicit checks in key parts of the send path in a subsequent PR. 2. Setting a high decode limit does not add overhead since tonic does not preallocate this value per decoder. It only uses it as a check to limit uncompressed buffer sizes. Decode failures due to limits are correctly surfaced in logs. Therefore, we are opting to have an unlimited encoding limit on the grpc layer since failures are obsecure and we'll selectively add explicit checks in the important parts of the send path in a subsequent PR. The decode size limit is still set so practically, the impact of this change is improved logging when the limit is hit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes max_encoding_message_size configuration from all gRPC servers and clients while retaining the max_decoding_message_size limit. The change improves error visibility by addressing the issue where encoding limit failures silently drop connections without proper logging, while decode limits correctly surface errors in logs.
Key changes:
- Removed
max_encoding_message_sizecalls from all gRPC server implementations - Removed
max_encoding_message_sizecalls from all gRPC client implementations - Retained
max_decoding_message_sizeconfiguration across all servers and clients
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/node/src/network_server/grpc_svc_handler.rs | Removed encoding size limits from NodeCtlSvcHandler and MetadataProxySvcHandler servers |
| crates/metadata-store/src/protobuf.rs | Removed encoding size limit from MetadataProxySvcClient |
| crates/metadata-server/src/raft/network/handler.rs | Removed encoding size limit from MetadataServerNetworkHandler server |
| crates/metadata-server/src/grpc/handler.rs | Removed encoding size limit from MetadataServerHandler server |
| crates/metadata-server-grpc/src/grpc.rs | Removed encoding size limit from MetadataServerSvcClient |
| crates/log-server/src/protobuf.rs | Removed encoding size limit from log_server_client |
| crates/log-server/src/grpc_svc_handler.rs | Removed encoding size limit from LogServerSvcServer |
| crates/log-server-grpc/src/lib.rs | Removed encoding size limit from log_server_client |
| crates/core/src/protobuf.rs | Removed encoding size limits from ClusterCtrlSvcClient and NodeCtlSvcClient |
| crates/core/src/network/grpc/svc_handler.rs | Removed encoding size limit from CoreNodeSvcHandler server |
| crates/core/src/network/grpc/connector.rs | Removed encoding size limit from CoreNodeSvcClient |
| crates/admin/src/cluster_controller/grpc_svc_handler.rs | Removed encoding size limit from ClusterCtrlSvcHandler server |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
muhamadazmy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This change is part of #4130
leave the encoding limit as unlimited (the default) and will add explicit checks in key parts of the send path in a subsequent PR.
Therefore, we are opting to have an unlimited encoding limit on the grpc layer since failures are obsecure and we'll
selectively add explicit checks in the important parts of the send path in a subsequent PR.
The decode size limit is still set so practically, the impact of this change is improved logging when the limit is hit.
Stack created with Sapling. Best reviewed with ReviewStack.