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

Up incoming gRPC message limit / allow override #693

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

Sushisource
Copy link
Member

No description provided.

@Sushisource Sushisource requested a review from a team as a code owner February 23, 2024 18:10
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Might be worth testing this but this LGTM. Thanks!

self.workflow_svc_client
.get_or_init(|| WorkflowServiceClient::new(self.svc.clone()))
self.workflow_svc_client.get_or_init(|| {
WorkflowServiceClient::new(self.svc.clone()).max_decoding_message_size(*DECODE_MAX_SIZE)
Copy link
Contributor

Choose a reason for hiding this comment

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

In Go we also apply this limit to to the sending side as well

Copy link
Member Author

Choose a reason for hiding this comment

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

Sending side would be limited by server though I believe

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 4 MB limit on the send side is good enough, that's the default server limit but we can make this configurable as well.

@Sushisource Sushisource enabled auto-merge (squash) February 23, 2024 18:16

/// We up the limit on incoming messages from server from the 4Mb default to 128Mb. If for
/// whatever reason this needs to be changed by the user, we support overriding it via env var.
fn get_decode_max_size() -> usize {
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer if we also supported setting this programmatically but this is good enough.

@Sushisource Sushisource merged commit f828a74 into temporalio:master Feb 23, 2024
7 checks passed
@Sushisource Sushisource deleted the up-grpc-incoming-msg branch February 23, 2024 18:37
@@ -31,6 +31,7 @@ tower = "0.4"
tracing = "0.1"
url = "2.2"
uuid = { version = "1.1", features = ["v4"] }
lazy_static = "1.4.0"
Copy link
Contributor

@djc djc Feb 23, 2024

Choose a reason for hiding this comment

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

Drive-by comment: lazy-static is more or less deprecated, and people should be using once_cell instead -- which offers a more idiomatic anyway. With newer versions of Rust, you can even rely on OnceLock from std directly, although that is a little less ergonomic than once_cell's Lazy.

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

4 participants