2
votes

I am having trouble configuring CRDT bucket types and using bitcask backend. I want to be able to use a set type and keep the functionality of bitcask's expiry.

I am able to create and use bucket types if I do not specify a backend

sudo riak-admin bucket-type create sets '{"props":{"datatype":"set"}}'

But if I try to specify a backend in the props, whenever I try to use the type then riak seems to fall apart and I lose connection.

sudo riak-admin bucket-type create sets2 '{"props":{"datatype":"set","backend":"bitcask"}}'

Here are the only logs in error.log at the time I try to use the bucket type. If it helps I have also tried specifying the backend to be leveldb and memory as well as bitcask with no luck.

2016-10-13 13:41:25.965 [error] <0.8870.0> gen_fsm <0.8870.0> in state active terminated with reason: no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 2016-10-13 13:41:25.965 [error] <0.8870.0> CRASH REPORT Process <0.8870.0> with 1 neighbours exited with reason: no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 in gen_fsm:terminate/7 line 622 2016-10-13 13:41:25.965 [error] <0.168.0> Supervisor riak_core_vnode_sup had child undefined started with {riak_core_vnode,start_link,undefined} at <0.8870.0> exit with reason no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 in context child_terminated 2016-10-13 13:41:25.965 [error] <0.8896.0> gen_fsm <0.8896.0> in state ready terminated with reason: no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 2016-10-13 13:41:25.965 [error] <0.8896.0> CRASH REPORT Process <0.8896.0> with 10 neighbours exited with reason: no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 in gen_fsm:terminate/7 line 622 2016-10-13 13:41:25.966 [error] <0.8897.0> Supervisor {<0.8897.0>,poolboy_sup} had child riak_core_vnode_worker started with riak_core_vnode_worker:start_link([{worker_module,riak_core_vnode_worker},{worker_args,[1370157784997721485815954530671515330927436759040,...]},...]) at undefined exit with reason no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 in context shutdown_error 2016-10-13 13:41:25.966 [error] <0.8897.0> gen_server <0.8897.0> terminated with reason: no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 2016-10-13 13:41:25.966 [error] <0.8897.0> CRASH REPORT Process <0.8897.0> with 0 neighbours exited with reason: no case clause matching {riak_kv_multi_backend,undefined_backend,<<"bitcask">>} in riak_core_vnode:vnode_command/3 line 346 in gen_server:terminate/6 line 744

I am using Riak v2.0.7 LTS

1
Hi Aaron - It appears you have Riak configured to use the "multi" backend. Did you intend to use "multi"? Here are the backend docs: docs.basho.com/riak/kv/2.1.4/setup/planning/backendLuke Bakken
Hi Luke - yes this is correct. I am trying to have different expiry times on different buckets. And it is my understanding that I need to use multi backend to achieve this.Aaron

1 Answers

5
votes

The error happens when Riak can't find the name of the backend you defined for that bucket type in the configurations. When using multiple backends, you need to use the names defined in the configurations when creating bucket types.

So let's say using the example config from the riak documentation:

storage_backend = multi multi_backend.bitcask_mult.storage_backend = bitcask

To create your bucket for bitcask you should use bitcask_mult as the backend name:

sudo riak-admin bucket-type create sets2 '{"props":{"datatype":"set","backend":"bitcask_mult"}}'

Hope that helps