-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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] Ignore deletions for objects that are always wrapped #7174
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
isn't the Ok(Some(...)) case also questionable - if an object did exist in the store, and then was wrapped, and then deleted, is it approriate to use the last version that existed before being wrapped?
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.
also, i'm slightly concerned about how this could mask a bug in which parent_sync isn't updated, but maybe there's not much we can do about that.
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 there's an argument to be made that because wrapping is considered a form of deletion, if the object was not in
by_value_objects
, this deletion should be entirely ignored (i.e. advocating for getting rid of the use of parent sync altogether), but things are set-up this way because in practice, it's useful to know when the object is gone for good vs just hidden. That is a deeper subject than the thesis of this PR though.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'm not sure what else you would suggest?
IIRC correctly, we used to set it to
MAX - 1
instead ofprevious_version
, but that feels even more confusing.If you conceptually think of the version as being a field of the object (even though that isn't the case in Move), the
previous_version
is the consistent behavior.Though definitely open to suggestions here.
That is a potential issue, yes. One thing we have discussed doing is forming a write-ahead, crash-recovery log of
Txn => ObjectID => Version
which would indicate the version used as an input in this transaction in the case that this transaction is being reprocessed (for whatever reason). We could also populate that table for this parent sync case, which I think should help prevent any bugs with the parent_sync, but maybeThere 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.
@tnowacki We won't have to worry about that - the current and future plan for execution recovery is that we only ever execute once, then right the temporary store + effects atomically to a recovery "log" before updating the store. If the store updates are interrupted, we re-read the recovery log rather than re-executing. Otherwise there is no way to be correct wrt dynamic child loading as far as I can see.