basho/riak_dt — pull request #102 by russelldb (2014-08-03 20:02:52+00:00)
Title: Add LWW-Element-Set with Add-Wins semantic for equal timestamp

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 time `1` then the `a` you saw must have been added at some time `<1`. Therefore an add of `a` at `1` is not the same `a` 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}` when `a` is not present, and no add of `a` less than `100000` will work.)