etcdserver: consistent naming in raftReadyHandler

release-3.1
fanmin shi 2016-12-29 11:27:16 -08:00
parent 67c75606db
commit 2a1bae0c2a
2 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ func (r *raftNode) start(rh *raftReadyHandler) {
atomic.StoreUint64(&r.lead, rd.SoftState.Lead)
islead = rd.RaftState == raft.StateLeader
rh.leadershipUpdate()
rh.updateLeadership()
}
if len(rd.ReadStates) != 0 {

View File

@ -598,7 +598,7 @@ type etcdProgress struct {
// and helps decouple state machine logic from Raft algorithms.
// TODO: add a state machine interface to apply the commit entries and do snapshot/recover
type raftReadyHandler struct {
leadershipUpdate func()
updateLeadership func()
updateCommittedIndex func(uint64)
}
@ -624,7 +624,7 @@ func (s *EtcdServer) run() {
return
}
rh := &raftReadyHandler{
leadershipUpdate: func() {
updateLeadership: func() {
if !s.isLeader() {
if s.lessor != nil {
s.lessor.Demote()