我设置了一个由riak,riak-cs和stanchion组成的系统到服务器中,我使用s3tool将put对象放入riak,但是当我删除对象时,它通知"文件s3://桶/对象已删除& #34;,我检查尺寸 / var / lib / riak然后它没有增加。虽然,我将{delete_mode,immediate}添加到文件/etc/riak/app.config
中文件配置:
[
{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}
]}
].
任何帮助?
干杯,
Nghiep
答案 0 :(得分:0)
Riak CS也有leeway_seconds设置。目的是保留已删除对象的数据块,以允许在delete命令完成下载之前开始下载的较慢客户端。默认设置为24小时。这意味着在Riak CS中删除的对象在24小时后才有资格进行垃圾回收。在此之后,下一次GC运行将从Riak中删除数据块,并用墓碑替换它们。如果你将delete_mode设置为immediate,那么Riak墓碑将立即从后端删除。
但是,在合并操作处理包含旧值的文件之前,Bitcask后端不会释放磁盘空间。 riak-admin vnode-status
命令将显示每个Bitcask后端中每个数据文件的碎片百分比,死字节数和总大小。