bitwalker / swarm

Easy clustering, registration, and distribution of worker processes for Erlang/Elixir
MIT License
1.19k stars 102 forks source link

Swarm.whereis_name/1 hangs when called from blacklisted node #92

Closed arjan closed 5 years ago

arjan commented 6 years ago

When you try to call Swarm.whereis_name/1 from a node that is in the cluster but not participating in the registry, it never returns and just hangs. It seems the Tracker process keeps being stuck in the :syncing state:

*DBG* 'Elixir.Swarm.Tracker' receive call {whereis,a} from <0.1237.0> in state syncing
*DBG* 'Elixir.Swarm.Tracker' postpone call {whereis,a} from <0.1237.0> in state syncing

Why is the Tracker process started anyway on these nodes?

I have circumvented these issues now by starting a "proxy" genserver on the blacklisted nodes, and forwarding all calls it gets to a Tracker process on one of the (randomly selected) participating nodes.. but I don't know if that's the best solution.