Open lucafavatella opened 7 years ago
Updated this PR following merge of https://github.com/basho/riak-client-tools/pull/21 - tests running now.
This is related to basho/riak_kv#1360
As I'm sure you've found, there is no way to resolve a sibling tombstone if a CRDT is updated concurrently with a delete operation.
Are you running into this issue frequently in your environment?
Are you running into this issue frequently in your environment?
@lukebakken Thanks for your note - I was writing more context notes right now and you saved me some typing.
I do not experience this issue in any environment.
OK, thanks. I just added some information to basho/riak_kv#1360. Since a resolution to this issue depends on work in Riak I am going to leave this PR open.
@lukebakken Thanks I will follow that ticket then. Feel free to close this PR / change title. I had proposed this (and #317) PR more as a starting point for conversation, and I now understand that that ticket is the correct place to follow.
I became aware of this "not easy point" in the CRDT API while prototyping / designing in a project back in Sep. I now moved on to other items in the same project and may come back to this in Feb 2017 / Mar 2017 (not sure whether and when).
@lukebakken I thought more about this and I understand that basho/riak_kv#1360 is targeting a different issue than the one exposed by this PR.
basho/riak_kv#1360 aims at merging two already-in-vnode values for the same object - namely a tombstone and a CRDT e.g. after healing from a network partition.
This PR aims at exposing that Riak KV API does not allow a client to avoid deleting updates it has not seen, hence not creating tombstone in the first place.
This PR starts from the assumption that riakc_pb_socket:delete_vclock
prevents deleting unseen updates on an object. E.g. for a key:
V1
;V1
;V2
(V2
> V1
);riakc_pb_socket:delete_vclock
with vclock V1
;V1
< V2
) - that is safe.The tests in this PR aim at preventing deleting unseen updates on a data type e.g. set. E.g. for a key:
C1
;C1
;C1
, resulting to context C2
;C2
is persisted on all vnodes, no network partition;riakc_pb_socket:delete
(it cannot call delete_vclock
because it has no vclock - only CRDT context C1
);C1
, not any subsequent updates.
N=1
in map-reduce);C1
(the one based upon which it had taken the decision to delete); and:
riakc_pb_socket:delete_vclock
with retrieved vclock;C1
); orYes, basho/riak_kv#1360 has an eventual goal of dealing with the situation you describe. @russelldb - do you have any comments?
Replaces #317. Depends on https://github.com/basho/riak-client-tools/pull/21 (merged).
Please refer to commit message for background and next steps.