Hi Roland,

Riak deletes by first writing a tombstone and then when all replicas are in
sync removing the object from the underlying key/value store.  We have made
some changes in 1.0.0 to increase the length of time the tombstones are
around when all nodes are up (in the Delete Changes section of the release
notes here
https://github.com/basho/riak/blob/1.0/RELEASE-NOTES.org ).

If you just want to make sure the object is deleted, you could use the
deletedvclock option on the get request.  You will get a 3-tuple {error,
notfound, VClock} until the tombstone is removed, then a 2-tuple of {error,
notfound} when it has gone.

If you wish to rewrite the key, you can use the returned vclock on a new
object
  O = riakc_obj:set_vclock(riakc_obj:new(<<"b">>,<<<"k">>,<,"v">>), VClock)

and it will overwrite the tombstone for you.

Best Regards,

Jon Meredith
Basho Technologies

On Mon, Oct 3, 2011 at 6:49 AM, Roland Karlsson <
[email protected]> wrote:

> Hi Basho,
>
> I had written some simple tests using riakc client library.
>
> The tests are attached to this mail.
>
> In particular I made this call in the tests at the start of
> of each test in order to get a clean DB.
>
>    riakc_pb_socket:delete(Pid, Bucket, Key),
>
> In 0.14 that worked just fine. But ... in 1.0 it did not work.
> The tests failed and complained about siblings.
>
> But ... after some time of experimenting I found that if I
> added a sleep of 5 seconds after the delete ... then the tests
> were OK again.
>
> Is this correct? Does delete take 5 seconds?
>
> NOTE that the attached file assumes inits is started.
>
> /Roland
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to