Conflict Resolution

Misha Gorodnitzky misaka at pobox.com
Wed Jul 14 05:25:57 EDT 2010


Hi Justin,

On 13 July 2010 18:20, Justin Sheehy <justin at basho.com> wrote:
>
> On Tue, Jul 13, 2010 at 1:06 PM, Misha Gorodnitzky <misaka at pobox.com> wrote:
>
>> From doing a little testing, the last value in a multipart document is
>> the first, so "Thursday" in this case, can we assume that this will
>> always be the case? And is it a good idea to base conflict resolution
>> on this?
>
> It is not really a good idea to base conflict resolution on the order
> that Riak presents the siblings.  While in simple cases you may see
> predictable behavior, there is no guarantee of determinism in the
> order they'll be stored in.

Fair enough. I figured this might be too good to be true. :)

> I suggest instead that if you need an interesting conflict resolution
> strategy, you might do well to store the information needed for that
> strategy explicitly in the object along with the content.

I don't suppose there are any examples anywhere of how people have
approached conflict resolution with RIak? That would be useful to help
people understand how to approach it ... maybe a section on the wiki
could be dedicated to it.

In our particular case, we're trying to store transactions in Riak and
need to guard against a transaction being placed on a balance that has
reached 0. The problem we keep running into is race conditions between
when we record the transaction and when we update the cached balance
value. Any suggestions on how this has been, or can, be solved would
be appreciated.


--Misha




More information about the riak-users mailing list