-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(code): Some WAL entries fail to decode #840
Changes from 3 commits
aebabcb
b4d2a45
9380e0e
aef2879
bdc9747
78ba01e
6eadd52
0c4e58e
80afd66
a1508ef
ea04fba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -530,14 +530,22 @@ async fn run_node<S>( | |
info!("Waiting until node reaches height {target_height}"); | ||
|
||
'inner: while let Ok(event) = rx_event.recv().await { | ||
let Event::StartedHeight(height) = event else { | ||
continue; | ||
}; | ||
match &event { | ||
Event::StartedHeight(height) => { | ||
info!("Node started height {height}"); | ||
|
||
info!("Node started height {height}"); | ||
if height.as_u64() == target_height { | ||
break 'inner; | ||
} | ||
} | ||
Event::WalReplayError => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure this is the best place to catch errors (WAL or others) in tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure either, but since we already detect errors in the background task, I moved it there. |
||
actor_ref.stop(Some("WAL replay error".to_string())); | ||
handle.abort(); | ||
bg.abort(); | ||
|
||
if height.as_u64() == target_height { | ||
break 'inner; | ||
return TestResult::Failure("WAL replay error".to_string()); | ||
} | ||
_ => (), | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Thanks so much for figuring this out 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should have consensus decide which entries should be logged and have wal write everything it's told to (by consensus).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
80afd66 + ea04fba