From d549256dd9c8eeec749fbfcb86d4bf23221e8852 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 23 Apr 2018 10:57:47 -0700 Subject: [PATCH] etcdmain: add "--initial-election-tick-advance" Signed-off-by: Gyuho Lee --- etcdmain/config.go | 1 + etcdmain/help.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/etcdmain/config.go b/etcdmain/config.go index cb211fcf7..2037b4fdb 100644 --- a/etcdmain/config.go +++ b/etcdmain/config.go @@ -137,6 +137,7 @@ func newConfig() *config { fs.Uint64Var(&cfg.SnapCount, "snapshot-count", cfg.SnapCount, "Number of committed transactions to trigger a snapshot to disk.") fs.UintVar(&cfg.TickMs, "heartbeat-interval", cfg.TickMs, "Time (in milliseconds) of a heartbeat interval.") fs.UintVar(&cfg.ElectionMs, "election-timeout", cfg.ElectionMs, "Time (in milliseconds) for an election to timeout.") + fs.BoolVar(&cfg.ec.InitialElectionTickAdvance, "initial-election-tick-advance", cfg.ec.InitialElectionTickAdvance, "Whether to fast-forward initial election ticks on boot for faster election.") fs.Int64Var(&cfg.QuotaBackendBytes, "quota-backend-bytes", cfg.QuotaBackendBytes, "Raise alarms when backend size exceeds the given quota. 0 means use the default quota.") fs.UintVar(&cfg.MaxRequestBytes, "max-request-bytes", cfg.MaxRequestBytes, "Maximum client request size in bytes the server will accept.") fs.DurationVar(&cfg.GRPCKeepAliveMinTime, "grpc-keepalive-min-time", cfg.Config.GRPCKeepAliveMinTime, "Minimum interval duration that a client should wait before pinging server.") diff --git a/etcdmain/help.go b/etcdmain/help.go index 70e30d6d8..0812197fe 100644 --- a/etcdmain/help.go +++ b/etcdmain/help.go @@ -54,6 +54,8 @@ member flags: time (in milliseconds) of a heartbeat interval. --election-timeout '1000' time (in milliseconds) for an election to timeout. See tuning documentation for details. + --initial-election-tick-advance 'true' + whether to fast-forward initial election ticks on boot for faster election. --listen-peer-urls 'http://localhost:2380' list of URLs to listen on for peer traffic. --listen-client-urls 'http://localhost:2379'