martinsumner / kv_index_tictactree

Provide Active-Anti-Entropy features to a virtual node in a KV store
Apache License 2.0
21 stars 7 forks source link

Fail to open empty AAE tree cache file #78

Closed aarongibbon closed 3 years ago

aarongibbon commented 4 years ago

AAE treecache file empty by corruption is not handled: https://github.com/martinsumner/kv_index_tictactree/blob/84971b2cc586b2b965e7b1d94e959fe67582cea3/src/aae_treecache.erl#L372-L380

Supervisor riak_core_sup had child riak_core_vnode_manager started with riak_core_vnode_manager:start_link() at <0.25596.125> exit with reason {{function_clause,[{riak_kv_vnode,terminate,[{{badmatch,{error,{{badmatch,{ok,<<>>}},[{aae_treecache,open_from_disk,2,[{file,"src/aae_treecache.erl"},{line,372}]},{aae_treecache,init,1,[{file,"src/aae_treecache.erl"},{line,177}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}},[{riak_kv_vnode,maybe_start_aaecontroller,2,[{file,"src/riak_kv_vnode.erl"},{line,323}]},{riak_kv_vnode,init,1,[{file,"src/riak_kv_vno..."},...]},...]},...],...},...]},...} in context child_terminated

2020-06-26 12:59:43.141 [error] <0.26091.125> CRASH REPORT Process <0.26091.125> with 15 neighbours exited with reason: no function clause matching riak_kv_vnode:terminate({{badmatch,{error,{{badmatch,{ok,<<>>}},[{aae_treecache,open_from_disk,2,[{file,"src/aae_tree..."},...]},...]}}},...}, undefined) line 2227 in gen_fsm:terminate/7 line 600

This looks to be the same issue as https://github.com/martinsumner/kv_index_tictactree/issues/74 but in a different area of the code.