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

[BREAKING] Update undo support to use Operations #437

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

djmitche
Copy link
Collaborator

This updates the existing "undo" support to use Operations, while making some additional changes to look forward to more general undo support (#427 being the next step on that journey).

Breaking changes:

  • Replica::get_undo_ops is now Replica::get_undo_operations and returns an Operations value. It now returns the operations in the order they were applied, and includes the undo point operation, if one exists.
  • Replica::commit_undo_ops is now Replica::commit_reversed_operations and takes an Operations value as provided by get_undo_operations.

This is the second of the two planned breaking changes in #372.

This updates the existing "undo" support to use `Operations`, while
making some additional changes to look forward to more general undo
support (GothenburgBitFactory#427 being the next step on that journey).

Breaking changes:

 - `Replica::get_undo_ops` is now `Replica::get_undo_operations` and returns an
   `Operations` value. It now returns the operations in the order they were
   applied, and includes the undo point operation, if one exists.
 - `Replica::commit_undo_ops` is now `Replica::commit_reversed_operations` and
   takes an `Operations` value. It now expects an `Operations` value as
   provided by `get_undo_operations`.
@djmitche djmitche requested a review from ryneeverett July 29, 2024 02:04
Copy link
Collaborator

@ryneeverett ryneeverett left a comment

Choose a reason for hiding this comment

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

A notable change under the hood here is that UndoPoint's themselves are now reversed, right? That makes sense to me but just want to verify that was your intention.

@djmitche
Copy link
Collaborator Author

Yes. The idea is to make commit_reversed_operations a little more generic by not assuming it is reversing to an undo point.

@djmitche djmitche merged commit ecb7a20 into GothenburgBitFactory:main Jul 29, 2024
12 checks passed
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.

2 participants