uwiger / gproc

Extended process registry for Erlang
Apache License 2.0
1.07k stars 232 forks source link

Uw rewrite sync #150

Closed uwiger closed 7 years ago

uwiger commented 7 years ago
Rewrite gproc_dist:sync() to hopefully be more robust

The old version used gen_leader:leader_call(), which doesn't do well
if the leader dies, or similar things happen. The new solution calls
the local gproc_dist, which remembers the request and casts to the
leader (assuming it's not itself the leader). The leader performs
the sync as before, then casts to the intitial node that the sync
is complete. If a new leader is elected, the other nodes check
pending sync requests and re-initiate them.

Timeouts, which were recently increased, returned to their previous
values.
uwiger commented 7 years ago

This may help issue #145

uwiger commented 7 years ago

I've restarted the test build five times (10 separate test runs each time, making for a total of 70 test runs), without a single error. This seems promising.