Hi Valter, Could you provide the code you are using to generate the concurrent requests in addition to the output of `riak-admin bucket-type list` and `riak-admin bucket-type status <buckettype>` where <buckettype> is the name of the strongly consistent bucket you created (from one node should be sufficient)? I've been using this feature in a personal project and just tested on a local cluster using curl and was unable to reproduce (the cluster was a bit behind develop but there have been no recent changes to the feature).
Cheers, Jordan On Wed, Nov 20, 2013 at 5:30 AM, Valter Balegas <[email protected]> wrote: > Hello, > > I was able to activate strong consistency, but the node keeps generating > siblings, when i execute two concurrent writes (Store two objects without > vector clock). > I tried with the Riak 2.0.0.5pre package and the latest version on the > repository. Am i missing anything? i was expecting operations to fail, in > this case. > > It seems that the error was caused by my Erlang version. The creation of > the bucket type didn’t fail with R16B02. > > Valter > > No dia 20/11/2013, às 03:13, Jordan West <[email protected]> escreveu: > > Valter, > > You mentioned you are using a recent develop. Would you be able to pull > down any recent changes and update-deps (or build a fresh devrel)? I just > tried a fresh clone of develop and was unable to reproduce the same error. > I, also, tried with R15B01 (Riak 2.0 is slated to use R16B02 right now). > > Alternatively, you should be able to workaround this by doing a `riak > attach-direct` and defining the atom at the erlang shell: > > 1> consistent. > consistent > > Jordan > > > On Tue, Nov 19, 2013 at 3:06 PM, Valter Balegas <[email protected]> wrote: > >> I can’t create the bucket type: >> >> RPC to '[email protected]' failed: {'EXIT', >> {badarg, >> [{erlang,list_to_existing_atom, >> ["consistent"], >> []}, >> {riak_kv_wm_utils,erlify_bucket_prop,1, >> [{file,"src/riak_kv_wm_utils.erl"}, >> {line,393}]}, >> {riak_kv_console, >> '-bucket_type_create/2-lc$^0/1-0-',1, >> [{file,"src/riak_kv_console.erl"}, >> {line,483}]}, >> {riak_kv_console,bucket_type_create,2, >> [{file,"src/riak_kv_console.erl"}, >> {line,483}]}, >> {rpc,'-handle_call_call/6-fun-0-',5, >> [{file,"rpc.erl"},{line,203}]}]}} >> >> I activated the consensus in riak.conf in the etc dir (find command seems >> not to find the pattern anywhere else). >> Is there any other way to create the bucket? >> >> Valter >> >> No dia 19/11/2013, às 18:10, Jordan West <[email protected]> escreveu: >> >> On Tue, Nov 19, 2013 at 7:33 AM, Valter Balegas <[email protected]>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 >>> [email protected] >>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >>> >> >> >> > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
