Creating a new object immediately after deleting one with the same key

Sargun Dhillon sargun at sargun.me
Thu Oct 9 04:35:32 EDT 2014


Distributed deletion, and garbage collection is a really hard problem.
Riak has a couple different ways to do it talked about here:
http://docs.basho.com/riak/latest/ops/advanced/deletion/

The default mechanism tombstones the key, and then waits 3 seconds
after the write has reached stable state (on all the primary vnodes of
the preflist), and then blows it away. Although, this is configurable,
it's probably not what you want to change. You should pass the
deletedvclock=true, when doing the get, and then pass back the vclock
on write. There is more information in the linked doc.

On Thu, Oct 9, 2014 at 1:23 AM,  <tilo at fastmail.fm> wrote:
> Hi all,
>
> While testing a simple go / protobuf driver I encountered following
> behaviour:
> After deleting an object and creating a new one with the same key
> immediately afterwards Riak creates a sibling of the new object. Trying to
> fetch an object with the key directly before creating the new one fails.
>
> If the timespan between delete and create is greater than ~3 seconds
> everything works as expected.
>
> Is this behaviour documented somewhere? Does the required minimal timespan
> depend on the cluster setup or is it configurable?
> I'm currently using Riak v2.0.0 on OS X locally, allow_mult is set to true.
>
> Best regards,
> Tilo Soenke
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>




More information about the riak-users mailing list