mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
refactor(raft): use decimal format to print number in raft log.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
This commit is contained in:
parent
3e43d5020b
commit
865dbdfa61
@ -263,7 +263,7 @@ func (r *raftFsm) Step(m *proto.Message) {
|
||||
// term.
|
||||
default:
|
||||
if logger.IsEnableDebug() {
|
||||
logger.Debug("[raft->Step][%d,%d] [term: %d] received a %s message with higher term from %d [term: %d]",
|
||||
logger.Debug("[raft->Step][%d,%s] [term: %d] received a %s message with higher term from %d [term: %d]",
|
||||
r.id, r.config.ReplicateAddr, r.term, m.Type, m.From, m.Term)
|
||||
}
|
||||
if m.Type == proto.ReqMsgAppend || m.Type == proto.ReqMsgHeartBeat || m.Type == proto.ReqMsgSnapShot {
|
||||
|
||||
@ -35,7 +35,7 @@ func (r *raftFsm) becomeCandidate() {
|
||||
r.vote = r.config.NodeID
|
||||
r.state = stateCandidate
|
||||
if logger.IsEnableDebug() {
|
||||
logger.Debug("raft[%v] became candidate at term %d.", r.id, r.config.TransportConfig.ReplicateAddr, r.term)
|
||||
logger.Debug("raft[%v] %s became candidate at term %d.", r.id, r.config.TransportConfig.ReplicateAddr, r.term)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user