Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peer crashing if sink disabled #9

Open
martinsumner opened this issue Sep 19, 2023 · 1 comment
Open

Peer crashing if sink disabled #9

martinsumner opened this issue Sep 19, 2023 · 1 comment

Comments

@martinsumner
Copy link

When a riak_kv_replrtq_snk is disabled, but riak_kv_replrtq_peer is not, then the peer will crash when it receives undefined in response to riak_kv_replrtq_snk:current_peers/1

2023-09-18 13:54:16 =CRASH REPORT====
  crasher:
    initial call: riak_kv_replrtq_peer:init/1
    pid: <0.29834.163>
    registered_name: riak_kv_replrtq_peer
    exception error: {function_clause,[{lists,map,[#Fun<riak_kv_replrtq_peer.2.59601804>,undefined],[{file,"lists.erl"},{line,1238}]},{riak_kv_replrtq_peer,do_discovery,3,[{file,"/home/ubuntu/nhs-riak/rel/pkg/out/riak-3.0.17-nhse-OTP22.3/_build/default/lib/riak_kv/src/riak_kv_replrtq_peer.erl"},{line,195}]},{riak_kv_replrtq_peer,handle_cast,2,[{file,"/home/ubuntu/nhs-riak/rel/pkg/out/riak-3.0.17-nhse-OTP22.3/_build/default/lib/riak_kv/src/riak_kv_replrtq_peer.erl"},{line,128}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
@martinsumner
Copy link
Author

Directly resolving this by returning an empty list has unexpected consequences. The peer may then re-add the sink queue work which could override the suspension or disabling of the snk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant