Skip to content

Commit

Permalink
fix: handle trailing zeros in Raft log WAL with EXT4 writeback mode
Browse files Browse the repository at this point in the history
When EXT4 is mounted with data=writeback, data and metadata (file length)
can be written to disk in arbitrary order, potentially leaving trailing
zeros in the WAL tail.

Fix: Truncate zero bytes starting from the first un-decodable WALRecord
and treat the chunk as successfully opened.

This issue is fixed in the dependent crate:
- drmingdrmer/raft-log@757542b
  • Loading branch information
drmingdrmer committed Dec 12, 2024
1 parent 20ed53f commit 509cb46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ prost = { version = "0.13" }
prost-build = { version = "0.13" }
prqlc = "0.11.3"
quanta = "0.11.1"
raft-log = { version = "0.2.5" }
raft-log = { version = "0.2.6" }
rand = { version = "0.8.5", features = ["small_rng"] }
rayon = "1.9.0"
recursive = "0.1.1"
Expand Down

0 comments on commit 509cb46

Please sign in to comment.