[erlang-questions] how does a DistEntry get its `creation' value?

Sverker Eriksson sverker.eriksson@REDACTED
Thu Apr 16 15:16:21 CEST 2015


On 04/15/2015 03:48 PM, Leo Liu wrote:
> Hi Sverker,
>
> On 2015-04-15 18:03 +0800, Sverker Eriksson wrote:
>> I did a quick search in the code before, and I could not find any place
>> where DistrEntry.creation for other nodes was actually used.
> Thanks for the answer.
>
> Does this mean list_to_pid("<xxx.x.x>") can not recover a remote pid
> correctly i.e. the creation info is lost?
>
>
Yes, list_to_pid can not restore the correct 'creation' value.
But the main reason for this is that the string representation "<x.y.z>"
does not contain any information about 'creation'.

The DistEntry.creation field is always set to zero for remote nodes
and is only read by list_to_pid. Creation value zero has a special meaning
of "this node instance" if the node name matches the local node.

list_to_pid is documented as a debugging feature, which means the 
priority to
"fix" this has not been very high.

/Sverker, Erlang/OTP




More information about the erlang-questions mailing list