From 2bf7b5b5abbc1097a0b30bea2d390a2a0bec004c Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 28 Jun 2019 13:13:13 +0200 Subject: mnesia: Fix deadlock caused by add_table_copy If add_table_copy was called when a node was starting it deadlock waiting for mnesia_controller, when schema was not merged. Abort if that is the case. --- lib/mnesia/src/mnesia_schema.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mnesia/src/mnesia_schema.erl') diff --git a/lib/mnesia/src/mnesia_schema.erl b/lib/mnesia/src/mnesia_schema.erl index ef38adca1e..4a86aeb375 100644 --- a/lib/mnesia/src/mnesia_schema.erl +++ b/lib/mnesia/src/mnesia_schema.erl @@ -697,7 +697,7 @@ schema_coordinator(Client, _Fun, undefined) -> schema_coordinator(Client, Fun, Controller) when is_pid(Controller) -> %% Do not trap exit in order to automatically die %% when the controller dies - + put(transaction_client, Client), %% debug link(Controller), unlink(Client), -- cgit v1.2.3