Verify that the process is alive in lookup/2#83
Verify that the process is alive in lookup/2#83urmastalimaa wants to merge 1 commit intoostinelli:masterfrom
Conversation
test/syn_registry_SUITE.erl
Outdated
| ]}, | ||
| {four_nodes_registry, [shuffle], [ | ||
| four_nodes_concurrency | ||
| one_node_strict_mode, |
There was a problem hiding this comment.
this test was moved here, maybe by mistake?
test/syn_registry_SUITE.erl
Outdated
| {four_nodes_registry, [shuffle], [ | ||
| four_nodes_concurrency | ||
| one_node_strict_mode, | ||
| one_node_repeated_restart |
There was a problem hiding this comment.
if inside of this test group, we have a four nodes setup, can you please rename this with the convention of {number_of_nodes}_{test_name}? Unless this really is a one node, because I don't see a setup for 4 nodes in the test.
There was a problem hiding this comment.
My apologies, a mistake in partial staging.
Fixed https://github.com/ostinelli/syn/compare/58cb9ea1b9ab7db52d73c680c4c16ed3702c55e5..872f137c5da0fc4978e1e6fe545b33c058ca09f6
1953cfd to
4e1b194
Compare
|
I added a check to avoid a rpc, as the aliveness check is necessary for only local processes: |
Fixes a data-race between an ets read from lookup/2 and the ets write from the 'DOWN' handler of a registered process which causes intermittent failures in supervision strategies. In practice, the problem can occur quite often in tests which assert the init behaviour of gen_server's. In production, the `already_started` errors can cause a single failure to cascade and restart the parent supervisor. A similar approach is taken in [Elixir's Registry](https://github.com/elixir-lang/elixir/blob/e35ffc5a903bff3b595e323eb1ac12c4ecd515ad/lib/elixir/lib/registry.ex#L243) (also backed by ets). Fixes ostinelli#48
4e1b194 to
a3f5c66
Compare
|
Hi! When you have a chance, could you please re-review? |
Fixes a data-race between an ets read from lookup/2 and the ets write from the 'DOWN' handler of a registered process which causes intermittent failures in supervision strategies.
In practice, the problem can occur quite often in tests which assert the init behaviour of gen_server's. In production, the
already_startederrors can cause a single failure to cascade and restart the parent supervisor.A similar approach is taken in Elixir's Registry (also backed by ets)
Fixes #48