mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdmain: verify heartbeat and election flag
This commit is contained in:
parent
4c9e1686b1
commit
02fb648abf
@ -255,6 +255,10 @@ func (cfg *config) Parse(arguments []string) error {
|
||||
return errors.New("cannot resolve DNS hostnames.")
|
||||
}
|
||||
|
||||
if 5*cfg.TickMs > cfg.ElectionMs {
|
||||
return fmt.Errorf("-election-timeout[%vms] should be at least as 5 times as -heartbeat-interval[%vms]", cfg.ElectionMs, cfg.TickMs)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user