0

I setup one system consist of riak, riak-cs and stanchion into a server, i used s3tool for put object into riak, but when i delete object, it notification "File s3://buckets/object deleted", i check size in /var/lib/riak then it's not increase. Although, i added {delete_mode, immediate} into file /etc/riak/app.config

File configure:

[
 {riak_api, [
  {pb_backlog, 64},
    {pb, [ {"192.168.1.223", 8087 } ]}
            ]},
            {riak_core, [
            {default_bucket_props, [{allow_mult, true}]}, {ring_state_dir, "/var/lib/riak/ring"},  
              {ring_creation_size, 64},     
              {http, [ {"192.168.1.223", 8098 } ]},
              {handoff_port, 8099 },
              {dtrace_support, false},        
              {platform_bin_dir, "/usr/sbin"},
              {platform_data_dir, "/var/lib/riak"},
              {platform_etc_dir, "/etc/riak"},
              {platform_lib_dir, "/usr/lib64/riak/lib"},
              {platform_log_dir, "/var/log/riak"}
             ]},
 {riak_kv, [

         {map_js_vm_count, 0},
    {reduce_js_vm_count, 0},
    {hook_js_vm_count, 0},
                {delete_mode, immediate},  
             {add_paths, ["/usr/lib64/riak-cs/lib/riak_cs-1.5.0/ebin"]},
                {storage_backend, riak_cs_kv_multi_backend},
                {multi_backend_prefix_list, [{<<"0b:">>, be_blocks}]},
                {multi_backend_default, be_default},
                {multi_backend, [
                    {be_default, riak_kv_eleveldb_backend, [
                        {max_open_files, 50},
                        {data_root, "/var/lib/riak/leveldb"}
                    ]},
                    {be_blocks, riak_kv_bitcask_backend, [
                        {data_root, "/var/lib/riak/bitcask"}
                    ]}
                ]},    
            {anti_entropy, {on, []}},
            {anti_entropy_build_limit, {1, 3600000}}, 
            {anti_entropy_expire, 604800000},
            {anti_entropy_concurrency, 2},
            {anti_entropy_tick, 15000},      
            {anti_entropy_data_dir, "/var/lib/riak/anti_entropy"},
            {anti_entropy_leveldb_opts, [{write_buffer_size, 4194304},
                                         {max_open_files, 20}]},
            {mapred_name, "mapred"},
            {mapred_2i_pipe, true},
            {js_max_vm_mem, 8},
            {js_thread_stack, 16},
            {http_url_encoding, on},       
            {vnode_vclocks, true},
            {listkeys_backpressure, true},
            {fsm_limit, 50000}, 
            {object_format, v1}
           ]},
 {riak_search, [
                {enabled, false}
               ]},
 {merge_index, [

                {data_root, "/var/lib/riak/merge_index"},
                {buffer_rollover_size, 1048576},  
                {max_compact_segments, 20}
               ]},
 {bitcask, [   
             {io_mode, erlang},

             {data_root, "/var/lib/riak/bitcask"}
           ]},
 {eleveldb, [
             {data_root, "/var/lib/riak/leveldb"}
            ]},
 {lager, [
            {handlers, [ 
                           {lager_file_backend, [ 
                               {"/var/log/riak/error.log", error, 10485760, "$D0", 5}, 
                               {"/var/log/riak/console.log", info, 10485760, "$D0", 5} 
                           ]} 
                       ] },
            {crash_log, "/var/log/riak/crash.log"},
            {crash_log_msg_size, 65536},    
            {crash_log_size, 10485760},        
            {crash_log_date, "$D0"},
            {crash_log_count, 5},
            {error_logger_redirect, true},
            {error_logger_hwm, 100}
        ]},
 {riak_sysmon, [
         {process_limit, 30},
         {port_limit, 2},
         {gc_ms_limit, 0},
         {heap_word_limit, 40111000},
         {busy_port, true},
         {busy_dist_port, true}
        ]},
 {sasl, [
         {sasl_error_logger, false}
        ]},
 {riak_control, [
                {enabled, false},
                {auth, userlist},
                {userlist, [{"user", "pass"}
                           ]},
                {admin, true}
                ]}
].

Any help?

Cheers,
Nghiep

1 Answers1

0

Riak CS also has a leeway_seconds settings. The intent is to retain the data blocks of deleted objects to permit slower clients that started to download before the delete command to complete the downloaded. The default setting is 24 hours. This means that an object deleted in Riak CS will not be eligible for garbage collection until 24 hours have passed. After that time, the next GC run will delete the data blocks from Riak, replacing them with tombstones. If you have delete_mode set to immediate, the Riak tombstone would then be immediately deleted from the backend.

However, the Bitcask backend will not release the disk space until a merge operation processes the file containing the old value. The riak-admin vnode-status command will show you the fragmentation percentage, dead bytes, and total size for each data file in each Bitcask backend.

Joe
  • 25,000
  • 3
  • 22
  • 44