best practices for testing eventual consistency?

Will Moss wmoss at bu.mp
Tue Nov 15 13:29:57 EST 2011


Hey Jesse,

You should do all of those things, more testing of a database is always
good!

To answer your specific question though, one of the easiest ways to produce
conflicts is just to create multiple new values (i.e. values with no vector
clocks). In that case, Riak can't possible resolve them automatically, so
it will return them to you as siblings on the next operation on that key.

Will


On Tue, Nov 15, 2011 at 10:23 AM, Jesse Myers <jesse at locationlabs.com>wrote:

> I'm contemplating migrating a write-intensive system from MySQL to Riak.
>
> I understand the eventual consistency model and the need to resolve
> conflicts in application code, especially if allow_mult is true. My
> concern is that I won't discover all of the conflict scenarios my
> application code needs to handle until after we're live in production.
> Are there best practices for producing conflicts in development
> environment? Is my best option to simulate a large amount of load and
> see what happens? Should I lower my R or W values? Kill off nodes
> randomly?
>
> Related question: I'd like to write unit tests for conflict scenarios
> I anticipate/encounter. Do any of the client libraries come with good
> mock support or is that something I need to roll myself?
>
> Thanks,
>
> Jesse
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111115/5d062334/attachment.html>


More information about the riak-users mailing list