consensus: avoid flushing WAL

This commit is contained in:
Aleksandr Bezobchuk
2021-07-12 15:01:11 -04:00
parent 363ea56680
commit c83be540a9
+2 -6
View File
@@ -801,12 +801,8 @@ func (cs *State) receiveRoutine(maxSteps int) {
cs.handleMsg(mi)
case mi = <-cs.internalMsgQueue:
err := cs.wal.WriteSync(mi) // NOTE: fsync
if err != nil {
panic(fmt.Sprintf(
"failed to write %v msg to consensus WAL due to %v; check your file system and restart the node",
mi, err,
))
if err := cs.wal.Write(mi); err != nil {
cs.Logger.Error("failed writing to WAL", "err", err)
}
if _, ok := mi.Msg.(*VoteMessage); ok {