1、etcd中的raft的log entries是什么時候存盤到磁盤里的?
2、log entries提交的時候為什么不需要記錄到磁盤里,即下面的l.committed?
func (l *raftLog) commitTo(tocommit uint64) {
// never decrease commit
if l.committed < tocommit {
if l.lastIndex() < tocommit {
l.logger.Panicf("tocommit(%d) is out of range [lastIndex(%d)]. Was the raft log corrupted, truncated, or lost?", tocommit, l.lastIndex())
}
l.committed = tocommit //不需要記錄到硬碟上???????
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/75890.html
標籤:云存儲
