[erlang-questions] Setting compatibility mode via +R

Devangana Tarafdar devangana@REDACTED
Mon Jul 15 21:08:12 CEST 2013


Hello,

I am experimenting with the +R <release number> emulator flag as described
in the erl  man page ( http://www.erlang.org/doc/man/erl.html) and I am
confused about when I should be using this and also what happens if I do
not use this when communicating between 2 nodes from different releases.

*"  +R ReleaseNumber*

Sets the compatibility mode.

The distribution mechanism is not backwards compatible by default. This
flags sets the emulator in compatibility mode with an earlier Erlang/OTP
release ReleaseNumber. The release number must be in the range <current
release>-2..<current release>. This limits the emulator, making it possible
for it to communicate with Erlang nodes (as well as C- and Java nodes)
running that earlier release.

Note: Make sure all nodes (Erlang-, C-, and Java nodes) of a distributed
Erlang system is of the same Erlang/OTP release, or from two different
Erlang/OTP releases X and Y, where *all* Y nodes have compatibility mode X."
 This is what I am doing when setting up 2 nodes from release 13B03 and
16B. The release numbers difference is greater than 2 so I cannot use the
+R flag anyway but the nodes have no problems communicating without the
flag. I was expecting that the nodes would not be able to connect at all
but clearly I am wrong.

#startup

#first node
erl -name node_a -setcookie x
Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:4:4] [rq:4]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.4  (abort with ^G)
(node_a@REDACTED)1> erlang:system_info(otp_release).
"R13B03"

#second node
downloads/otp_src_R16B/bin/erl   -name node_b -setcookie x
Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:4:4] [async-threads:10]
[kernel-poll:false]

Eshell V5.10.1  (abort with ^G)
(node_b@REDACTED)1>  erlang:system_info(otp_release).
"R16B"


# subsequent session
(node_b@REDACTED)3> net_adm:ping('node_a@REDACTED').
pong


(node_a@REDACTED)2> nodes().
['node_b@REDACTED']
(node_a@REDACTED)5> net_kernel:disconnect('node_b@REDACTED').
true
(node_a@REDACTED)6> nodes().
[]
(node_a@REDACTED)7> net_adm:ping('node_b@REDACTED').
pong
(node_a@REDACTED)8>


Thank you for any help in interpreting this.

Devangana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130715/fc870cef/attachment.htm>


More information about the erlang-questions mailing list