mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
chore(etcd): loose request timeout
This is a hack to improve multi-etcd boot process. It could make users alwasy start etcd cluster successfully.
This commit is contained in:
parent
26c77fcf9e
commit
3a5cb26973
10
etcd/etcd.go
10
etcd/etcd.go
@ -134,8 +134,14 @@ func (e *Etcd) Run() {
|
||||
// Calculate all of our timeouts
|
||||
heartbeatInterval := time.Duration(e.Config.Peer.HeartbeatInterval) * time.Millisecond
|
||||
electionTimeout := time.Duration(e.Config.Peer.ElectionTimeout) * time.Millisecond
|
||||
dialTimeout := (3 * heartbeatInterval) + electionTimeout
|
||||
responseHeaderTimeout := (3 * heartbeatInterval) + electionTimeout
|
||||
// TODO(yichengq): constant 1000 is a hack here. The reason to use this
|
||||
// is to ensure etcd instances could start successfully at the same time.
|
||||
// Current problem for the failure comes from the lag between join command
|
||||
// execution and join success.
|
||||
// Fix it later. It should be removed when proper method is found and
|
||||
// enough tests are provided.
|
||||
dialTimeout := (3 * heartbeatInterval) + electionTimeout + 1000
|
||||
responseHeaderTimeout := (3 * heartbeatInterval) + electionTimeout + 1000
|
||||
|
||||
// Create peer server
|
||||
psConfig := server.PeerServerConfig{
|
||||
|
Loading…
x
Reference in New Issue
Block a user