When running my application including ra, crash by case_clause happened.
I'm not sure this is because of ra bug or the ra usage of my application is wrong 😅
Crash report is as follows. (I replaced application name by <myapp>.)
=CRASH REPORT==== 22-Sep-2022::09:21:30.958181 UTC ===
crasher:
initial call: ra_server_proc:init/1
pid: <0.1338.0>
registered_name: <myapp>_ra_callback
exception exit: {'EXIT',
{{case_clause,undefined},
[{ra_server,make_rpc_effect,4,
[{file,
"/<myapp>/_build/default/lib/ra/src/ra_server.erl"},
{line,1677}]},
{ra_server,'-make_pipelined_rpc_effects/3-fun-0-',
8,
[{file,
"/<myapp>/_build/default/lib/ra/src/ra_server.erl"},
{line,1633}]},
{maps,fold_1,3,[{file,"maps.erl"},{line,411}]},
{ra_server,handle_leader,2,
[{file,
"/<myapp>/_build/default/lib/ra/src/ra_server.erl"},
{line,388}]},
{ra_server_proc,handle_leader,2,
[{file,
"/<myapp>/_build/default/lib/ra/src/ra_server_proc.erl"},
{line,1003}]},
{ra_server_proc,leader,3,
[{file,
"/<myapp>/_build/default/lib/ra/src/ra_server_proc.erl"},
{line,467}]},
{gen_statem,loop_state_callback,11,
[{file,"gen_statem.erl"},{line,1419}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,240}]}]}}
in function ra_server_proc:handle_leader/2 (/<myapp>/_build/default/lib/ra/src/ra_server_proc.erl, line 1010)
in call from ra_server_proc:leader/3 (/<myapp>/_build/default/lib/ra/src/ra_server_proc.erl, line 467)
in call from gen_statem:loop_state_callback/11 (gen_statem.erl, line 1419)
I tried to reproduce the case but failed. It happened only once so far.
Some source code reading...
As I said before, there can be a mistake on my application side.
So, if missing clause is by design (e.g. some pre-condition of the function), please close this issue.
First of all, big thanks to ra team for creating the great library!
When running my application including ra, crash by case_clause happened.
I'm not sure this is because of ra bug or the ra usage of my application is wrong 😅
Crash report is as follows. (I replaced application name by
<myapp>.)I tried to reproduce the case but failed. It happened only once so far.
Some source code reading...
undefinedclause.says it can return
undefined.As I said before, there can be a mistake on my application side.
So, if missing clause is by design (e.g. some pre-condition of the function), please close this issue.
Thanks again!