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

feat(exex): canonicalize WAL #11210

Closed
wants to merge 10 commits into from
Closed

Conversation

shekhirin
Copy link
Collaborator

Closes #11202

@github-actions github-actions bot added A-exex Execution Extensions C-enhancement New feature or request labels Sep 25, 2024
@shekhirin shekhirin marked this pull request as ready for review September 25, 2024 16:58
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

have a few questions.

it feels a bit weird to modify the notifications in place but I get why we're doing this.
is the exexmanager then responsible for emitting the corrected notifications from wal, right?

/// Canonicalizes the WAL by inserting inverts of notifications that have non-canonical blocks.
///
/// 1. Iterate over all notifications in the WAL in reverse order.
/// 2. Remove dangling inverted notifications from the previous run of this function.
Copy link
Collaborator

Choose a reason for hiding this comment

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

unclear what inverted means here

/// 4. Invert the notifications using [`ExExNotification::into_inverted`].
/// 5. Commit the inverted notifications using [`Wal::commit`].
///
/// Effectivel, it reverts the WAL to the state of the passed provider, ensuring that the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// Effectivel, it reverts the WAL to the state of the passed provider, ensuring that the
/// Effectively, it reverts the WAL to the state of the passed provider, ensuring that the

@@ -278,6 +282,83 @@ impl ExExManager {
self.handle.clone()
}

/// Canonicalizes the WAL by inserting inverts of notifications that have non-canonical blocks.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this lacks context about why we're doing this, making all of this very confusing.

Comment on lines +11 to +15
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) enum NotificationCommitTarget {
Commit,
Canonicalize,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

dont fully understand why we need to track this?
is this so we know whether we modified this?

@shekhirin shekhirin closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-exex Execution Extensions C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revert ExEx WAL in case it's ahead of the node
2 participants