basho/riak_dt — pull request #78 by asonge (2014-02-18 20:37:26+00:00)
Title: orswot doesn't remove deleted entries on merge

The `riak_dt_orswot` CRDT keeps deleted entries after they've been removed if the clocks haven't been incremented by an add operation. Example test case:

```
{ok, A1} = riak_dt_orswot:update({add, <<"foo">>}, 1, riak_dt_orswot:new()),
{ok, A2} = riak_dt_orswot:update({add, <<"bar">>}, 1, A1),
{ok, B1} = riak_dt_orswot:update({add, <<"baz">>}, 2, riak_dt_orswot:new()),
C = riak_dt_orswot:merge(A2, B1),
{ok, A3} = riak_dt_orswot:update({remove, <<"bar">>}, 1, A2),
D = riak_dt_orswot:merge(A3, C),
% Actual return value is [<<"bar">>,<<"baz">>,<<"quux">>]
[<<"baz">>,<<"foo">>] == riak_dt_orswot:value(D).
```