From 457e8dbbca69af8aea6059b07b52f8777f973be2 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Tue, 24 Oct 2023 08:18:52 +0300 Subject: [PATCH 1/2] Update gRPC max recv size to 256MB --- pkg/medusa/grpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/medusa/grpc.go b/pkg/medusa/grpc.go index 3e301a3b1..5393ce31d 100644 --- a/pkg/medusa/grpc.go +++ b/pkg/medusa/grpc.go @@ -24,7 +24,7 @@ type DefaultFactory struct { func (f *DefaultFactory) NewClient(ctx context.Context, address string) (Client, error) { callCtx, cancel := context.WithTimeout(ctx, 5*time.Second) - conn, err := grpc.DialContext(callCtx, address, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), grpc.WithDefaultCallOptions(grpc.WaitForReady(false))) + conn, err := grpc.DialContext(callCtx, address, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), grpc.WithDefaultCallOptions(grpc.WaitForReady(false), grpc.MaxCallRecvMsgSize(1024*1024*256))) f.cancelFunc = cancel if err != nil { From d1106c953483260a7e927f03a3152879ab8d7f13 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 25 Oct 2023 15:10:56 +0300 Subject: [PATCH 2/2] Update CHANGELOG, up the gRPC max size to 512MB --- CHANGELOG/CHANGELOG-1.10.md | 1 + pkg/medusa/grpc.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG/CHANGELOG-1.10.md b/CHANGELOG/CHANGELOG-1.10.md index 575eee746..5afd668d0 100644 --- a/CHANGELOG/CHANGELOG-1.10.md +++ b/CHANGELOG/CHANGELOG-1.10.md @@ -20,3 +20,4 @@ When cutting a new release, update the `unreleased` heading to the tag being gen * [BUGFIX] [#1060](https://github.com/k8ssandra/k8ssandra-operator/issues/1060) Fix restore mapping shuffling nodes when restoring in place * [BUGFIX] [#1061](https://github.com/k8ssandra/k8ssandra-operator/issues/1061) Point to cass-config-builder 1.0.7 for arm64 compatibility * [ENHANCEMENT] [#956](https://github.com/k8ssandra/k8ssandra-operator/issues/956) Enable linting in the project +* [BUGFIX] [#1102](https://github.com/k8ssandra/k8ssandra-operator/issues/1102) Update gRPC maximum receive size to 512MB. Note, the operator might need more max memory than the default to take advantage of this. \ No newline at end of file diff --git a/pkg/medusa/grpc.go b/pkg/medusa/grpc.go index 5393ce31d..10fea7c63 100644 --- a/pkg/medusa/grpc.go +++ b/pkg/medusa/grpc.go @@ -24,7 +24,7 @@ type DefaultFactory struct { func (f *DefaultFactory) NewClient(ctx context.Context, address string) (Client, error) { callCtx, cancel := context.WithTimeout(ctx, 5*time.Second) - conn, err := grpc.DialContext(callCtx, address, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), grpc.WithDefaultCallOptions(grpc.WaitForReady(false), grpc.MaxCallRecvMsgSize(1024*1024*256))) + conn, err := grpc.DialContext(callCtx, address, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), grpc.WithDefaultCallOptions(grpc.WaitForReady(false), grpc.MaxCallRecvMsgSize(1024*1024*512))) f.cancelFunc = cancel if err != nil {