<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I have made a PR for this:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/uwiger/gproc/pull/108" class="">https://github.com/uwiger/gproc/pull/108</a></div><div class=""><br class=""></div><div class="">I’m not 100% happy with it, nor does it have a test case for the previously failing case.</div><div class="">However, the original test suite passes, and the manual test you describe also works for me (and didn’t before).</div><div class=""><br class=""></div><div class="">BR,</div><div class="">Ulf W</div><br class=""><div><blockquote type="cite" class=""><div class="">On 15 Mar 2016, at 02:31, Khitai Pang <<a href="mailto:khitai.pang@outlook.com" class="">khitai.pang@outlook.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: 新細明體; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I have been trying to use gproc with<span class="Apple-converted-space"> </span><a href="https://github.com/garret-smith/gen_leader_revival" class="">https://github.com/garret-smith/gen_leader_revival</a>.  I found that registering a name which is already registered will destroy the existing registration of the name, and a remote node is unaware of this.  See the following steps:<br class=""><br class=""><br class="">Register node1 shell as global name 'abcde' on node1, the name is visable on node2 and sending messages from node2 shell to 'abcde' works fine:<br class=""><br class=""><tt class="">(node1)1> gproc:reg({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class="">true</tt><tt class=""><br class=""></tt><tt class="">(node1)2> gproc:where({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class=""><0.229.0></tt><tt class=""><br class=""></tt><tt class=""><br class=""></tt><tt class="">(node2)1> gproc:where({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class=""><8049.229.0></tt><tt class=""><br class=""></tt><tt class="">(node2)2> gproc:send({n, g, abcde}, hello).</tt><tt class=""><br class=""></tt><tt class="">hello</tt><tt class=""><br class=""></tt><tt class=""><br class=""></tt><tt class="">(node1)3> flush().</tt><tt class=""><br class=""></tt><tt class="">Shell got hello</tt><tt class=""><br class=""></tt><tt class="">ok</tt><tt class=""><br class=""></tt><br class=""><br class="">Now on node1 shell register with the name again, it removes the existing registration:<br class=""><br class=""><tt class="">(node1)4> gproc:reg({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class="">** exception error: bad argument</tt><tt class=""><br class=""></tt><tt class="">     in function  gproc:reg/1</tt><tt class=""><br class=""></tt><tt class="">        called as gproc:reg({n,g,abcde})</tt><tt class=""><br class=""></tt><tt class="">(node1)5> gproc:where({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class="">undefined</tt><br class=""><br class=""><br class="">But on node2 the shell still gets <8049.229.0>:<br class=""><br class=""><tt class="">(node2)3> gproc:where({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class=""><8049.229.0></tt><br class=""><br class=""><br class="">And sending message from node2 shell to 'abcde' still works 'fine', but the node1 shell doesn't get any message:<br class=""><tt class=""><br class=""></tt><tt class="">(node2)4> gproc:send({n, g, abcde}, hello).</tt><tt class=""><br class=""></tt><tt class="">hello</tt><tt class=""><br class=""></tt><tt class=""><br class=""></tt><tt class="">(node1)6> flush().</tt><tt class=""><br class=""></tt><tt class="">ok</tt><tt class=""><br class=""></tt><br class=""><br class="">Now if I register node1 shell as {n, g, abcde} again, everything works fine again:<br class=""><br class=""><tt class="">(node1)7> gproc:reg({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class="">true</tt><tt class=""><br class=""></tt><tt class=""><br class=""></tt><tt class="">(node2)5> gproc:where({n, g, abcde}).</tt><tt class=""><br class=""></tt><tt class=""><8049.268.0></tt><tt class=""><br class=""></tt><tt class="">(node2)6> gproc:send({n, g, abcde}, hello).</tt><tt class=""><br class=""></tt><tt class="">hello</tt><tt class=""><br class=""></tt><tt class=""><br class=""></tt><tt class="">(node1) 8> flush().</tt><tt class=""><br class=""></tt><tt class="">Shell got hello</tt><tt class=""><br class=""></tt><tt class="">ok</tt><br class=""><br class=""><br class="">This doesn't look right to me.<br class="">1) When registering with a name already registered, why doesn't gproc return something like {error, already_registered}?<br class="">2) After the registration is removed, why does a remove node still sees the non-existent registration?<br class=""><br class=""><br class="">Thanks<br class="">Khitai<span class="Apple-converted-space"> </span></div></div></blockquote></div><br class=""></body></html>