|
@@ -172,12 +172,8 @@ func (r *raftNode) start(s *EtcdServer) {
|
|
|
atomic.StoreUint64(&r.lead, rd.SoftState.Lead)
|
|
atomic.StoreUint64(&r.lead, rd.SoftState.Lead)
|
|
|
if rd.RaftState == raft.StateLeader {
|
|
if rd.RaftState == raft.StateLeader {
|
|
|
islead = true
|
|
islead = true
|
|
|
- // TODO: raft should send server a notification through chan when
|
|
|
|
|
- // it promotes or demotes instead of modifying server directly.
|
|
|
|
|
syncC = r.s.SyncTicker
|
|
syncC = r.s.SyncTicker
|
|
|
- if r.s.lessor != nil {
|
|
|
|
|
- r.s.lessor.Promote(r.s.Cfg.electionTimeout())
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
// TODO: remove the nil checking
|
|
// TODO: remove the nil checking
|
|
|
// current test utility does not provide the stats
|
|
// current test utility does not provide the stats
|
|
|
if r.s.stats != nil {
|
|
if r.s.stats != nil {
|