Hi,

    I have query related to Riak storage backend change for buckets.

    In my setup I have defined different storage backends,
mainly differentiated based on r,w,dw  values.

    I created a bucket using HTTP api (it used default 'bitcask_mult'
backend).

            %% Storage_backend specifies the Erlang module defining the
storage
            %% mechanism that will be used on this node.
            {storage_backend, riak_kv_multi_backend},

            %% Adding multi backend storage related plugins
            {multi_backend_default, <<"bitcask_mult">>},
            {multi_backend, [

                %% individual backends
               {<<"bitcask_mult">>, riak_kv_bitcask_backend, [
                      %% bitcask configuration
                        {data_root, "./data/bitcask"},
                        {open_timeout, 4},
                        {sync_strategy, {seconds, 60}},
                        {max_file_size, 16#80000000},
                        {merge_window, {6, 7}},
                        {frag_merge_trigger, 60},
                        {dead_bytes_merge_trigger, 536870912},
                        {max_fold_age, -1},
                        {max_fold_puts, 0},
                        {expiry_secs, 86400}
                ]},

               {<<"bitcask_mult_l">>, riak_kv_bitcask_backend, [
                      %% bitcask configuration
                        {data_root, "./data/bitcask_l"},
                        {open_timeout, 4},
                        {n_val,3},
                        {r,1},
                        {w,1},
                        {dw,1},
                        {allow_mult,true},
                        {last_write_wins,false},
                        {sync_strategy, {seconds, 10}},
                        {max_file_size, 16#80000000},
                        {merge_window, {6, 7}},
                        {frag_merge_trigger, 60},
                        {dead_bytes_merge_trigger, 536870912},
                        {max_fold_age, -1},
                        {max_fold_puts, 0},
                        {expiry_secs, 86400}
                ]},


   So when I get bucket it shows all the default properties such as
"r":"quorum", "w":"quorum", etc ..
   I changed the storage backend for the bucket to 'bitcask_mult_l'  which
has different values for  r:1,w:1,dw:1, etc.

   After changing the backend I restarted node (all the nodes on cluster).
However, I am still getting the old quorum values ...
   so my queries are:

   1. Is there something missing in configuration?
   2. Do I have to specifically update (bucket properties with) all the
quorum and other properties of new storage backend
(manually/programatically) ?
   3. What is the proper way of configuring multiple buckets with
respective storage backends?

   Any help or pointer is highly appreciated.

Command used to change bucket backend:

> curl -X PUT -H "Content-Type: application/json" \
> -d '{"props":{"backend":"bitcask_mult_l"}}' \
> http://localhost:8098/riak/test

Result show old/stale quorum related properties:

 >  curl http://192.168.21.201:8098/riak/test
{"props":{"allow_mult":false,"backend":"bitcask_mult_l"
,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},
"dw":"quorum"
,"last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"test","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[],"pw":0,
"r":"quorum","rw":"quorum","search":false,"small_vclock":50,"w":"quorum"
,"young_vclock":20}}
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to