<div dir="ltr"><div>Was looking through the Erlang/OTP source yesterday and found</div><div>net_adm:ping_list/1 which isn't documented but has a really scary comment:</div><div><br></div><div><a href="https://github.com/erlang/otp/blob/maint/lib/kernel/src/net_adm.erl#L117-L132">https://github.com/erlang/otp/blob/maint/lib/kernel/src/net_adm.erl#L117-L132</a></div>
<div><br></div><div>%% A common situation in "life" is to have a configuration file with a list</div><div>%% of nodes, and then at startup, all nodes in the list are ping'ed</div><div>%% this can lead to no end of troubles if two disconnected nodes</div>
<div>%% simultaneously ping each other.</div><div>%% Use this function in order to do it safely.</div><div>%% It assumes a working global.erl which ensures a fully</div><div>%% connected network.</div><div>%% Had the erlang runtime system been able to fully cope with</div>
<div>%% the possibility of two simultaneous (unix) connects, this function would</div><div>%% merley be lists:map({net_adm, ping}, [], Nodelist).</div><div>%% It is also assumed, that the same (identical) Nodelist is given to all</div>
<div>%% nodes which are to perform this call (possibly simultaneously).</div><div>%% Even this code has a flaw, and that is the case where two</div><div>%% nodes simultaneously and without *any* other already</div><div>%% running nodes execute this code. :-(</div>
<div><br></div><div>It's been in there since at least R13B03 when Erlang moved to git.</div><div><br></div><div>Can someone enlighten me if I should take that warning seriously?</div><div><br>Kind regards,<br>Martin Schuerrer</div>
</div>