basho / basho_bench

A load-generation and testing tool for basically whatever you can write a returning Erlang function for.
Apache License 2.0
311 stars 197 forks source link

Riak Delete-Create Operation #165

Open jburwell opened 9 years ago

jburwell commented 9 years ago

Adds an operation to the Riak driver that puts a key, deletes it (and ensures that it has been removed from disk), and then puts the key again. It requires that all nodes in the Riak cluster are configured with delete mode immediate.

This PR is not yet ready to be merged. I am opening it to get initial feedback from @jonmeredith and will further refine.

slfritchie commented 9 years ago

If the key already exists, the last clause of maybe_put is going to create a sibling because it's a fresh put. (Assuming allow_mult=true) The delete tombstone from the delete would create another sibling, and the immediate delete that you're hoping for won't happen. When siblings are possible, your best bet is to get the vclock of the existing key and use it for riakc_pb_socket:delete_vclock() ... and if the key doesn't exist, then skip forward to the last step put.

If allow_mult=false and lww=true, then you ought to get what you're expecting.

slfritchie commented 9 years ago

ping?

slfritchie commented 9 years ago

Monthly ping?

slfritchie commented 9 years ago

ping?

slfritchie commented 8 years ago

@JeetKunDoug Would you mind having one of your KV folks take a peek at this PR and decide if it's still relevant?