-
Notifications
You must be signed in to change notification settings - Fork 70
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
Valter's work addressing basho/riak_dt#99 #113
base: 2.0
Are you sure you want to change the base?
Conversation
Also takes care to not duplicate lots of clocks throughout structure. Still uses dots at head of field to solve the bottom vs. bottomish thing
Added remove subtree Missing: - Control visibility of elements that have tombstones (recursive function, may be expensive) - Add context to remove subtree
Started refactoring
Corrected some wrong logic in clear tombstones.
Added new failing test.
Use it on propagate_remove() to fix error in test.
Removed unnecessary code replaced raik_dt_vclock:fresh() by macro Removed whitespaces
…_deferred/2 from the interface. Fixed some issues with map dialyzer.
The current version of the map clears deferred operations when an entry is removed (and no dot survives), allowing some dots that should be deleted by a deferred operation to remain in the state:
In a nutshell, i've changed the Map data-type to avoid losing these deferred operations. The remove operation now calls a propagate_remove() function that recursively checks if any child of the current map entry has any deferred operations. All deferred operations are merged into the object clock and propagated to the root element that was deleted, filling the tombstone of the map entries on the way. Since the amount of meta-data in the object state was growing, i decided to separate the meta-data from the actual value so a map entry is now {{Dots, Seen, Tombstone},CRDT}. |
I've opened this pull request to keep track of comments/feedback as I work through the code.