Skip to content

Commit

Permalink
lightning: unlimited grpc MaxCallRecvMsgSize for TikvImporter (pingca…
Browse files Browse the repository at this point in the history
  • Loading branch information
fishiu authored Nov 6, 2024
1 parent 0a8a35b commit b522e98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/lightning/backend/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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.
Expand Down Expand Up @@ -165,6 +168,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,
Expand Down

0 comments on commit b522e98

Please sign in to comment.