rabbitmq / ra

A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.
Other
813 stars 96 forks source link

Allow the last entry in the WAL to fail CRC check #283

Closed kjnilsson closed 2 years ago

kjnilsson commented 2 years ago

Currently the WAL recovery code assumes all entries will pass the Crc check but that isn't necessarily the case if only some of the data of the last write made it to disk during an unclean shutdown.

If an entry is the last entry in the wal and it fails the Crc we should just discard it and continue with the WAL recovery phase.