basho / riak_core

Distributed systems infrastructure used by Riak.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GSets cannot be created until other items are

Bob-The-Marauder opened this issue · comments

If you have a brand new cluster with no data whatsoever, gsets cannot be created. This can currently be worked around by creating a set first and then the gset. Example underneath where I fail multiple times to create a gset, successfully create a set and then create my gset with the exact same command that was failing earlier:-

[root@localhost ~]# riak-admin bucket-type create gsets '{"props":{"datatype":"gset"}}'
RPC to 'riak@127.0.0.1' failed: {'EXIT',
                                 {badarg,
                                  [{erlang,binary_to_existing_atom,
                                    [<<"gset">>,utf8],
                                    []},
                                   {riak_kv_wm_utils,erlify_bucket_prop,1,
                                    [{file,"src/riak_kv_wm_utils.erl"},
                                     {line,416}]},
                                   {riak_kv_console,
                                    '-bucket_type_create/2-lc$^0/1-0-',1,
                                    [{file,"src/riak_kv_console.erl"},
                                     {line,510}]},
                                   {riak_kv_console,bucket_type_create,2,
                                    [{file,"src/riak_kv_console.erl"},
                                     {line,510}]},
                                   {rpc,'-handle_call_call/6-fun-0-',5,
                                    [{file,"rpc.erl"},{line,205}]}]}}
[root@localhost ~]# riak-admin bucket-type create gsets '{"props":{"datatype":"gset"}}'
RPC to 'riak@127.0.0.1' failed: {'EXIT',
                                 {badarg,
                                  [{erlang,binary_to_existing_atom,
                                    [<<"gset">>,utf8],
                                    []},
                                   {riak_kv_wm_utils,erlify_bucket_prop,1,
                                    [{file,"src/riak_kv_wm_utils.erl"},
                                     {line,416}]},
                                   {riak_kv_console,
                                    '-bucket_type_create/2-lc$^0/1-0-',1,
                                    [{file,"src/riak_kv_console.erl"},
                                     {line,510}]},
                                   {riak_kv_console,bucket_type_create,2,
                                    [{file,"src/riak_kv_console.erl"},
                                     {line,510}]},
                                   {rpc,'-handle_call_call/6-fun-0-',5,
                                    [{file,"rpc.erl"},{line,205}]}]}}
[root@localhost ~]# riak-admin bucket-type create gsets '{"props":{"datatype":"gset"}}'
RPC to 'riak@127.0.0.1' failed: {'EXIT',
                                 {badarg,
                                  [{erlang,binary_to_existing_atom,
                                    [<<"gset">>,utf8],
                                    []},
                                   {riak_kv_wm_utils,erlify_bucket_prop,1,
                                    [{file,"src/riak_kv_wm_utils.erl"},
                                     {line,416}]},
                                   {riak_kv_console,
                                    '-bucket_type_create/2-lc$^0/1-0-',1,
                                    [{file,"src/riak_kv_console.erl"},
                                     {line,510}]},
                                   {riak_kv_console,bucket_type_create,2,
                                    [{file,"src/riak_kv_console.erl"},
                                     {line,510}]},
                                   {rpc,'-handle_call_call/6-fun-0-',5,
                                    [{file,"rpc.erl"},{line,205}]}]}}
[root@localhost ~]# riak-admin bucket-type create sets '{"props":{"datatype":"set"}}'
sets created

WARNING: After activating sets, nodes in this cluster
can no longer be downgraded to a version of Riak prior to 2.0
[root@localhost ~]# riak-admin bucket-type create gsets '{"props":{"datatype":"gset"}}'
gsets created

WARNING: After activating gsets, nodes in this cluster
can no longer be downgraded to a version of Riak prior to 2.0

The above is on CentOS 6 with a vanilla install of Riak KV 2.2.6.

@Bob-The-Marauder Did anything happen with this issue? Is it still an issue?

I assume the problem is that gset is not an existing atom until the set bucket type is created ... but I don't know why it isn't, and why creating the set type makes it one.