gpt4 book ai didi

erlang - 将 Riak CRDT 与 bitcask 后端结合使用

转载 作者:行者123 更新时间:2023-12-02 09:23:30 27 4
gpt4 key购买 nike

我在配置 CRDT 存储桶类型和使用 bitcask 后端时遇到问题。我希望能够使用设置类型并保留 bitcask 过期的功能。

如果不指定后端,我可以创建和使用存储桶类型

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

但是如果我尝试在 props 中指定后端,每当我尝试使用该类型时,riak 似乎就会崩溃并且失去连接。

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

这是我尝试使用存储桶类型时 error.log 中的唯一日志。如果有帮助的话,我还尝试将后端指定为 leveldb 和内存以及 bitcask,但没有成功。

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

我正在使用 Riak v2.0.7 LTS

最佳答案

当 Riak 找不到您在配置中为该存储桶类型定义的后端名称时,就会发生错误。当使用多个后端时,创建存储桶类型时需要使用配置中定义的名称。

假设使用 riak documentation 中的示例配置:


存储后端=多
multi_backend.bitcask_mult.storage_backend = bitcask

要为 bitcask 创建存储桶,您应该使用 bitcask_mult 作为后端名称:


sudo riak-admin 存储桶类型创建 set2 '{"props":{"datatype":"set","backend":"bitcask_mult"}}'

希望有帮助

关于erlang - 将 Riak CRDT 与 bitcask 后端结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40021554/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com