On Thu, Jan 3, 2013 at 9:00 AM, <riak-users-requ...@lists.basho.com> wrote:

> From: qaspar <snoope...@gmail.com>
>
> Hi,
>
> Can someone confirm this? If it's true, what exactly is the purpose of
> offering the if_not_modified flag?
>
> Kaspar
>
The consistency guarantees of if_not_modified  depend on the default R
value configured on the bucket properties.  INM request perform an internal
from the node coordinating the request get to retrieve the object to get
its vclock to compare to the incoming object.  The get uses the R value
that is the default for the bucket.  The default value of R for a bucket is
"quorum", although the default for PR is 0.  Thus, by default INM strongly
guarantees no stale writes, but only if no primary replica nodes have
failed or have become partitioned.  This also assumes that you are using at
least an W of "quorum", and ideally a PR of the same.  If you change the
default bucket PR to "quorum", then it guarantee this also when primary
nodes fail or there is a partition, but it does this at the expense of
availability.

The INM only guarantees no stale writes, and only does so when R, PR, W,
and WR are such to to guarantee strong consistency.  It does not guard
against concurrent writes.  Multiple writers can succeed even when using
INM if they write at the same time.

If you have allow_mult set to true in the bucket, that means the client
must handle sibling resolution.  If allow_mult is set to false and
last_write_wins is set to true, concurrent writes will succeed, but the
value with the latest timestamp will win.  If last_write_wins is set to
false while allow_multi is also false, Riak will keep siblings internally,
but use vector clocks to resolve the siblings, and if that fails, fall back
on timestamp, to only return a single value.
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to