Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: erlang/otp
base: maint
head fork: spawnthink/otp
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on May 02, 2013
@spawnthink spawnthink Fix crash in mnesia_controller due to a function_clause exception fro…
…m is_tab_blocked/1

If mnesia_controller:block_table/1 is called twice for same table,
the new stored value of {Tab, where_to_commit} will be {blocked, {blocked,List}}.
This will result in an exception when calling is_tab_blocked/1.
mnesia_conttoller:block_table/1 should check if the table is already blocked.
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/mnesia/src/mnesia_controller.erl
10 lib/mnesia/src/mnesia_controller.erl
@@ -1676,9 +1676,13 @@ 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
+ {false, Old}->
+ New = {blocked, Old},
+ set(Var, New); % where_to_commit
+ {true, _Old}-> % already blocked
+ ignore
+ end.
unblock_table(Tab) ->
call({unblock_table, Tab}).

No commit comments for this range

Something went wrong with that request. Please try again.