Skip to content
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

[validator] Drop tx from WAL when validator halt #5165

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Oct 12, 2022

If a tx failed to commit due to validator halt, it will never succeed. We should drop it from WAL to prevent retrying.

@lxfind lxfind requested review from mystenmark and velvia October 12, 2022 22:29
@lxfind lxfind force-pushed the validator-drop-wal-validator-halt branch from 950001b to ca7d165 Compare October 12, 2022 23:07
.await
{
if matches!(err, SuiError::ValidatorHaltedAtEpochEnd) {
debug!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, how many TXes are expected to fall into this condition, of not being able to proceed because of a halt? And is it necessary to halt right away, instead of letting them finish?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could wait a bit to reduce the chance of this happening, but at some point we need to close the door

Copy link
Contributor

@mystenmark mystenmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one suggestion.

crates/sui-core/src/authority.rs Show resolved Hide resolved
@lxfind lxfind force-pushed the validator-drop-wal-validator-halt branch from ca7d165 to 4b9f868 Compare October 14, 2022 06:02
@lxfind lxfind enabled auto-merge (squash) October 14, 2022 06:03
@lxfind lxfind force-pushed the validator-drop-wal-validator-halt branch from 4b9f868 to 61a206d Compare October 14, 2022 16:16
@lxfind lxfind merged commit 87e1314 into main Oct 14, 2022
@lxfind lxfind deleted the validator-drop-wal-validator-halt branch October 14, 2022 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants