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

Crash, if some short-lived nodes connects to a cluster. #5

Open
liveforeverx opened this issue Aug 30, 2018 · 5 comments
Open

Crash, if some short-lived nodes connects to a cluster. #5

liveforeverx opened this issue Aug 30, 2018 · 5 comments

Comments

@liveforeverx
Copy link
Contributor

liveforeverx commented Aug 30, 2018

Crash, if some short-lived nodes connects to a cluster.

2018-08-30 13:38:01.847 [error] Child RaftKV.WorkflowExecutor of Supervisor #PID<0.2539.0> (Supervisor.Default) terminated
** (exit) an exception was raised:
    ** (MatchError) no match of right hand side value: {["app@ip": :ok], [:"remote_shell@ip"]}
        (raft_kv) lib/raft_kv/ets_record_manager.ex:79: RaftKV.EtsRecordManager.ensure_record_changed_in_all_relevant_nodes!/1
        (raft_kv) lib/raft_kv/workflow.ex:301: RaftKV.Workflow.execute/1
        (raft_kv) lib/raft_kv/workflow_executor.ex:22: RaftKV.WorkflowExecutor.handle_info/2
        (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
        (stdlib) gen_server.erl:711: :gen_server.handle_msg/6
        (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

Do we really need to send update to all non raft relevant nodes?

@liveforeverx
Copy link
Contributor Author

Moved from skirino/raft_fleet#6

@skirino
Copy link
Owner

skirino commented Aug 30, 2018

The “relevant nodes” here include nodes that only work as clients (i.e. nodes that don’t have replicated key-value pairs but do send queries/commands).
I mean, to send queries/commands to correct nodes, updates in ETS records are necessary.
Could you add your remote shell node as “hidden” one?

(Now I can’t investigate more as I’m on my holidays)

@liveforeverx
Copy link
Contributor Author

liveforeverx commented Sep 5, 2018

It should be fixed in distillery first for all node types: https://github.com/bitwalker/swarm/blob/master/config/config.exs#L7-L16 (how swarm handles it, because of this behaviour)

@skirino
Copy link
Owner

skirino commented Sep 7, 2018

I'm not familiar with distillery but looking at
https://github.com/bitwalker/distillery/blob/master/priv/libexec/commands/remote_console.sh
it seems that remote_console nodes start as hidden ones.
How do you start your remote shell?

@liveforeverx
Copy link
Contributor Author

@skirino Via remote_console command...

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

2 participants