On Tue, Nov 19, 2013 at 7:33 AM, Valter Balegas <bale...@gmail.com> wrote:

>
> Strong consistency:
> How does one activate this? As i understand, either the pb or the http
> clients do not accept the consistent property.
>
>
Using strong consistency in the Tech Preview is a two-step process. First,
turn on the feature in your riak.conf (the following command assumes you
are using a devrel):

for d in dev/dev*; do sed -e 's/## enable_consensus = true/enable_consensus
= true/' -i $d/etc/riak.conf; done

Then re(start) the cluster.

With the enable_consensus=true un-commented and the cluster running create
a strongly consistent bucket type:

riak-admin bucket-type create <type name> '{"props": {"consistent": true}}'
riak-admin bucket-type activate <type name>

You can create and activate the bucket type without having
enabled_consensus=true but  both must be done to work with strongly
consistent data.

Once that is done you can make requests, just like you would to eventually
consistent data in Riak, but the semantics will be different. For example,
if you make two PUT requests to the same key, w/ no vector clock*, the
second request will fail because the data already exists. More details on
semantics of strongly consistent requests can be found in this PR:
https://github.com/basho/riak_kv/pull/710

Hope that helps get you started,

Jordan

* in strong consistency, the "vector clock" is not really a vector clock.
its called such for familiarity, but like any real vector clock exposed to
the client, should be treated like an opaque context.


> Details about my environment:
> -I’m running Mac OSX 10.9
> -Erlang R15B01
> -Compiling riak “develop” branch, from basho github
> -Compiling riak-erlang-client “master” branch, from basho github.
> -recompiled the latest versions of the branches just before writing this
> email.
>
>
> Thank you for your help,
> Valter
>
>
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to