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,