Home > other >  Consult with a raft of etcd algorithm
Consult with a raft of etcd algorithm

Time:09-25

1, the raft etcd log entries when is stored in the disk?
2, the log entries submitted when why don't you need to record into the disk, namely the following l.com mitted?
 
Func (l * raftLog) commitTo (tocommit uint64) {
//never decrease commit
If l.com mitted & lt; Tocommit {
If l.l astIndex () & lt; Tocommit {
L.l ogger. Panicf (" tocommit (% d) is out of range [lastIndex (% d) ", Was the raft log corrupted, truncated, or lost?" Tocommit, l.l astIndex ())
}
L.com mitted=tocommit//no need to record to the hard disk???????????
}
}
  • Related