[RAFT] change minor log
@@ -359,6 +359,7 @@ func (cl *Cluster) addMember(member *consensus.Member, applied bool) error {
if cl.AppliedMembers().isExist(member.ID) {
return ErrMemberAlreadyApplied
}
+ logger.Debug().Str("member", member.ToString()).Msg("add to applied members")
cl.AppliedMembers().add(member)
// notify to p2p TODO temporary code
@@ -370,7 +371,7 @@ func (cl *Cluster) addMember(member *consensus.Member, applied bool) error {
}
if cl.members.isExist(member.ID) {
- logger.Debug().Str("member", member.ToString()).Msg("member already exists")
+ logger.Debug().Str("member", member.ToString()).Msg("omit adding to init members")
return nil
}
@@ -602,7 +603,7 @@ func (cl *Cluster) toStringWithLock() string {
buf = fmt.Sprintf("total=%d, NodeName=%s, RaftID=%x, ", cl.Size, cl.NodeName(), cl.NodeID())
buf += "members: " + cl.members.toString()
- buf += ", appliedMembers: " + cl.members.toString()
+ buf += ", appliedMembers: " + cl.appliedMembers.toString()
return buf
}
