diff --git a/etcdserver/config.go b/etcdserver/config.go index e67628f9473c..f2a941e1c782 100644 --- a/etcdserver/config.go +++ b/etcdserver/config.go @@ -293,6 +293,7 @@ func (c *ServerConfig) print(initial bool) { zap.String("heartbeat-interval", fmt.Sprintf("%v", time.Duration(c.TickMs)*time.Millisecond)), zap.Int("election-tick-ms", c.ElectionTicks), zap.String("election-timeout", fmt.Sprintf("%v", time.Duration(c.ElectionTicks*int(c.TickMs))*time.Millisecond)), + zap.Bool("initial-election-tick-advance", c.InitialElectionTickAdvance), zap.Uint64("snapshot-count", c.SnapCount), zap.Strings("advertise-client-urls", c.getACURLs()), zap.Strings("initial-advertise-peer-urls", c.getAPURLs()), diff --git a/etcdserver/server.go b/etcdserver/server.go index f7e32fec2edf..5a3490ec917a 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -636,8 +636,14 @@ func (s *EtcdServer) adjustTicks() { } if !s.Cfg.InitialElectionTickAdvance { + if lg != nil { + lg.Info("skipping initial election tick advance", zap.Int("election-ticks", s.Cfg.ElectionTicks)) + } return } + if lg != nil { + lg.Info("starting initial election tick advance", zap.Int("election-ticks", s.Cfg.ElectionTicks)) + } // retry up to "rafthttp.ConnReadTimeout", which is 5-sec // until peer connection reports; otherwise: