basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.94k stars 536 forks source link

bucket type use issue [JIRA: RIAK-1665] #717

Open xiaoliuliu2050 opened 9 years ago

xiaoliuliu2050 commented 9 years ago

with my nodes ,i just update the riak.conf file and specify the storage_backend parameter to multi.

after that i use the command riak-admin bucket-type create memory_backend '{"props":{"backend":"memory"}}' to create a new bucket type.

then i start the link {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).

then create a new object and want to put it in the bucket which bear the bucket-type named memory_backend. Object1 = riakc_obj:new({<<"memory_backend">>, <<"my_bucket">>}, <<"user19735">>,<<"xx">>).

finally,i try to put the object to database with the command, riakc_pb_socket:put(Pid, Object1).

Unfortunately,the server just stuck there,and not return any info.

why?

JeetKunDoug commented 9 years ago

@xiaoliuliu2050 did you activate your bucket type after creating it? In order for riak to make sure the bucket type is available across the cluster, you need to first create the bucket type, and then activate. See http://docs.basho.com/riak/latest/dev/advanced/bucket-types/#Managing-Bucket-Types-Through-the-Command-Line for more information