From 729f1362e577b7c7d7a83c6f49572c5c5f00b972 Mon Sep 17 00:00:00 2001 From: Xiaoyuan Jin Date: Thu, 7 Nov 2024 00:13:15 +0800 Subject: [PATCH] lightning: unlimited grpc MaxCallRecvMsgSize for TikvImporter (#56771) close pingcap/tidb#56114 --- br/pkg/lightning/backend/local/local.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/br/pkg/lightning/backend/local/local.go b/br/pkg/lightning/backend/local/local.go index 3153dbb7de6d2..1e3f4b7519ae0 100644 --- a/br/pkg/lightning/backend/local/local.go +++ b/br/pkg/lightning/backend/local/local.go @@ -118,6 +118,9 @@ var ( // MaxWriteAndIngestRetryTimes is the max retry times for write and ingest. // A large retry times is for tolerating tikv cluster failures. MaxWriteAndIngestRetryTimes = 30 + + // Unlimited RPC receive message size for TiKV importer + unlimitedRPCRecvMsgSize = math.MaxInt32 ) // ImportClientFactory is factory to create new import client for specific store. @@ -171,6 +174,7 @@ func (f *importClientFactoryImpl) makeConn(ctx context.Context, storeID uint64) addr = store.GetAddress() } opts = append(opts, + grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(unlimitedRPCRecvMsgSize)), grpc.WithConnectParams(grpc.ConnectParams{Backoff: bfConf}), grpc.WithKeepaliveParams(keepalive.ClientParameters{ Time: gRPCKeepAliveTime,