Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riak Delete-Create Operation #165

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Riak Delete-Create Operation #165

wants to merge 5 commits into from

Conversation

jburwell
Copy link

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.

@jburwell jburwell changed the title Riak Delete-create Operation Riak Delete-Create Operation Jan 26, 2015
@slfritchie
Copy link
Contributor

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
Copy link
Contributor

ping?

@slfritchie
Copy link
Contributor

Monthly ping?

@slfritchie
Copy link
Contributor

ping?

@slfritchie
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants