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 manifest #75

Closed martinsumner closed 4 years ago

martinsumner commented 4 years ago

Don't crash if no CRC to check.

Avoid this:

2020-06-17 06:58:06.043 [error] <0.25934.0> CRASH REPORT Process <0.25934.0> with 1 neighbours exited with reason: no match of right hand value {ok,<<>>} in aae_keystore:open_manifest/2 line 1102 in gen_fsm:init_it/6 line 379
==> /var/log/riak/crash.log <==
2020-06-17 06:58:06 =CRASH REPORT====
  crasher:
    initial call: aae_keystore:init/1
    pid: <0.25934.0>
    registered_name: []
    exception exit: {{{badmatch,{ok,<<>>}},[{aae_keystore,open_manifest,2,[{file,"src/aae_keystore.erl"},{line,1102}]},{aae_keystore,init,1,[{file,"src/aae_keystore.erl"},{line,348}]},{gen_fsm,init_it,6,[{file,"gen_fsm.erl"},{line,361}]},{p
roc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},[{gen_fsm,init_it,6,[{file,"gen_fsm.erl"},{line,379}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
    ancestors: [<0.25933.0>,<0.25920.0>,riak_core_vnode_sup,riak_core_sup,<0.166.0>]
    messages: []
    links: [<0.25933.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 27
    reductions: 645
  neighbours:
    neighbour: [{pid,<0.25933.0>},{registered_name,[]},{initial_call,{aae_controller,init,['Argument__1']}},{current_function,{proc_lib,sync_wait,2}},{ancestors,[<0.25920.0>,riak_core_vnode_sup,riak_core_sup,<0.166.0>]},{messages,[{ack,<0.2
5934.0>,{error,{{badmatch,{ok,<<>>}},[{aae_keystore,open_manifest,2,[{file,"src/aae_keystore.erl"},{line,1102}]},{aae_keystore,init,1,[{file,"src/aae_keystore.erl"},{line,348}]},{gen_fsm,init_it,6,[{file,"gen_fsm.erl"},{line,361}]},{proc_li
b,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}]},{links,[<0.25934.0>]},{dictionary,[]},{trap_exit,false},{status,runnable},{heap_size,987},{stack_size,26},{reductions,499}]
2020-06-17 06:58:06 =ERROR REPORT====
** State machine <0.25920.0> terminating
** Last event in was timeout
** When State == started
**      Data  == {state,1061872283373234151507364761270424381468763488256,riak_kv_vnode,undefined,undefined,none,undefined,undefined,undefined,undefined,undefined,0}
** Reason for termination =
** {function_clause,[{riak_kv_vnode,terminate,[{{badmatch,{error,{{badmatch,{ok,<<>>}},[{aae_keystore,open_manifest,2,[{file,"src/aae_keystore.erl"},{line,1102}]},{aae_keystore,init,1,[{file,"src/aae_keystore.erl"},{line,348}]},{gen_fsm,ini
t_it,6,[{file,"gen_fsm.erl"},{line,361}]},{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
_vnode.erl"},{line,785}]},{riak_core_vnode,do_init,1,[{file,"src/riak_core_vnode.erl"},{line,224}]},{riak_core_vnode,started,2,[{file,"src/riak_core_vnode.erl"},{line,207}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},{proc_lib
,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},undefined],[{file,"src/riak_kv_vnode.erl"},{line,2227}]},{riak_core_vnode,terminate,3,[{file,"src/riak_core_vnode.erl"},{line,941}]},{gen_fsm,terminate,7,[{file,"gen_fsm.erl"},{line,5
97}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}