We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86ae838 commit 05596feCopy full SHA for 05596fe
store/tikv/kv.go
@@ -54,11 +54,15 @@ type Driver struct {
54
}
55
56
func createEtcdKV(addrs []string, tlsConfig *tls.Config) (*clientv3.Client, error) {
57
+ cfg := config.GetGlobalConfig()
58
cli, err := clientv3.New(clientv3.Config{
- Endpoints: addrs,
59
- AutoSyncInterval: 30 * time.Second,
60
- DialTimeout: 5 * time.Second,
61
- TLS: tlsConfig,
+ Endpoints: addrs,
+ AutoSyncInterval: 30 * time.Second,
+ DialTimeout: 5 * time.Second,
62
+ TLS: tlsConfig,
63
+ DialKeepAliveTime: time.Second * time.Duration(cfg.TiKVClient.GrpcKeepAliveTime),
64
+ DialKeepAliveTimeout: time.Second * time.Duration(cfg.TiKVClient.GrpcKeepAliveTimeout),
65
+ PermitWithoutStream: true,
66
})
67
if err != nil {
68
return nil, errors.Trace(err)
0 commit comments