-
Notifications
You must be signed in to change notification settings - Fork 56
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
Docs: Explain ResetRemove
#124
Comments
Reset-remove semantics was introduced with the Map CRDT. But more generally, It's what you end up with when you extend the ideas from the ORSWOT CRDT to model a key-value CRDT where the value is also a CRDT. Reset-remove comes in when you need to deal with the case where a key is remove while concurrently the value associated with that key is updated by another replica. Reset-remove semantics says that when those two states merge, we should see that the removed key now exists and that it's value is only the update that the other replica had made, all other information in that value CRDT has been removed. It's as if the second replica was operating on the empty CRDT. Concretely given an initial common state of a nested Map CRDT: Replica 1 executes REMOVE(a) -> Replica 1 and 2 merge -> All information seen by replica 1 is removed and it's as if Replica 2 was operating on the reset value Hopefully that's makes things clearer, let me know if not. You're right that the
This explanation of reset-remove is dealing specifically with the Map CRDT (It's talking about map entries and such) so I think we keep it in map.rs for now. I'll see about a more general definition for the ResetRemove trait. |
Ahhhh, this is the key idea behind it then. Yeah that makes sense. Thanks for the explanation. Initially I thought You could probably copy most of your comment into the module-level docs in the |
A PR would be very welcome |
I have read most of the A comprehensive study of Convergent and Commutative Replicated Data Types paper, but as far as I can tell, it contains no notion similar to
ResetRemove
, and I can't figure out what purpose that trait serves.The following explanation can be found in the docs for
Map
, but not forResetRemove
:ResetRemove
are aVal
and can be used inMap
. Why?ResetRemove
probably?The text was updated successfully, but these errors were encountered: