aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_controller.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-10-24 13:05:52 +0200
committerDan Gudmundsson <[email protected]>2016-10-24 13:05:52 +0200
commit1a812284999c8f38d84f380775b88f7bdc1f1432 (patch)
treed94aac6989e1d3c40563327f8dabc9122d71d51d /lib/mnesia/src/mnesia_controller.erl
parentadf1e9efdfb979d55b2f4dfec7188dd8f0a640c9 (diff)
parent16b6c991cc841ced6be466eca774dba1188f8640 (diff)
downloadotp-1a812284999c8f38d84f380775b88f7bdc1f1432.tar.gz
otp-1a812284999c8f38d84f380775b88f7bdc1f1432.tar.bz2
otp-1a812284999c8f38d84f380775b88f7bdc1f1432.zip
Merge branch 'maint'
* maint: Fix whitespace setting in test files Avoid some error reports when stopping mnesia wx: Improve error handling Fix all whitespace-related issues in erlang.el mnesia: Fix double blocked tables which could cause a crash wx: Add wxWindow:getContentScaleFactor
Diffstat (limited to 'lib/mnesia/src/mnesia_controller.erl')
-rw-r--r--lib/mnesia/src/mnesia_controller.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl
index 4791e2e290..17b47c059e 100644
--- a/lib/mnesia/src/mnesia_controller.erl
+++ b/lib/mnesia/src/mnesia_controller.erl
@@ -1703,9 +1703,10 @@ add_active_replica(Tab, Node, Cs = #cstruct{}) ->
block_table(Tab) ->
Var = {Tab, where_to_commit},
- Old = val(Var),
- New = {blocked, Old},
- set(Var, New). % where_to_commit
+ case is_tab_blocked(val(Var)) of
+ {true, _} -> ok;
+ {false, W2C} -> set(Var, mark_blocked_tab(true, W2C))
+ end.
unblock_table(Tab) ->
call({unblock_table, Tab}).