From 359243422e531999ac4d60d2f46371f9d6046a88 Mon Sep 17 00:00:00 2001 From: lysu Date: Thu, 11 Jun 2020 13:53:48 +0800 Subject: [PATCH] cherry pick #17885 to release-4.0 Signed-off-by: sre-bot --- domain/domain.go | 5 ++--- store/tikv/kv.go | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/domain/domain.go b/domain/domain.go index 6eb78fa511445..9d7d8f74975de 100644 --- a/domain/domain.go +++ b/domain/domain.go @@ -663,9 +663,8 @@ func (do *Domain) Init(ddlLease time.Duration, sysFactory func(*Domain) (pools.R DialOptions: []grpc.DialOption{ grpc.WithBackoffMaxDelay(time.Second * 3), grpc.WithKeepaliveParams(keepalive.ClientParameters{ - Time: time.Duration(cfg.TiKVClient.GrpcKeepAliveTime) * time.Second, - Timeout: time.Duration(cfg.TiKVClient.GrpcKeepAliveTimeout) * time.Second, - PermitWithoutStream: true, + Time: time.Duration(cfg.TiKVClient.GrpcKeepAliveTime) * time.Second, + Timeout: time.Duration(cfg.TiKVClient.GrpcKeepAliveTimeout) * time.Second, }), }, TLS: ebd.TLSConfig(), diff --git a/store/tikv/kv.go b/store/tikv/kv.go index 262b8046e9e33..f84c91ab13ac3 100644 --- a/store/tikv/kv.go +++ b/store/tikv/kv.go @@ -61,7 +61,6 @@ func createEtcdKV(addrs []string, tlsConfig *tls.Config) (*clientv3.Client, erro TLS: tlsConfig, DialKeepAliveTime: time.Second * time.Duration(cfg.TiKVClient.GrpcKeepAliveTime), DialKeepAliveTimeout: time.Second * time.Duration(cfg.TiKVClient.GrpcKeepAliveTimeout), - PermitWithoutStream: true, }) if err != nil { return nil, errors.Trace(err) @@ -89,9 +88,8 @@ func (d Driver) Open(path string) (kv.Storage, error) { KeyPath: security.ClusterSSLKey, }, pd.WithGRPCDialOptions( grpc.WithKeepaliveParams(keepalive.ClientParameters{ - Time: time.Duration(tikvConfig.GrpcKeepAliveTime) * time.Second, - Timeout: time.Duration(tikvConfig.GrpcKeepAliveTimeout) * time.Second, - PermitWithoutStream: true, + Time: time.Duration(tikvConfig.GrpcKeepAliveTime) * time.Second, + Timeout: time.Duration(tikvConfig.GrpcKeepAliveTimeout) * time.Second, }), ))