# 谈谈raft fig8 —— 迷惑的提交条件和选举条件

## 迷惑的选举条件

Raft determines which of two logs is more up-to-date by comparing the index and term of the last entries in the logs. If the logs have last entries with different terms, then the log with the later term is more up-to-date. If the logs end with the same term, then whichever log is longer is more up-to-date.