aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_monitor.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-02-09 15:11:30 +0100
committerDan Gudmundsson <[email protected]>2016-02-09 15:11:30 +0100
commitc1f4d4a6d5c189f7cd4b3b073fb47f8dfb8d3fff (patch)
tree44dfb74c074f3719097673770f9e877a1f52899b /lib/mnesia/src/mnesia_monitor.erl
parent6233c5db89867fae35f69bd7b8ef94b32cec605d (diff)
downloadotp-c1f4d4a6d5c189f7cd4b3b073fb47f8dfb8d3fff.tar.gz
otp-c1f4d4a6d5c189f7cd4b3b073fb47f8dfb8d3fff.tar.bz2
otp-c1f4d4a6d5c189f7cd4b3b073fb47f8dfb8d3fff.zip
mnesia: let loader check if tablelock is needed
move_table_copy needs the lock that was set previously in del_table_copy. This doesn't work on old nodes, so bump protocol version and check it. Remove old protocol conversion code, which have been around since OTP-R15. Checking if lock is needed requires rpc communication via mnesia_gvar ets table to be backwards compatible.
Diffstat (limited to 'lib/mnesia/src/mnesia_monitor.erl')
-rw-r--r--lib/mnesia/src/mnesia_monitor.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/mnesia/src/mnesia_monitor.erl b/lib/mnesia/src/mnesia_monitor.erl
index 8313c3bda5..081d746257 100644
--- a/lib/mnesia/src/mnesia_monitor.erl
+++ b/lib/mnesia/src/mnesia_monitor.erl
@@ -82,9 +82,9 @@
going_down = [], tm_started = false, early_connects = [],
connecting, mq = [], remote_node_status = []}).
--define(current_protocol_version, {8,1}).
+-define(current_protocol_version, {8,2}).
--define(previous_protocol_version, {8,0}).
+-define(previous_protocol_version, {8,1}).
start() ->
gen_server:start_link({local, ?MODULE}, ?MODULE,
@@ -193,7 +193,7 @@ protocol_version() ->
%% A sorted list of acceptable protocols the
%% preferred protocols are first in the list
acceptable_protocol_versions() ->
- [protocol_version(), ?previous_protocol_version, {7,6}].
+ [protocol_version(), ?previous_protocol_version].
needs_protocol_conversion(Node) ->
case {?catch_val({protocol, Node}), protocol_version()} of
@@ -424,8 +424,6 @@ handle_call({negotiate_protocol, Mon, Version, Protocols}, From, State)
case hd(Protocols) of
?previous_protocol_version ->
accept_protocol(Mon, MyVersion, ?previous_protocol_version, From, State);
- {7,6} ->
- accept_protocol(Mon, MyVersion, {7,6}, From, State);
_ ->
verbose("Connection with ~p rejected. "
"version = ~p, protocols = ~p, "