Skip to content

Commit

Permalink
Merge pull request etcd-io#11905 from tedyu/node-tick-read
Browse files Browse the repository at this point in the history
raft: avoid data race by not reading raft.lead
  • Loading branch information
gyuho authored May 31, 2020
2 parents 8af52dc + 9d20ba4 commit b2d2286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raft/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (n *node) Tick() {
case n.tickc <- struct{}{}:
case <-n.done:
default:
n.rn.raft.logger.Warningf("%x (leader %v) A tick missed to fire. Node blocks too long!", n.rn.raft.id, n.rn.raft.id == n.rn.raft.lead)
n.rn.raft.logger.Warningf("%x A tick missed to fire. Node blocks too long!", n.rn.raft.id)
}
}

Expand Down

0 comments on commit b2d2286

Please sign in to comment.