Quickly deleting + recreating item in Riak deletes new item

Seth Bunce seth.bunce at gmail.com
Sun Jul 14 17:25:02 EDT 2013


I had a similar problem. I mitigated the problem by appending a
current timestamp (in nanoseconds) to the keys I'm using in my tests.
This way I don't have to worry about waiting for Riak to reap
tombstones after 3 seconds and I don't have to use
delete_mode=immediate. I still do a list keys + delete before each
test.

I still have one flakey test where new keys disappear randomly. In the
test I do: get (to check if key exists), put (if key doesn't exist),
repeat. Sometimes this fails to find the key I just put. This is with
default bucket options, and no w/pw/r/pr specified, using a single
connection to one node in a 5 node Riak 1.3.1 cluster. I don't know
what's going on here.

On Sun, Jul 14, 2013 at 9:28 AM, Matthew Dawson <matthew at mjdsystems.ca> wrote:
> Hello,
>
> I've been playing around with Riak for a new app I'm building.  I'm currently
> playing around with my own mini-cluster along with my test suite for the app.
> The Riak cluster is a four node cluster running across a laptop and a desktop
> (so two nodes per physical machine).  I'm also running with the default
> setting for delete_mode, but I've tried both keep or immediate without any
> change for my problem.
>
> In my test suite, at the end of every test I delete all the keys inside my
> Riak cluster (manually by listing keys then deleting them one by one).  Also,
> some of my items share the same key name for testing.  Usually this works just
> fine, and my tests all pass.
>
> However, occasionally one of my newly created items disappears from the test
> clusters, and my test errors out complaining the object could not be found.
> This seems to happen especially often if a node has been stopped and started.
>
> I'm pretty sure the system is successfully creating the item, so I'm wondering
> if this is expected behaviour from Riak, and if there some way for me to work
> around this.
>
>
> Also, on another note I'm seeing read latencies from Riak of around 10-20ms
> per key.  Is this typical?  My write speeds seem to be significantly less then
> that.
> --
> Matthew
> _______________________________________________
> 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