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

[adapter] Pass write kind information to temporary store #4552

Merged
merged 2 commits into from
Sep 14, 2022

Conversation

tnowacki
Copy link
Contributor

  • The temporary storage and Storage trait has to recreate a lot of information already known to the adapter
  • This removes some messiness about having to determine what objects were created or wrapped, which is already done inside the adapter

@@ -1423,11 +1423,16 @@ impl TransactionEffects {
/// created and unwrapped objects. In other words, all objects that still exist
/// in the object state after this transaction.
/// It doesn't include deleted/wrapped objects.
pub fn all_mutated(&self) -> impl Iterator<Item = &(ObjectRef, Owner)> + Clone {
pub fn all_mutated(&self) -> impl Iterator<Item = (&ObjectRef, &Owner, WriteKind)> + Clone {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this function need to return the WriteKind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because of gateway_state. It pulls information out of transaction effects, modifies it, and puts it back into a new TemporaryStore, which now needs the write kind

- The temporary storage and Storage trait has to recreate a lot of information already known to the adapter
- This removes some messiness about having to determine what objects were created or wrapped, which is already done inside the adapter
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