[Storehouse] 008 Replay WAL onto Payloadless trie - #8598
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ea43efc to
a835d1f
Compare
ba2d7d5 to
d7bd6df
Compare
a835d1f to
8b9576b
Compare
d7bd6df to
96c606b
Compare
| // calling this. | ||
| // | ||
| // No error returns are expected during normal operation. | ||
| func (w *DiskWAL) replaySegments( |
There was a problem hiding this comment.
Pre-existing, but the read loop below checks reader.Err() only inside the loop. reader.Next() returns false on both clean EOF and read error, so if the final Next() returns false due to a corrupt/truncated record, reader.Err() is non-nil but never checked.
8b9576b to
d77747c
Compare
96c606b to
5a0946c
Compare
The previous PR #8578 defines a checkpoint, and can start up the node with a v7 checkpoint.
This PR adds the white ahead logs (WAL) replaying for payloadless trie so that on startup, after loading a payloadless checkpoint file, it can continue replaying the WAL files deriving the trie for the last executed block and resume the execution.