mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
This commit is contained in:
commit
08af8cd9b0
4
etcd.go
4
etcd.go
@ -105,7 +105,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
ELECTIONTIMTOUT = 200 * time.Millisecond
|
||||
ELECTIONTIMEOUT = 200 * time.Millisecond
|
||||
HEARTBEATTIMEOUT = 50 * time.Millisecond
|
||||
|
||||
// Timeout for internal raft http connection
|
||||
@ -237,7 +237,7 @@ func startRaft(securityType int) {
|
||||
}
|
||||
}
|
||||
|
||||
raftServer.SetElectionTimeout(ELECTIONTIMTOUT)
|
||||
raftServer.SetElectionTimeout(ELECTIONTIMEOUT)
|
||||
raftServer.SetHeartbeatTimeout(HEARTBEATTIMEOUT)
|
||||
|
||||
raftServer.Start()
|
||||
|
@ -55,8 +55,8 @@ func TestKillLeader(t *testing.T) {
|
||||
totalTime += take
|
||||
avgTime := totalTime / (time.Duration)(i+1)
|
||||
|
||||
fmt.Println("Leader election time is ", take, "with election timeout", ELECTIONTIMTOUT)
|
||||
fmt.Println("Leader election time average is", avgTime, "with election timeout", ELECTIONTIMTOUT)
|
||||
fmt.Println("Leader election time is ", take, "with election timeout", ELECTIONTIMEOUT)
|
||||
fmt.Println("Leader election time average is", avgTime, "with election timeout", ELECTIONTIMEOUT)
|
||||
etcds[num], err = os.StartProcess("etcd", argGroup[num], procAttr)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user