Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 14c8c9b

Browse files
authored
sqld: Revert be7386 and remove decoding limits (#752)
This reverts be7386 and removes decoding limits for the `ReplicationLogProxyClient` so that when replication requests get forwarded to the primary and it returns a full batch of `1024` frames it does not trigger the 4mb decoding limit set by default for tonic gRPC clients.
1 parent ddc0232 commit 14c8c9b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sqld/src/rpc/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ pub async fn run_rpc_server<A: crate::net::Accept>(
8585
.await
8686
.context("http server")?;
8787
} else {
88-
let proxy = ProxyServer::new(proxy_service).max_encoding_message_size(usize::MAX);
89-
let replication =
90-
ReplicationLogServer::new(logger_service).max_encoding_message_size(usize::MAX);
88+
let proxy = ProxyServer::new(proxy_service);
89+
let replication = ReplicationLogServer::new(logger_service);
9190

9291
let router = tonic::transport::Server::builder()
9392
.layer(&option_layer(idle_shutdown_layer))

sqld/src/rpc/replication_log_proxy.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ pub struct ReplicationLogProxyService {
1212

1313
impl ReplicationLogProxyService {
1414
pub fn new(channel: Channel, uri: Uri) -> Self {
15-
let client = ReplicationLogClient::with_origin(channel, uri);
15+
let client =
16+
ReplicationLogClient::with_origin(channel, uri).max_decoding_message_size(usize::MAX);
17+
1618
Self { client }
1719
}
1820
}

0 commit comments

Comments
 (0)