-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(exex): canonicalize WAL #11210
Conversation
a4bbcfe
to
3bbea71
Compare
40a5b05
to
8a1d0e9
Compare
8a1d0e9
to
8b49b0b
Compare
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.
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. |
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.
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 |
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.
/// 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. |
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.
I think this lacks context about why we're doing this, making all of this very confusing.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
pub(crate) enum NotificationCommitTarget { | ||
Commit, | ||
Canonicalize, | ||
} |
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.
dont fully understand why we need to track this?
is this so we know whether we modified this?
Closes #11202