Skip to content

Commit

Permalink
tikv: fix "Got too many pings" GRPC error in PD-server follower (ping…
Browse files Browse the repository at this point in the history
…cap#17885) (pingcap#17946)

Signed-off-by: sre-bot <sre-bot@pingcap.com>
  • Loading branch information
sre-bot authored Jul 21, 2020
1 parent 5a38c11 commit 1fb3c7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,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(),
Expand Down
5 changes: 2 additions & 3 deletions store/tikv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,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,
}),
))

Expand Down

0 comments on commit 1fb3c7c

Please sign in to comment.