Playing with / understanding Riak configurations

Tom Santero tsantero at
Wed Jul 27 18:27:55 EDT 2016


I apologize, I initially just skimmed your question and thought you were
asking something entirely different.

While increasing your N value is safe, decreasing it on a bucket with
pre-existing data, as you have, is not-recommended and the source of your
inconsistent results.


On Wed, Jul 27, 2016 at 4:18 PM, Vikram Lalit <vikramlalit at> wrote:

> Thanks Tom... Yes I did read that but I couldn't deduce the outcome if n
> is decreased. John talks about data loss, but am actually observing a
> different result... perhaps am missing something!
> On Wed, Jul 27, 2016 at 6:11 PM, Tom Santero <tsantero at> wrote:
>> Vikram,
>> John Daily wrote a fantastic blog series that places your question in
>> context and then answers it.
>> Tom
>> On Wed, Jul 27, 2016 at 4:07 PM, Vikram Lalit <vikramlalit at>
>> wrote:
>>> Hi - I have a Riak node with n_val=3, r=2, w=2 and have just one
>>> key-object stored there-in. I'm trying to test various configurations to
>>> better understand the system and have the following observations - some
>>> dont seem to align with my understanding so far, so appreciate if someone
>>> can throw some light please... Thanks!
>>> 1. n=3, r=2, w=2: Base state, 1 key-value pair.
>>> 2. Change to n=2, r=2, w=2: When I query from my client, I randomly see
>>> 1 or 2 values being fetched. In fact, the number of keys fetched is 1 or 2,
>>> randomly changing each time the client queries the db. Ideally, I would
>>> have expected that if we reduce the n_val, there would be data loss from
>>> one of the vnodes. And that for this scenario, I would still expect only 1
>>> (remaining) key-value pair to be read from the remaining two vnodes that
>>> has the data. Note that I dont intend to make such a change in production
>>> as cognizant of the recommendation to never decrease the value of n, but
>>> have done so only to test out the details.
>>> 3. Then change to n=2, r=1, w=1: I get the same alternating result as
>>> above, i.e. 1 or 2 values being fetched.
>>> 4. Then change to n=1, r=1, w=1: I get 3 key-value pairs, all identical,
>>> from the database. Again, are these all siblings?
>>> _______________________________________________
>>> riak-users mailing list
>>> riak-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list