Optimistic concurrency in Riak

Jeremiah Peschka jeremiah.peschka at gmail.com
Wed Mar 21 15:56:11 EDT 2012

You can still get siblings/conflicts even with if_not_modified/If-None-Match because two conflict writes can arrive at the exact same time. It's probably a pretty rare event, but it's worth being aware of because if could cause unexpected things to happen in your application if you aren't aware of the potential.

Combining if_not_modified with PW/PR you could potentially simulate a reasonable approximation of optimistic concurrency control, but you still won't get the serializability enforcement that you would get out of something like serializable snapshot isolation.

A better question is: What are you trying to accomplish?

Perhaps once we know the overall goal we can tell if you Riak can do what you want.
Jeremiah Peschka - Managing Director, Brent Ozar PLF, LLC
Microsoft SQL Server MVP

On Mar 21, 2012, at 12:15 PM, Ransom Richardson wrote:

> Does riak support optimistic concurrency? This KB article seems to indicate not: https://help.basho.com/entries/321522-can-riak-be-configured-to-fail-an-update-instead-of-generating-a-conflict
> But if it doesn't, what is the meaning of the if_not_modified field in the PBC Store Object: http://wiki.basho.com/PBC-Store-Object.html?
> If strict quorum is used (as described here: http://lists.basho.com/pipermail/riak-users_lists.basho.com/2012-January/007157.html) will that allow optimistic concurrency to be implemented (once the bugs mentioned in the message are fixed)? Is there any update on those bugs?
> thanks,
> Ransom
> _______________________________________________
> 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