Open russelldb opened 10 years ago
Two dialyzer errors:
riak_dt_lwwset.erl:109: Invalid type specification for function riak_dt_lwwset:add_elem/3. The success typing is (_,_,[{_,_}]) -> [{_,_}]
riak_dt_lwwset.erl:123: Invalid type specification for function riak_dt_lwwset:remove_elem/3. The success typing is (_,_,[{_,_}]) -> [{_,_}]
Despite what the Roshi docs say, there is no GC, and there are in fact tombstones.
I'll update Roshi's docs to clarify my (perhaps eccentric) use of the term GC, and explicitly mention the possibility of doomstones (hehe). Thanks for writing!
Re-based on develop. Brought up to date.
make test
passes (including eqc)
dialyzer passes
Just needs a friendly lil' +1 from someone out there…
An LWW-Element-Set similar to Roshi/The Shapiro Tech Report. When an add and remove on the same element have the same timestamp, the add wins. Why? Makes sense to me that you only remove a element you've seen in the set, and if you remove
a
at time1
then thea
you saw must have been added at some time<1
. Therefore an add ofa
at1
is not the samea
the remove wants to remove.If there is a need for a remove wins version, we could tweak this impl to provide either based on some setup param, I guess.
Despite what the Roshi docs say, there is no GC, and there are in fact tombstones. Once an element is added it will always take up space in the datastructure.
Also, "doomstones" allowed (you can remove
{a, 100000}
whena
is not present, and no add ofa
less than100000
will work.)