Skip to content

Conversation

@AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Jan 5, 2026

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.


Stack created with Sapling. Best reviewed with ReviewStack.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Test Results

  7 files  +  2    7 suites  +2   3m 14s ⏱️ + 2m 11s
 47 tests + 29   47 ✅ + 29  0 💤 ±0  0 ❌ ±0 
200 runs  +164  200 ✅ +164  0 💤 ±0  0 ❌ ±0 

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.
dev.restate.sdktesting.tests.AwakeableIngressEndpointTest ‑ completeWithFailure(Client)
dev.restate.sdktesting.tests.AwakeableIngressEndpointTest ‑ completeWithSuccess(Client)
dev.restate.sdktesting.tests.IngressTest ‑ idempotentInvokeSend(Client)
dev.restate.sdktesting.tests.IngressTest ‑ idempotentInvokeService(Client)
dev.restate.sdktesting.tests.IngressTest ‑ idempotentInvokeVirtualObject(Client)
dev.restate.sdktesting.tests.IngressTest ‑ idempotentSendThenAttachWIthIdempotencyKey(Client)
dev.restate.sdktesting.tests.IngressTest ‑ privateService(URI, Client)
dev.restate.sdktesting.tests.JournalRetentionTest ‑ journalShouldBeRetained(Client, URI)
dev.restate.sdktesting.tests.KafkaAndWorkflowAPITest ‑ callSharedWorkflowHandler(URI, int, Client)
dev.restate.sdktesting.tests.KafkaAndWorkflowAPITest ‑ callWorkflowHandler(URI, int, Client)
…
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[1]
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[2]
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[3]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromAdminAPI(BlockingOperation, Client, URI)[1]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromAdminAPI(BlockingOperation, Client, URI)[2]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromAdminAPI(BlockingOperation, Client, URI)[3]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromContext(BlockingOperation, Client)[1]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromContext(BlockingOperation, Client)[2]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromContext(BlockingOperation, Client)[3]
dev.restate.sdktesting.tests.Combinators ‑ awakeableOrTimeoutUsingAwakeableTimeoutCommand(Client)
…

♻️ This comment has been updated with latest results.

@AhmedSoliman AhmedSoliman changed the title Unify max_decoding_message_size configuration across gRPC services Removes max_encoding_message_size from all grpc servers and clients Jan 6, 2026
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.
@AhmedSoliman AhmedSoliman changed the title Removes max_encoding_message_size from all grpc servers and clients Unify message_size_limit configuration across gRPC services Jan 6, 2026
@AhmedSoliman AhmedSoliman changed the title Unify message_size_limit configuration across gRPC services Removes max_encoding_message_size from all grpc servers and clients Jan 6, 2026
@AhmedSoliman AhmedSoliman marked this pull request as ready for review January 6, 2026 13:13
Copy link

Copilot AI left a 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_size calls from all gRPC server implementations
  • Removed max_encoding_message_size calls from all gRPC client implementations
  • Retained max_decoding_message_size configuration 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.

Copy link
Contributor

@muhamadazmy muhamadazmy left a comment

Choose a reason for hiding this comment

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

LGTM!

@AhmedSoliman AhmedSoliman merged commit 6220e4f into main Jan 7, 2026
82 checks passed
@AhmedSoliman AhmedSoliman deleted the pr4135 branch January 7, 2026 11:11
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants