Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
doggeral authored Dec 26, 2019
2 parents 39f43c9 + 05596fe commit a9976ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions store/tikv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,15 @@ type Driver struct {
}

func createEtcdKV(addrs []string, tlsConfig *tls.Config) (*clientv3.Client, error) {
cfg := config.GetGlobalConfig()
cli, err := clientv3.New(clientv3.Config{
Endpoints: addrs,
AutoSyncInterval: 30 * time.Second,
DialTimeout: 5 * time.Second,
TLS: tlsConfig,
Endpoints: addrs,
AutoSyncInterval: 30 * time.Second,
DialTimeout: 5 * time.Second,
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)
Expand Down

0 comments on commit a9976ad

Please sign in to comment.