basho / riak-erlang-client

The Riak client for Erlang.
Apache License 2.0
311 stars 188 forks source link

Test deletion of object version (i.e. vclock) corresponding to CRDT version (i.e. context) #335

Open lucafavatella opened 7 years ago

lucafavatella commented 7 years ago

Replaces #317. Depends on https://github.com/basho/riak-client-tools/pull/21 (merged).

Please refer to commit message for background and next steps.

lucafavatella commented 7 years ago

Updated this PR following merge of https://github.com/basho/riak-client-tools/pull/21 - tests running now.

lukebakken commented 7 years ago

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?

lucafavatella commented 7 years ago

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.

lukebakken commented 7 years ago

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.

lucafavatella commented 7 years ago

@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).

lucafavatella commented 7 years ago

@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.


This PR starts from the assumption that riakc_pb_socket:delete_vclock prevents deleting unseen updates on an object. E.g. for a key:

The tests in this PR aim at preventing deleting unseen updates on a data type e.g. set. E.g. for a key:

lukebakken commented 7 years ago

Yes, basho/riak_kv#1360 has an eventual goal of dealing with the situation you describe. @russelldb - do you have any comments?